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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

verysmolcode-0.9.5-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.5-cp313-cp313-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

verysmolcode-0.9.5-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.5-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

verysmolcode-0.9.5-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.5-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

verysmolcode-0.9.5-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.5.tar.gz.

File metadata

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

File hashes

Hashes for verysmolcode-0.9.5.tar.gz
Algorithm Hash digest
SHA256 b70b41d0ba9d9bd1ec8ad92be4a7b30f961e60e664d88f6e6f35a9e5534e4a28
MD5 57beb0e6083b62bf856c1f712b2a5255
BLAKE2b-256 7d10eb59b5713267cfc607ca5e1c0c2975490b0dc9a04763cc22c6b870773bce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 47385f28fa22579ba1bfbdf7fa023c5cad2377fd8e93ca9406458b63228f15cd
MD5 2724571e2177d2853f32f1aa72f88da0
BLAKE2b-256 fa8dfb7978d14f113bd2cf98015b97816eea661016f9cb4d4bc217e45097b052

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp313-cp313-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 27c8e2036035de76839b13535c51839d44bf86232b2dccded83a0c881bf8ed8d
MD5 d1896d0159a104acd0bf8bc4eca700b5
BLAKE2b-256 d32935be1add7795a39829a00f63973491c98a5b37cbca304104ddcafd9efb51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 61d66dc89bd72362eb0e0802462159d5ecfb9c714a6aa8eef386207639d76f01
MD5 69bbcd59811e9bea8d532b34e5acd8d8
BLAKE2b-256 47792af9e21882e5bdcd84ea9d105d9c6736a5a08e2e07d18b0c9a2ae642334e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c93812cb34e379036bcb5fe9535a8efa958e9d5e334665c9e1e9cabf45d69ac4
MD5 ec403074dbc868b5b8d4b2d4b37f537e
BLAKE2b-256 7ad58d3346ffecd10df01fd0a73a3b60aaee967609778babdada4582da56913a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 242e625c92f21df43c12b6ad1f56e02ed0ef86b873c99f6fd8b8321a7478d1a0
MD5 c84ed3c920409cb4a47acb24707509d9
BLAKE2b-256 263d3b94b453a4ffa322204ccb1676bdffa7f23b5ee3c3098bbf5c38636112ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e063fc1bf50c908917b1a1f9f2b8517274e5996b24aaef9143f04f51c3bc8d0a
MD5 0e18c7498166949cf0b67f06d147fb33
BLAKE2b-256 fef6516c2fbb511e7f7c4664c6e422b80a9c80046de62b113462c1425f0dab98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a7e07fc160068e07cb337bc2b21765deb948cbd6aa972ce13cfe08dd0295fe90
MD5 2b6862c1cfc09636e99cd1046590e7ea
BLAKE2b-256 dae3991cee56f5241f1443ea3702b4219ef6ef476ca03688d35d992bf02e014a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp312-cp312-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 99b16d1bd1c0af3044bf9ea5df79717d23e96a2b7332efc99abd86bd73269a41
MD5 56f5b8dadd792f88d9db3510c7e4560b
BLAKE2b-256 07e9ff90ce22f8f0a67131b11828a22c4a37d811116e3e8383a464bed3aafbcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db76a668db79a5890932b0d73b4b93862dbe558f0a23e7de3098bbaa2359a4d0
MD5 20fc69761e2d33748602d649662c36fe
BLAKE2b-256 5e45c3fc12435ee2300cf644cc9ad52c07ed2089629741f4429b6b88c4c593e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 977bacc2adb17b3e76fd0826e45e68df1893d86cc369ffe6b0745d889d702369
MD5 c442139d2116de34485a5a0f6688d0d2
BLAKE2b-256 d1e7f781e3cf4e9d04d0bb613fba785be362e202f5ea9aa322593b5ce994d3a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e85d6f1d0c01a794098a62a17c9026785558d490abc91b991e6c0898ed8eaa3
MD5 3f47a8dfd8a19f33a4aa303762f3fbdb
BLAKE2b-256 6ac7266d53b3e8dd8090bf9a4e1bb0ee91cee02df2d520ba9718eb49ac4fbd85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a43b3477ce854d773fc91eb20d2ee095fd7a5772a04f58aab7f1370c5515a990
MD5 c4521d553a7aa4d72cbddc0eab23cc8e
BLAKE2b-256 8471f3096e8902dbf2f35e4270bcae7cca163fa1b590faa1395cb19242d9a848

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1d7c198be9db13c02b63fc7abbf75e3273cce7da144309214ddc98c174510c00
MD5 bc846910ed19f781fc9a37be301eb32b
BLAKE2b-256 c51e6a7ffae148aa1eeb9fb1b173150694eba1dc0e40f970cd751b9ea4fdad4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp311-cp311-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 7e463930787013875f08b77050cb9a1aab5b5a8739eeb9e1aa6bf80354a81e43
MD5 25ada48070f5ddaaa720a582f73ea366
BLAKE2b-256 416cafdbb58f55a96c577f1cef65e2453d77ce698f4d4d9135689eca0e280853

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3f3d21fe09cf3b499412581c802f42536b0482d541efa4d08b2a0e5de4fbfc51
MD5 65329e866c3a6981fd17e09ea3584ad7
BLAKE2b-256 944decf76b76927fc4c4de3dfbd2185e236e49623449d68c41097fbeff7e0e2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9cab121d48a61c41d1afbb7139fc2a674bd7e65f74c4f166c52194c4f4292c7
MD5 306e141cbbff347eaa821c312477169e
BLAKE2b-256 f156f75d88cd4d7c357dfa641c46dc8af284d82ee78f9432564fafcd2b53de0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c429f8e7c400f8689a1983310a9173ba69442309f982d336f18d1c20a1d021f6
MD5 e7628498dcc6d2971ff1bc8accaba1cf
BLAKE2b-256 1c68aaeb173e23104c344989fc331f6b763988cf761e10842829f426844c6fc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dc45bb60e7c262f7185f252cd2c26a9d34da333ed786d19067bdd07bc2f6058d
MD5 a10f05a2e354336b85b7596e9221269a
BLAKE2b-256 de4db732e2dd121f09269e475010a119d46bed41560f357760d2ad34da10acf3

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