Skip to main content

A lightweight TUI coding assistant using Gemini API free tier

Project description

VerySmolCode

A lightweight TUI coding assistant powered by Gemini API free tier, designed for resource-constrained devices like Raspberry Pi 3.

Features

  • CLI Prompt Mode: vsc -p "prompt" for single-shot usage (like claude -p), supports piped input
  • Command Autocomplete: Type / to see all available commands with descriptions, navigate with arrow keys
  • Smart Model Routing: 6 models across Gemini 3.x and 2.5 — automatically selects the best available model based on task complexity, with graceful fallback when rate-limited or overloaded
  • Planning Mode: /plan for thorough analysis — reads code, creates architecture plans, and builds a todo list to guide implementation
  • Task Tracking: Built-in todo list (like Claude Code) — the agent creates and tracks tasks during complex work, visible with /todo
  • Full Tool Suite: File read/write/edit, grep search, find files, git operations, shell commands, web fetch, image reading (19 tools)
  • MCP Support: Connect to MCP servers (context7, playwright, etc.) via /mcp-add — tools are live in the agent loop
  • Code Reviewer: After tool use, reviews actual git diff with a structured checklist (correctness, bugs, completeness, style)
  • Chain-of-Thought: All 6 models use thinking tokens for better reasoning, with tier-scaled budgets (Pro 2048, Flash 1024, Lite 512)
  • Token-Aware: /tokens dashboard, /fast//smart model selection, rate limit warnings, conversation compaction, and thinking budget control
  • Safe by Default: Blocks destructive operations, validates paths, and prevents dangerous commands
  • Lightweight: ~5MB binary, minimal memory footprint, runs on Raspberry Pi 3

Installation

With pip (Python)

Pre-built wheels available for Linux (x86_64, aarch64, armv7), macOS (Intel + Apple Silicon), and Windows (x86_64):

pip install verysmolcode

From Source (Rust)

# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Clone and build
git clone https://github.com/marcelotournier/verysmolcode.git
cd verysmolcode
cargo install --path .

From Source (Python wheel)

pip install maturin
git clone https://github.com/marcelotournier/verysmolcode.git
cd verysmolcode
maturin develop --features python

Usage

# Set your Gemini API key (get one free at https://aistudio.google.com/apikey)
export GEMINI_API_KEY=your_key_here

# Run interactive TUI
vsc

# Run a single prompt (like claude -p)
vsc -p "explain this codebase"

# Pipe input as prompt
cat error.log | vsc -p "what's wrong here?"

# Show version
vsc -v

Commands

Command Description
/help Show available commands and keybindings
/fast Use Flash models for next message (saves budget)
/smart Use Pro models for next message (best quality)
/plan Toggle planning mode (read-only, Pro model)
/undo Undo the last batch of file changes
/save Save conversation to file: /save [filename]
/tokens Show detailed token usage and rate limits
/status Show rate limits and token usage
/model Show available models and rate limits
/config Show current configuration
/config set Edit config: /config set temperature 0.5
/compact Manually compact conversation to save tokens
/mcp List configured MCP servers
/mcp-add Add MCP server: /mcp-add name command [args]
/mcp-rm Remove MCP server: /mcp-rm name
/todo Show current task list (alias: /t)
/retry Retry the last message (alias: /r)
/version Show version information
/clear Clear conversation and screen
/quit Exit VerySmolCode

Keybindings

Key Action
Ctrl+C Cancel/Quit
Ctrl+L Clear screen
Up/Down Input history / Navigate command popup
PgUp/PgDn Scroll output
Tab Select from command popup
Esc Dismiss command popup
Ctrl+A/E Home/End of line
Ctrl+U/K Clear line before/after cursor
Ctrl+W Delete word backward

Model Tiers (Free Tier)

Model RPM RPD Best For
Gemini 3.1 Pro 5 25 Complex tasks
Gemini 3 Flash 10 250 General coding
Gemini 3.1 Flash-Lite 15 1000 Simple tasks
Gemini 2.5 Pro 5 25 Fallback complex
Gemini 2.5 Flash 10 250 Fallback general
Gemini 2.5 Flash-Lite 15 1000 Fallback simple

VerySmolCode automatically manages rate limits across all 6 models independently. When one model is exhausted, it falls back to the next available one. Gemini 3 models are preferred; 2.5 models serve as fallbacks, effectively doubling your daily quota per tier.

Configuration

Config file is stored at ~/.config/verysmolcode/config.json. You can edit it directly or use /config set in the TUI:

