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.
Buchi relies on Ollama to run local AI models. You must have Ollama installed and running on your system before using this tool.
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
Open your terminal and check that Ollama is accessible:
ollama --versionIf the command is not found, you may need to restart your terminal.
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.
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-cloudmkdir <project_name>Navigate to folder
cd <project_name>To open in VSCode
code .Windows:
python -m venv .venv- Activate (Command Prompt):
.venv/Scripts/Activate- Activate (Powershell):
.venv/Scripts/Activate.ps1Note: On Windows, you may need to adjust PowerShell’s execution policy if activation fails:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Deactivate:
deactivateMacOS/Linux:
python3 -m venv .venvNote: 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:
deactivatepip:
Windows:
pip install buchi-cli MacOS/Linux:
python3 -m pip install buchi-cliuv (Recommended):
uv add buchi-cli# 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-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)
# 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# Clear history for current project
buchi clear
# Clear for specific project
buchi clear --dir ./my-project# 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# Show conversation statistics
buchi info
# For specific project
buchi info --dir ./my-project-
Total Messages
-
Message Limit
-
First/Last Interaction Dates
-
Storage Location
# Undo the last operation (default)
buchi undo
# Undo the last 3 operations
buchi undo -n 3
# For specific project
buchi undo --dir ./my-projectRestores files to their state before the agent modified them.
# Show storage stats and last 10 backups
buchi backups
# Show last 20 backups
buchi backups -n 20
# For specific project
buchi backups --dir ./my-projectDisplays total storage used by backups and lists recent modifications.
# 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 --forceClean up old backups to free up disk space.
# 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-projectdebug- Detailed execution tracesaudit- File operations and security eventserror- Errors and exceptions only
# Show log file statistics
buchi log-stats
# For specific project
buchi log-stats --dir ./my-project- Total log files and size
- Size by log type (debug/audit/error)
- Log directory location
# 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# List all Ollama models
buchi models