Acai is a versatile AI-powered coding assistant that integrates with your development workflow. It provides intelligent code suggestions, documentation generation, and interactive chat capabilities to enhance your coding experience.
- Interactive chat mode for coding assistance
- Code completion and suggestions
- Code optimization suggestions
- Automatic documentation generation
- Bug fixing and code improvement suggestions
- Support for multiple AI providers (OpenAI, Anthropic, Mistral, Google, Ollama)
- Language Server Protocol (LSP) integration
- Customizable prompts and templates
- File filtering for codebase analysis
To install Acai, you'll need Rust and Cargo installed on your system. Then, follow these steps:
-
Clone the repository:
git clone https://github.com/travisennis/acai.git cd acai
-
Build the project:
cargo build --release
-
The binary will be available in
target/release/acai
Acai provides several subcommands for different functionalities:
chat
: Start an interactive chat session with the AI assistantinstruct
: Send a single instruction to the AIlsp
: Start the Language Server Protocol server
Start an interactive chat session with the AI:
acai chat --model anthropic/claude-3-sonnet-20240229 --path /path/to/your/codebase
Generate code or documentation based on instructions:
acai instruct --model openai/gpt-4 --prompt "Implement a binary search tree in Rust" --path /path/to/your/codebase
Generate prompts based on your codebase:
acai prompt-generator --path /path/to/your/codebase --include "**/*.rs" --exclude "target/**"
Start Acai as a Language Server:
acai lsp
Acai uses environment variables for API keys:
OPENAI_API_KEY
: For OpenAI modelsCLAUDE_API_KEY
: For Anthropic modelsMISTRAL_API_KEY
: For Mistral modelsGOOGLE_API_KEY
: For Google models
You can also customize the behavior using command-line options. Refer to the help command for each subcommand for more details:
acai <subcommand> --help
acai chat --model openai/gpt-4 --temperature 0.7
Contributions to Acai are welcome! Please follow these steps:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them with clear, descriptive messages
- Write tests for your new functionality
- Submit a pull request
Make sure to run tests and linters before submitting:
cargo test
cargo clippy
To run the test suite:
cargo test
Acai is licensed under the MIT License. See the LICENSE file for details.
Acai uses several open-source libraries and AI models. We're grateful to the developers and organizations behind these technologies:
- Rust and the Rust community for providing excellent tools and libraries that make projects like this possible.
- OpenAI, Anthropic, Mistral, and Google for their AI models.
- The developers of crates used in this project (tokio, clap, reqwest, and others). Please see the
Cargo.toml
file for a full list of dependencies.