/config set temperature 0.5     # Lower = more focused, higher = more creative
/config set max_tokens 2048     # Limit response length to save tokens
/config set compact_threshold 16000  # Compact conversation earlier
/config set safety off          # Disable safety checks (not recommended)

Default values:

{
  "max_tokens_per_response": 4096,
  "max_conversation_tokens": 32000,
  "temperature": 0.7,
  "auto_compact_threshold": 24000,
  "safety_enabled": true
}

Architecture

src/
  main.rs           - Entry point
  config.rs         - Configuration management
  api/
    client.rs       - Gemini REST API client with fallback
    models.rs       - 6 model definitions, rate limiting, routing
    types.rs        - Request/response type definitions
  agent/
    loop_runner.rs  - Main agent loop with planning mode and critic
  tools/
    file_ops.rs     - File read/write/edit/list + image reading
    grep.rs         - Search and find files
    git.rs          - Git operations and shell commands
    web.rs          - Web page fetching
    todo.rs         - Task tracking (agent todo list)
    registry.rs     - Tool registration and dispatch (19 tools)
  mcp/
    client.rs       - MCP client (stdio JSON-RPC 2.0)
    config.rs       - MCP server configuration
    types.rs        - MCP protocol types
  tui/
    app.rs          - Application state and event handling
    ui.rs           - Terminal UI rendering
    input.rs        - Keyboard input handling
    commands.rs     - Slash command processing

Testing

# Unit tests (547 tests)
cargo test

# Integration test (requires tmux + GEMINI_API_KEY)
./tests/integration_test.sh

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verysmolcode-0.10.0.tar.gz (95.5 kB view details)

Uploaded Source

Built Distributions

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

verysmolcode-0.10.0-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

verysmolcode-0.10.0-cp313-cp313-manylinux_2_28_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARMv7l

verysmolcode-0.10.0-cp313-cp313-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

verysmolcode-0.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

verysmolcode-0.10.0-cp313-cp313-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

verysmolcode-0.10.0-cp313-cp313-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

verysmolcode-0.10.0-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

verysmolcode-0.10.0-cp312-cp312-manylinux_2_28_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARMv7l

verysmolcode-0.10.0-cp312-cp312-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

verysmolcode-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

verysmolcode-0.10.0-cp312-cp312-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

verysmolcode-0.10.0-cp312-cp312-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

verysmolcode-0.10.0-cp311-cp311-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.11Windows x86-64

verysmolcode-0.10.0-cp311-cp311-manylinux_2_28_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARMv7l

verysmolcode-0.10.0-cp311-cp311-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

verysmolcode-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

verysmolcode-0.10.0-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

verysmolcode-0.10.0-cp311-cp311-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file verysmolcode-0.10.0.tar.gz.

File metadata

  • Download URL: verysmolcode-0.10.0.tar.gz
  • Upload date:
  • Size: 95.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for verysmolcode-0.10.0.tar.gz
