Chat with AI directly
from your terminal
PyCode is a lightweight, free terminal assistant for developers. Talk to LLMs, run tools, and write code โ all without leaving your command line. Uses under 50 MB of RAM.
Why PyCode?
Built for developers who love the terminal.
Multi-Model (Free)
Ships with OpenCode Zen โ 5 free models out of the box. No API key needed. Also works with OpenAI, Anthropic, Ollama.
Lightweight
Consistently runs under 50 MB of RAM. No Electron, no bloated runtime โ just Python and your terminal.
Built-in Tools
11 tools: file editor, code runner, web search, glob, grep, patch, fetch, search, tasks, questions, shell.
Chat Sessions
Persistent conversations with history. Revisit, rename, or delete sessions anytime.
Beautiful TUI
Powered by Textual. Rich colors, themes, and a responsive terminal interface.
Free to Use
100% free binary. Not open source. Feedback welcome via email (lu9dce@gmx.com) or WhatsApp (@hellocodelinux).
Build / Plan Modes
Build mode = full tool access. Plan mode = read-only. Switch instantly with Ctrl+B.
Context Compaction
Auto-summarizes long conversations. Preserves decisions, file changes, and tasks while truncating old output.
Session Management
Full persistence: save, load, switch, rename, delete. Sessions survive restarts.
Theme Picker
Multiple built-in themes, switchable at runtime (Ctrl+P).
Model Picker
Fetch and switch models on the fly (Ctrl+O). Auto-detects free models from OpenCode Zen.
File Picker
Interactive file browser with fuzzy filtering. Trigger with @ in the input.
Shell Integration
Run shell commands inline with !command or /shell command.
File References
Reference files with @path โ PyCode reads them on demand via the Read tool.
Reasoning Display
Shows model "thinking" process with elapsed time (for models that support it).
Diff Rendering
Colored diffs for patch results โ added/removed lines highlighted.
Context Usage Bar
Real-time token usage and percentage in the status bar.
Settings Modal
Configure API endpoint, key, and model without editing files (Ctrl+S).
Help Screen
Keyboard shortcuts reference (F1).
Copy Messages
Copy assistant responses to clipboard (Ctrl+Y).
Error Dialogs
Friendly error handling for rate limits, auth failures, server errors.
Proxy Support
Respects HTTPS_PROXY / HTTP_PROXY environment variables.
Models.dev Integration
Auto-fetches real context windows from models.dev catalog (same as opencode).
Get Started
Choose your preferred way to install PyCode.
Binary (Linux x86_64)
Pre-compiled binary โ no dependencies needed. Just download and run.