An AI pair-programmer for the command line.
LLM-powered shell commands, code generation, commit messages, code reviews, unit test generation, and more. Works with most popular LLMs including OpenAI, Claude, Gemini, Ollama, and more.
Cloving CLI is a command line utility which integrates AI into your development workflow.
What makes the Cloving CLI different from other AI tools is that it builds sophisticated context-aware prompts to generate code, commit messages, and more.
Cloving gets to know your specific projects, the frameworks you use, the coding style you prefer, and the patterns you follow, and does its best to generate code that fits your existing project so that it actually works.
It delivers usable code that you can save directly into your project instead of copying and pasting code snippets from chat interactions.
Read the introduction announcement.
Warning
This project is still in the early stages of development and is not yet stable. Please use it with caution and report any issues you encounter
- Context-aware AI code generation
- AI-powered Git commit message generation
- Automated code reviews with AI insights
- AI-assisted unit test generation
- Support for multiple AI models including OpenAI, Claude, and Ollama
The cloving will ask you before submitting any prompt to the AI model. You can use the -s
or --silent
flag to run the command without asking for confirmation, but by default you will have the chance to review all prompts with all the context before submitting them. This is to ensure that you are aware of what is being sent to the AI model and can make any necessary changes before submitting the prompt.
- Node.js (version 20 or higher)
- Git
- API access to AI chat models (e.g., OpenAI GPT-4, Claude, Ollama, etc.)
You have three options to install and use Cloving:
Install Cloving globally using npm:
npm install cloving -g
This allows you to run cloving
commands from anywhere in your terminal.
You can use npx to run Cloving without installing it globally:
npx cloving [command]
This method downloads and executes Cloving on-the-fly, ensuring you always use the latest version.
For development or to use the latest unreleased features:
-
Clone this repository:
git clone https://github.com/cloving-ai/cloving-cli.git
-
Navigate to the project directory:
cd cloving-cli
-
Install dependencies and link the package:
yarn install yarn link
After installation, configure Cloving with your API key and preferred model:
cloving config
Choose the installation method that best suits your needs and workflow. The global npm installation is recommended for most users, while npx is great for one-off usage or trying out Cloving. Cloning from source is ideal for contributors or those who want the absolute latest features.
Cloving provides several commands to help integrate AI into your development workflow:
Configure Cloving with your API key and model:
cloving config
Set up Cloving in the current project:
cloving init
Options:
-s, --silent
: Run without asking for confirmation of submitting prompts-m, --model <model>
: Select the model to use
Generate an AI-powered commit message:
cloving commit
or
cloving generate commit
Options:
-s, --silent
: Run without asking for confirmation-m, --model <model>
: Select the model to use
Get an AI-powered code review:
cloving generate review
Options:
-s, --silent
: Run without asking for confirmation-m, --model <model>
: Select the model to use
Generate code based on a prompt:
cloving generate code
Options:
--save
: Automatically save all files after generating the code-i, --interactive
: Auto-save generated code and then show a new prompt with existing context to revise the code further-s, --silent
: Run the command without asking for confirmation of submitting prompts-m, --model <model>
: Select the model to use-p, --prompt <prompt>
: Specify the prompt to use-f, --files <filenames...>
: Specify filenames of files with context to use for generating code
Generate a shell command based on a prompt:
cloving generate shell
or
cloving generate sh
Options:
-s, --silent
: Run without asking for confirmation of submitting prompts-m, --model <model>
: Select the model to use-p, --prompt <prompt>
: Specify the prompt to use
Start an interactive chat session with the AI:
cloving chat
Options:
-f, --files <filenames...>
: Specify filenames of files with context to use for the chat-t, --temperature <temperature>
: Set the temperature for the model (default 0.2)-m, --model <model>
: Select the model to use
Start a proxy server to use with Cloving:
cloving proxy
Options:
-f, --files <filenames...>
: Specify filenames of files with context to use for generating code-t, --temperature <temperature>
: Set the temperature for the model (default 0.2)-m, --model <model>
: Select the model to use
The proxy server allows you to integrate Cloving with other tools or applications. It starts a local server that can receive requests and forward them to the AI model, returning the responses. This is useful for creating custom integrations or using Cloving in scenarios where a direct CLI interaction isn't suitable.
Estimate the number of tokens in the current working directory or specified files:
cloving tokens
or
cloving t
Options:
-f, --files <filenames...>
: Specify filenames of files to estimate tokens for
Create a context string for generating prompts outside of the cloving cli:
cloving generate context
Options:
-f, --files <filenames...>
: Specify filenames of files with context
Generate unit tests for changes or specific files:
cloving generate unit-tests
Options:
-s, --silent
: Run without asking for confirmation-f, --files <filenames...>
: Specify filenames for the unit tests-m, --model <model>
: Select the model to use
Usage: cloving [command] [options]
Options:
-V, --version
: Output the version number-h, --help
: Display help for command
Commands:
config
: Configure Cloving with your API key and models to useinit
: Setup Cloving in the current directorychat
: Start an interactive chat with Clovingtokens
: Estimate the number of tokens in the current working directory or specified filesproxy
: Start a proxy server to use with Clovingmodels
: List available modelscommit
: Alias for cloving generate commitgenerate
: Generate various items like unit-tests and code reviewscommit
: Generate a commit message and commit the changescode
: Generate code based on a promptcontext
: Generate context for building a prompt outside of clovingshell
: Generate a shell command based on a promptunit-tests
: Generate unit testsreview
: Review the code for committed changes
Most commands support the following options:
-s, --silent
: Run the command without asking for confirmation of submitting prompts-m, --model <model>
: Select the model to use (e.g., openai, claude, ollama, ollama:llama3, claude:claude-3-5-sonnet-20240620)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.