gptcli  by JohannLai

CLI tool for building custom ChatGPT-powered command-line interfaces

created 2 years ago
261 stars

Top 98.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a command-line interface (CLI) tool for interacting with ChatGPT, enabling users to create custom AI-powered CLI tools rapidly. It targets developers and power users seeking to integrate natural language processing into their workflows for tasks like code generation, Git commit messages, and translations. The primary benefit is the ability to build bespoke AI CLI tools as easily as defining GitHub Actions.

How It Works

GPT CLI leverages a plugin-based architecture, allowing users to define custom CLI tools using simple YAML configurations. These configurations specify steps that often involve calling OpenAI's createChatCompletion API with user-defined prompts. The output from the AI can then be exported as environment variables and used in subsequent steps, enabling complex workflows. This approach abstracts away much of the boilerplate code typically associated with CLI development and AI integration.

Quick Start & Requirements

  • Install via npm: npm install -g @johannlai/gptcli
  • Requires Node.js version 16+.
  • Configuration involves setting your OpenAI API key: gptcli config user.OPENAI_API_KEY <your_key>
  • Official documentation and plugin examples are available via the project's GitHub repository.

Highlighted Details

  • Built-in plugins for chat, natural language to command conversion, translation, AI commit messages, gitmoji, and more.
  • Supports creating custom plugins with a simple YAML file defining steps and AI interactions.
  • Allows configuration of commit message styles (e.g., cz, gitmoji).
  • Includes experimental support for local Whisper model execution and Notion integration.

Maintenance & Community

The project is maintained by JohannLai. Community plugins are planned, and users are encouraged to contribute their own via pull requests.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

Some features, such as Notion integration and Whisper, are marked as Work In Progress (WIP). The project relies on an external OpenAI API key, and its stability is dependent on OpenAI's service.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), and
12 more.

opencode by sst

7.8%
16k
CLI tool for AI-assisted coding in the terminal
created 3 months ago
updated 1 day ago
Feedback? Help us improve.