AI coding assistant powered by Ollama
Project description
Buchi CLI
The Safety-First Autonomous AI Coding Agent.
Buchi is a command-line agent that acts as your autonomous pair programmer. It plans tasks, writes code, and manages files using an agentic workflow (LangGraph).
Unlike "autocomplete" tools, Buchi can handle complex instructions like "Refactor the login logic and add tests." Because this requires high-level reasoning, Buchi is designed to ensure safety even when the AI makes mistakes.
🛠️ Prerequisites
Buchi relies on Ollama to run local AI models. You must have Ollama installed and running on your system before using this tool.
1. Install Ollama
Download the installer for your operating system from the official website, or use the commands below:
- macOS: Download and install.
- Windows: Download and run the installer.
- Linux: Run the following command:
curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh) | sh
2. Verify Installation
Open your terminal and check that Ollama is accessible:
ollama --version
If the command is not found, you may need to restart your terminal.
3. Start the Server
Ensure the Ollama server is running in the background.
- Mac/Windows: Launch the Ollama application.
- Linux: It should run automatically, or start it with
ollama serve.
4. Pull a Model
Buchi needs a model to work. Pull the default model (or your preferred one) before running your first task:
# Example: Pulling a coding-optimized model
ollama pull qwen3-coder:480b-cloud
⬇️ Setting up
Create a folder
mkdir <project_name>
Navigate to folder
cd <project_name>
To open in VSCode
code .
Create a virtual environment and activate
Windows:
python -m venv .venv
- Activate (Command Prompt):
.venv/Scripts/Activate
- Activate (Powershell):
.venv/Scripts/Activate.ps1
Note: On Windows, you may need to adjust PowerShell’s execution policy if activation fails:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Deactivate:
deactivate
MacOS/Linux:
python3 -m venv .venv
Note: On Linux/macOS, make sure you’re using python3 since python may point to Python 2.
- Activate (bash/zsh):
source .venv/bin/activate
- Activate (fish shell):
source .venv/bin/activate.fish
- Deactivate:
deactivate
☑️ Installation
pip:
Windows:
pip install buchi-cli
MacOS/Linux:
python3 -m pip install buchi-cli
uv (Recommended):
uv add buchi-cli
Main Commands
buchi run - Execute AI Coding Tasks
# Basic usage
buchi run "Create a login endpoint"
# Specify model
buchi run "Add tests" --model qwen3-coder:480b-cloud
# Set working directory
buchi run "Refactor code" --dir ./my-project
# Verbose mode (show detailed logs)
buchi run "Create API" --verbose
# Control max iterations (prevent runaway loops)
buchi run "Build project" --max-iterations 75
Options:
-m, --model - Ollama model to use (default: qwen3-coder:480b-cloud)
-d, --dir - Working directory (default: current directory)
-v, --verbose - Show detailed execution logs
--max-iterations - Maximum agent iterations (default: 50)
History Management
buchi history - View Conversation History
# Show last 10 messages (default)
buchi history
# Show last 5 messages
buchi history -n 5
# Show all messages
buchi history --full
# For specific project
buchi history --dir ./my-project
buchi clear - Clear Conversation History
# Clear history for current project
buchi clear
# Clear for specific project
buchi clear --dir ./my-project
buchi limit - Manage Message Context Limit
# View current limit
buchi limit
# Set limit to 30 messages
buchi limit 30
# Set unlimited
buchi limit 0
# For specific project
buchi limit 50 --dir ./my-project
buchi info - Project Statistics
# Show conversation statistics
buchi info
# For specific project
buchi info --dir ./my-project
Shows:
-
Total Messages
-
Message Limit
-
First/Last Interaction Dates
-
Storage Location
Safety & Recovery
buchi undo - Undo File Operations
# Undo the last operation (default)
buchi undo
# Undo the last 3 operations
buchi undo -n 3
# For specific project
buchi undo --dir ./my-project
Restores files to their state before the agent modified them.
buchi backups - View Backup Statistics
# Show storage stats and last 10 backups
buchi backups
# Show last 20 backups
buchi backups -n 20
# For specific project
buchi backups --dir ./my-project
Displays total storage used by backups and lists recent modifications.
buchi backup-clean - Clean Old Backups
# Delete backups older than 30 days (default)
buchi backup-clean
# Delete backups older than 7 days
buchi backup-clean --days 7
# Delete ALL backups (dangerous)
buchi backup-clean --all
# Skip confirmation prompt
buchi backup-clean --all --force
Clean up old backups to free up disk space.
Logging Commands
buchi logs - View Log Files
# Show last 20 debug logs (default)
buchi logs
# Show last 50 audit logs
buchi logs --type audit -n 50
# Show error logs
buchi logs --type error
# Follow logs in real-time (tail -f style)
buchi logs --follow
# For specific project
buchi logs --dir ./my-project
Log types:
debug- Detailed execution tracesaudit- File operations and security eventserror- Errors and exceptions only
buchi log-stats - Log Statistics
# Show log file statistics
buchi log-stats
# For specific project
buchi log-stats --dir ./my-project
Log types:
- Total log files and size
- Size by log type (debug/audit/error)
- Log directory location
buchi log-clean - Clean Old Logs
# Delete logs older than 30 days (default)
buchi log-clean
# Delete logs older than 7 days
buchi log-clean --days 7
# Delete ALL logs
buchi log-clean --all
# For specific project
buchi log-clean --dir ./my-project
Utility Commands
buchi models - List Available Models
# List all Ollama models
buchi models
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file buchi_cli-0.1.2.tar.gz.
File metadata
- Download URL: buchi_cli-0.1.2.tar.gz
- Upload date:
- Size: 34.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4f4a93be71c5174e4d5957cd7adbfd86f4e5a531d0d7bc3f2459ad0bffecdd2
|
|
| MD5 |
a61477408d71fde081d071a370a4a7a9
|
|
| BLAKE2b-256 |
4719dcc821b0f996f0889cf556e5664873571805b6e857e4ed606754eef596fa
|
File details
Details for the file buchi_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: buchi_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fe42b2631720555d6f9eb275a975bfc03b4fc52356309942452b4b615022d21
|
|
| MD5 |
dda5eea243815e88419bc0498aa59766
|
|
| BLAKE2b-256 |
5d09ddf28565dfe684110da05ba6c654936236a04a9993d2b87c02f200c3d84f
|