| Crates.io | ai-assistant-cli |
| lib.rs | ai-assistant-cli |
| version | 0.1.1 |
| created_at | 2025-09-08 09:23:07.604952+00 |
| updated_at | 2025-09-08 09:23:07.604952+00 |
| description | Personal AI CLI tool for chat, git operations, and project publishing |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1829041 |
| size | 194,011 |
A personal AI-powered CLI tool built in Rust that integrates with Ollama for intelligent Git operations and project management.
ai help - Display help informationai ask "question" - Ask AI a single questionai chat - Start interactive chat sessionai commit - Generate AI-powered commit message for staged changesai commit all - Stage all changes and commit with AI-generated messageai push - Intelligent push with conflict resolutionai push force - Force push changesai publish - Publish Rust project to crates.ioWithin ai chat, you can use:
/help - Show chat commands/commit [all] - Commit changes/push [force] - Push changes/publish - Publish project/exit or /quit - Exit chatThe easiest way to install is directly from GitHub:
cargo install --git https://github.com/medopaw/ai-cli
This will download, compile, and install the latest version from the main branch to ~/.cargo/bin/ which should be in your PATH.
If you want to modify the code or contribute:
Clone the repository:
git clone git@github.com:medopaw/ai-cli.git
cd ai-cli
Install using Cargo:
cargo install --path .
If you prefer to build manually:
# Build the project
cargo build --release
# Copy binary to a directory in your PATH
cp target/release/ai ~/.local/bin/
# Or add target/release to your PATH
ai help
The tool automatically creates a configuration file at ~/.ai.conf.toml with default settings:
[ai]
provider = "ollama"
model = "qwen2.5:7b"
base_url = "http://localhost:11434"
[git]
commit_prompt = """
You are an expert software engineer that generates concise,
one-line Git commit messages based on the provided diffs.
Review the provided context and diffs which are about to be committed to a git repo.
Review the diffs carefully.
Generate a one-line commit message for those changes.
The commit message should be structured as follows: <type>: <description>
Use these for <type>: fix, feat, build, chore, ci, docs, style, refactor, perf, test
IMPORTANT: The description must start with a lowercase letter. Never capitalize the first letter of the description.
Ensure the commit message:
- Starts with the appropriate prefix.
- Is in the imperative mood (e.g., "add feature" not "added feature" or "adding feature").
- Does not exceed 72 characters.
Reply only with the one-line commit message, without any additional text, explanations, or line breaks.
Remember: description must start with lowercase letter (e.g., "feat: add new feature", NOT "feat: Add new feature").
Git diff:
{diff}
"""
[history]
enabled = false
# Ask AI a programming question
ai ask "How do I implement a binary tree in Rust?"
# Start interactive chat
ai chat
# Generate and apply AI commit message
ai commit all
# Intelligent push with conflict resolution
ai push
# Publish Rust crate
ai publish
The project is organized into modules:
ai_client.rs - AI integration with Ollamagit_ops.rs - Git operations wrapperconfig.rs - Configuration managementutils.rs - Utility functions (menus, confirmations)history.rs - Optional command history (SQLite)MIT License
This is a personal tool, but contributions are welcome! Please open an issue or pull request.