Skip to main content

Your agentic CLI developer.

Project description

tunacode-cli

tunacode

PyPI version Downloads Python 3.11+ License: MIT Discord Shield

A terminal-based AI coding agent with a NeXTSTEP-inspired interface.

Early stage software — not production ready. Under active development, expect bugs and breaking changes.

Features

  • Any model - Works with any OpenAI-compatible API (Anthropic, OpenAI, Google, Ollama, vLLM, etc.)
  • File operations - Read, write, update files with fuzzy matching for edits
  • Shell access - Run bash commands with output capture
  • Code search - Glob patterns and grep with ripgrep integration
  • Session persistence - Resume previous conversations with /resume
  • LSP diagnostics - Real-time code errors after file writes (Python, TypeScript, Go, Rust)
  • Themeable UI - CSS-based theming with NeXTSTEP-inspired design
  • Copy-on-select - Automatically copies highlighted text to clipboard
  • Agent loop - Powered by tinyAgent

Built With

  • tinyAgent - Core agent loop handling LLM interaction and tool execution
  • alchemy-rs - Rust-powered tokenizer and utilities via PyO3 bindings
  • Textual - Terminal UI framework with CSS-based styling
  • Rich - Terminal rendering with syntax highlighting
  • Typer - CLI framework

Installation

End Users

uv tool install tunacode-cli

Or with pip:

pip install tunacode-cli

Developers (Fresh Clone)

git clone https://github.com/alchemiststudiosDOTai/tunacode.git
cd tunacode
make dev-setup

Or without make:

git clone https://github.com/alchemiststudiosDOTai/tunacode.git
cd tunacode
./scripts/dev-setup.sh

Development

Common development tasks:

make dev-setup  # Full setup for fresh clone
make install    # Install/update dependencies
make run        # Run the development server
make test       # Run test suite
make lint       # Run linters
make clean      # Clean build artifacts

View technical debt:

uv run python scripts/todo_scanner.py --format text

Quick Start

# Configure API key
tunacode --setup

# Start coding
tunacode

Configuration

Set your API key as an environment variable:

export ANTHROPIC_API_KEY="your-key"
# or
export OPENAI_API_KEY="your-key"

Config file: ~/.config/tunacode.json

For local models and advanced settings, see the Configuration Guide.

Commands

Slash commands are command objects in tunacode.ui.commands; each one is a Command subclass and is registered in COMMANDS. handle_command() also routes shell commands (!<cmd>), legacy exit, and slash /exit.

Command Description
/help Show available commands
/clear Clear transient agent state while preserving message history.
/compact Force context compaction
/debug Toggle debug logging to screen (includes parallel tool-call lifecycle lines)
/model Open model picker or switch model
/theme Open theme picker or switch theme
/resume List, load, or delete persisted sessions.
/update Check for or install updates.
!<cmd> Run shell command
/exit Exit TunaCode
exit Legacy alias for exit

Confirm Parallel Tool Calls

Run /debug to enable lifecycle logs. During agent execution, parallel batches are reported with lines prefixed by:

  • [LIFECYCLE] Parallel tool calls active: ...
  • [LIFECYCLE] Parallel tool calls update: ...
  • [LIFECYCLE] Parallel tool calls complete

If no Parallel tool calls lifecycle lines appear, that request did not execute a parallel tool batch.

Tools

The agent has access to:

Tool Description
read_file Read file contents with line ranges
write_file Create new files
update_file Edit existing files with fuzzy matching
bash Execute shell commands
glob Find files by pattern
grep Search file contents
list_dir List directory tree
web_fetch Fetch web page content
hashline-edit tool in tunacode

LSP Integration

Automatic code diagnostics when LSP servers are in PATH:

Language Server
Python ruff server
TypeScript/JS typescript-language-server
Go gopls
Rust rust-analyzer

Security

TunaCode has full shell access with no permission prompts. If you're concerned:

  • Use git so you can revert changes
  • Run in a container/sandbox

Discord

Discord

License

MIT

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

tunacode_cli-0.1.87.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tunacode_cli-0.1.87-py3-none-any.whl (396.1 kB view details)

Uploaded Python 3

File details

Details for the file tunacode_cli-0.1.87.tar.gz.

File metadata

  • Download URL: tunacode_cli-0.1.87.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for tunacode_cli-0.1.87.tar.gz
Algorithm Hash digest
SHA256 898e06cc8aa6b0a0d0e3a17bd433e452dba8524d8518a861adbdcf40f6bb4845
MD5 b88025eaf1a8af24da41628154eef432
BLAKE2b-256 4a83ea92ca5bd996f9bdefcd1847483338d15f88ea1642fe3d514bf39e2131f0

See more details on using hashes here.

File details

Details for the file tunacode_cli-0.1.87-py3-none-any.whl.

File metadata

  • Download URL: tunacode_cli-0.1.87-py3-none-any.whl
  • Upload date:
  • Size: 396.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for tunacode_cli-0.1.87-py3-none-any.whl
Algorithm Hash digest
SHA256 bed1acc315251fc796e5c9146ace8e1e398c3a34af0099463e01a0c18229e43d
MD5 d12b743016c3e4f592fb57236da95c45
BLAKE2b-256 600fa708882e061361ecb23f86275dbe29844cd1e8236ded16c97595ccd7e961

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page