Algorithm Hash digest
SHA256 b7472ab41f66569cdf1d93106f2b40dca71e981bc8d817f07e73a6077058f7e7
MD5 3e161fdd3734097f92672a22807b6665
BLAKE2b-256 5b080a28ae653eb5a4c379f9e18c6006b5d9b9c528ee4ad3769435a11cbfc5cf

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9e2f8edd505cf4483ae1601bb9f0a55c30363b92c5775bcfbeae3d6465c885e5
MD5 865c3ddfbf6a480b22e4cfacc0fd89ff
BLAKE2b-256 038132b8a2366a4122828adab177a2e3fe9201955ea90ed941ade5e8bf6f941d

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp313-cp313-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp313-cp313-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 0499c991467409b3d9448c9b93e31334b8c7a880da1e58a07160da2e67a7b82a
MD5 26f699456ff1ab875c773e8d5ccdd813
BLAKE2b-256 b7e5281e27b2c9f4b7e089dbe240262b9c173cecda6b891585cfab8005657c6c

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 602744dd6e9a4b0a0fa33234462ad839d5a9bc9691c531b4f110a1436d7457f0
MD5 644f6890fdf6e831117e0a62fe8304e9
BLAKE2b-256 f94abba4310c2257737c2e1c3a88c84ad74049a559fbda8e983ec7ea99ad490e

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed499ceef9f8e1325009acc7c444c705821772691d7cc1853d53db4336ded080
MD5 c1bcd2cb7dd3fc19d284b99b0530a6e6
BLAKE2b-256 3ada5db44b59dc549c34e075230951751b0a4487eb28fbdd4b95047c2c80ee6f

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 771133847dce45a82e92d60ad687fbcef03e88b0c2c8e5aa6147b1724eb216e5
MD5 a1cb1e38d99378f83df63b8b877346d0
BLAKE2b-256 8666fa8b23090fdadcffc5300a5d4f97c8674c53fc98d1756042ed494075d0c5

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d54e2db90a85fa51f2bf734af086b36078b0307cc44ab4b16c7fb082256040fb
MD5 c05490fbcc71c607d1df0c56f8d2da15
BLAKE2b-256 3a21c26109b554056d318fde21b73359e86d7a6efa01d6d918d4fcc769881056

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b4e309e455ccc93b07f672da46bdcd8f4ff56407cd18ce508e63223533e12f8c
MD5 fb335186abdd9c250f1af78a8c8b3004
BLAKE2b-256 80cd219330fb681dc7a88218d2f8d7bfb1059c04749f2c0ff7e1f04151c6f81d

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp312-cp312-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp312-cp312-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 9c26a152e2cc84f313510761608a3062ba446c0f2cfca3cb57463aa8636a0277
MD5 75c282a2bd301290abf46c3f2c6a7455
BLAKE2b-256 ea6f6ebee6e6046eb43f2559a018e6329dc7f0680862f5bb5a4a3706a034def6

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9b6b3b867476988a48f78acc852609817a9f546bdea1f0ca518c85bf7e0ce6bb
MD5 7cb316a0af4c51addf8b52f7c7721b81
BLAKE2b-256 266e9d20c62d351430175c986fbb72f4b57770827d03089be3ca69b3cf95a588

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d76bd096ad5c5002ae85d0606658282c023884f2c769c36ff7283a6a16116c82
MD5 34eed1c6eee531f9c1ba41367a95d1f2
BLAKE2b-256 cf2de20d0a30a8993d624290ec155cd0740b85d84d96e9c9ae9a3b6f60caf9dd

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 80bc4ca085faa2fb5c7a82acc3f37f3b6495f8ed2ac2ff2e6a76f3f19c517bb7
MD5 a6c32bc83d7e378379a18dde6c1cc474
BLAKE2b-256 473730731b95ed8d4b93262f9bacd3dae7c854e57eca487a01c4ff295d3fd79c

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f3399e9d5c1a43eff78a8caa523dc4d77c385f855cb825fb019ef4db7df09771
MD5 731b563d7d32b0f30fba765a28ac848b
BLAKE2b-256 ec0282531878f0e54b9a226f47c0e28aa090904da2b8cf95539406a29cb5bd87

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8b47987d25c71ff67a5f93a159863d4a3dcddae7f70cb36351db4b40cb805ee3
MD5 ad972f3264a36c4a46f1211e1dbf2fab
BLAKE2b-256 ffc51929cb03e4c856b2967c206b095be78769562780021aacb2e0b5621c0859

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp311-cp311-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp311-cp311-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 28f2d50ce767cdea20c3f6da21acdd9b1eb93c82093a6c12683adadf79febc64
MD5 7fb939213f9e9316a18bc83dd0c5d1e5
BLAKE2b-256 af0e362ce1170c0808c5d94c15dc12470235b95f8fd0e86484589ab1b56b15a8

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a82d04fcac71888268805414d5a1aff8d328e9156536d92e1f57548de9033c02
MD5 fb0041f739557c0ce4ad54a891324e00
BLAKE2b-256 82eed75dbc9406c6123d49a2da6023e7d4f38145e85e2956960f3153577dbb91

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dadbaa8b6b9652c367a79affa1bc2eabf959b82374fb6eadeaefa536f893ff82
MD5 83e6cf98869336912403494a302edae8
BLAKE2b-256 d4eff962c5410153739e18ac31bc920f0fc0990ddf5274b22860286987889c29

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a6f6c36d6a4d3efb4eaa1260fdc3733842f85e8e05f74ad1181e19e7bed81fcf
MD5 f36fe9ac7a0db757c3d004fe87f39907
BLAKE2b-256 a4963afd9997000a7e4589910717bfecf94406a1f241668b91903d954b243d36

See more details on using hashes here.

File details

Details for the file verysmolcode-0.10.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for verysmolcode-0.10.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f17a710d430f974557129b1b6d22571d16d4a52dc8ae73b719c722031ac0733
MD5 c82c2902e4a47ccefe4a75e387994589
BLAKE2b-256 f02b3a785c9a22346761a9c58b49f8c5c056a078665185dba78625e5cd689953

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