TermAI is a terminal-based AI assistant developed in Rust. It leverages OpenAI's APIs to provide intelligent and interactive experiences directly from your command line.
- Asynchronous Operations: Powered by
tokio
for efficient asynchronous processing. - Local Configuration Storage: Manage configurations using SQLite via
rusqlite
. - Command-Line Parsing: Easy-to-use CLI with
clap
. - Colored Output: Enhanced terminal output with
colored
.
-
Prerequisites:
- Ensure you have Rust installed.
-
Clone the Repository:
git clone https://github.com/kyco/term.git cd termAI
-
Build the Project:
cargo build --release
-
Run the Application:
./target/release/termAI
-
Set OpenAI API Key:
./termAI --chat-gpt-api-key YOUR_API_KEY
-
Prompts:
- Use it directly in your terminal to chat with the AI assistant.
- It's currently designed for 1 shot requests
./termAI "What is the capital of France?"
- You can also provide a path as context for the AI to understand the context of the request.
./termAI "Create a README for this project" .
- You can also provide a path as context for the AI to understand the context of the request.
./termAI "create mocks for this file" ./src/main.rs
-
Commands:
- Use the following commands to interact with the application:
./termAI --help
- To set the OpenAI API key:
./termAI --chat-gpt-api-key YOUR_API
-
Piping:
- You can also pipe the output of other commands into TermAI:
echo "What is the capital of France?" | ./termAI
- Create git commit messages from diffs
git diff | ./termAI "create a short git commit message"
Configurations are stored locally using SQLite. You can view and modify settings using the provided CLI commands.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes with clear messages.
- Open a pull request describing your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For support or questions, please open an issue on the GitHub Issues page.
Thank you for using TermAI! 🖥️✨