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.9.8.tar.gz (93.4 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.9.8-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

verysmolcode-0.9.8-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.9.8-cp313-cp313-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

verysmolcode-0.9.8-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.9.8-cp312-cp312-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

verysmolcode-0.9.8-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.9.8-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

verysmolcode-0.9.8-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.9.8.tar.gz.

File metadata

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

File hashes

Hashes for verysmolcode-0.9.8.tar.gz
Algorithm Hash digest
SHA256 977583242a764dee2d2941debaccd95417246fcde02fe23ce2d617a68ea31800
MD5 695add0ed40f9dfae3ea978e4f0a7194
BLAKE2b-256 cb026caf5e8687218165fd2d4e9968a110b0cfc25697d1a0c6ef5322397094e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 67dfb7267f54870644c655352c4b42f3c24801fd814cb17790da84ee36f7df79
MD5 6dee6054732335161491dd53d590781a
BLAKE2b-256 1dc61dfc0adfc45249e44433e4d0b7b312e7dff931a25a8d01a3b69201a5f495

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp313-cp313-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 ec818c7e4aada72c376a314d9dfeaa89dd345178eb23bc3dcc537e9ebee319eb
MD5 824b63b853dbb8fe0750629767a99957
BLAKE2b-256 0f2542f876e67438eb0b77ca3dc0be02ac78c2bfb2ae91f706067b3d35454fe5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 eb332ef4582c99ec7a982f1ac15ddcfb18348634a9515f6d0ec57263fde7ad9f
MD5 7fa861b888159d16a163a9cc3a819019
BLAKE2b-256 f2b52af991fd609518fc16403066f4dd0cbc693899f2bb6a33b6fa54ddfd1775

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 287915ba17123889ac108f26a197b2197c8d478bae9e268acaa48f91cff6702b
MD5 3e085670638862acfac2d1de3f7eca50
BLAKE2b-256 6609a576f104fc15d64793865666afc3ea6bb2fb8149368d570306b23ca4f56e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 656f81a1650dae70a8bbdf082653f469952b6556ee3339164f8a34072273a7ee
MD5 d2188b3c50045e694ced2860fcc6cd57
BLAKE2b-256 a20ebde0a6d2fd7d49e88130074dda3a82c0eaa00a8975a5a8482f9f229f29e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e8e00f1855f4c418ceb4e6b992598e9c7ee131d8875e1f80c81de1427668b690
MD5 083c6f3765d494d576404b1ea7cff813
BLAKE2b-256 f9435a8b14a9813054ab9513cb64115086ef80e48e8f52f327395e0d5aa4acff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d178c9672577155d35e9f3f9281bc1f75b3e0d02cbd27dd762be1533b3b3d6ad
MD5 da9183f8a15bad767cb94f79227d5b07
BLAKE2b-256 5e10290d45598f5883bde069354dafcf09d0f9eb65172e318ce46ca8bf197a02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp312-cp312-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 fe0bdf9485e7b94e3be14c0d1ea7751347d60cdb011c6f671d6cba72c8907523
MD5 c99c453b9bf1e3a3304717ca564602a8
BLAKE2b-256 7804cb984e9b39d7ae8e06714d9daedde25cc44dbbea2b93a55f76365943e626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4a744b8112c719e8d718cfb378e9adfa7ce4abb624262b6daafe358a058e557b
MD5 46698a563e420e0f471490a155c292ac
BLAKE2b-256 947f2923af4a6e810a319ff87ff4563f7f95372a03531e93b2430da75e0408fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d77b423c24545a886c9e5ad8b724380a8fcf17e4b01645c14b6fc72642fb6ee
MD5 3a35813b3cb812bce18618e70612d53c
BLAKE2b-256 b546bd5e58b6ac58ba3b29a4d14725350ce0bef3d9b91d1f3ee161fbb56cd7f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f9bad4d058238c254fa64f76f81b5e12ebdf399bf04bae4d802491229cb17fa
MD5 11e2ae7591cef3826eda831a1067dec7
BLAKE2b-256 f13fd76cc0c8aab81426c82f9166a2256a09f7a53601dec9639ed8cba31757e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a51243f823abf438e2883c4525170213932d52a99f4a97e155fb2e3670f5deb4
MD5 780b796ba5598a42cc2af2594751f00f
BLAKE2b-256 79214b98a7126f7b7badc56392390c4a2ac5ddcf758605d2c13d5d3c358db009

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a6ca98658d68f7c80abba1acfd6548c7911e4e593bdcf27fdbbf94e592374fb5
MD5 5956e1ff0d64f799965f86023a1e5634
BLAKE2b-256 9a35c97d9c45f23fd32bf2353e16509de8de3a27b7df2be61ede5346bdcbf8d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp311-cp311-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 77391ccddfe2611cdbce30df187630f9a95ff423336c1318018c42b43c227ef8
MD5 ec44802420ceb05b45a849b7b82e2c5b
BLAKE2b-256 cd12873e7b217d0702bb2d25919ae493c7e05ff2b06e9c276cc5652e066709e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d65e07a4319821846a8414ffea2d1aca0f0dff29ec18947ea51815f62201763c
MD5 f95f2257557804dcbd68dc7952c5aaef
BLAKE2b-256 3adcf864d32d3cb4d612c34e876935a3f7e94f2bbc53e3110921f52714be70c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f92232a06d3030a544b063be596824763b253b94c8e0e477fdf1a152233c4e9
MD5 385713e495a0e55a5b6d19cb9897a4b4
BLAKE2b-256 6eda306769802fdcee027db34899c84d390ffa10dff88f6f35ead670b7a52d60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 390276d51809b9fc77187f460be8ac6fef0cf6b874ebabcc0279ddc4af955326
MD5 de120843b3812e1bd2314c86d3bd976a
BLAKE2b-256 827765a4cdd7562acae7b6de8a45f80d52b91304b31db2de3cfced04809746af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.8-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 136805d8dcbe5a06c53f43e25e9df11893d4aaa93264511f56ee83bfcf9d07cf
MD5 938044046d2b9290705bf274f30c2fde
BLAKE2b-256 92df90543be2fef5511864d8eeba54992f2dfe7e259a41be8f4d6be70e622722

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