gptcli  by JohannLai

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

Created 2 years ago
266 stars

Top 96.2% 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

1 day

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

BMTools by OpenBMB

0.0%
3k
Tool-learning framework for extending language models with external tools
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.