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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

verysmolcode-0.9.4-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.4.tar.gz.

File metadata

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

File hashes

Hashes for verysmolcode-0.9.4.tar.gz
Algorithm Hash digest
SHA256 7faece4a689017cdf6188db350244801771bfb90ee037cd2a2576fc2755ad28a
MD5 b3b373f4e27598592f15418dfdfbb17c
BLAKE2b-256 aeae82696960b9147d724d6a177448711b633f1f4d429f2380763c02240b5025

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3dc965826e61f8d7410ff87b04fb2f2ead9011b7f064a67fe05bdd740dc8368d
MD5 b7a36bf5c9419a6d38e2de55300483e5
BLAKE2b-256 7f48f0eade5f7981487fdcc1f6bf6ba380092809d6d0367300f9b0ca0ecbcb9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp313-cp313-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 cdd24414fc19fa395949af1a38f9c43c837073aab93941517922238c5f7229fb
MD5 abcd022c82b221116515b812e07f4c7c
BLAKE2b-256 c2ba38ab687a2ababc536a90fa5b8971ccdf37f5deda03de6a0edc3ab45d476b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7810c29909b9542a9b426edeb8c8a3b3cdf388e800553b8a189fe13d607a8d68
MD5 b9fa398b791cfb25e8114ffcc7561d73
BLAKE2b-256 c197108330ef83e846347f88e858e74311df88a884df0c6fa1e089318a6e3f00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 90215e603f5b8c393c0f7b4a1daebe40e2ce8912764986c67b8b7134c8393a5d
MD5 a79cc452775fe6001e19754a11835319
BLAKE2b-256 3a65d2c2b5822d2c71aca0207153eaae1240802ad289186fa73cd7c2e80aaba0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75ae4f81d93fc93ad10a207074b53d3e369e6a1ced90f03e41347712393c62b6
MD5 066c0082aabaa250d97e1b6c3579dbe6
BLAKE2b-256 852cdfd00ed48a95210539cf9895649a70183dba7c3989cfab04209a07cdb554

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a447a4b2a4d7135d9f9ce0068158d740fe10fd6384cc8ccc32beec3f1181a346
MD5 e662897871376843c0d873796c447994
BLAKE2b-256 f84418abf5a0b22e6f88cfc6cfc9adb84e0d0c0998991ffe2298575d607fe317

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e28d710753cb84f57b4175aa7c65621a95f19c49f00e29fcf6b9996506ae151c
MD5 1a1d38952dc63e1870c7c902dbbed08a
BLAKE2b-256 0be335d3f7528fa52313529609c75486e5ada8de1fdb4c90ceac50f40f09577f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp312-cp312-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 a56b813fd3290de5905fc2b7252c7838811ffbbfd4c92e1c831d0bb274a89c1e
MD5 e1da14c546b4e42bbd5de440818b69f0
BLAKE2b-256 090662806201e2302cb30b50b21739a50ab3b79c85b48ac821182a64944e41e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 98c53a2baac6a0c709e57ae64ef8bd8fd182db61ef3903582dff0d587b84bdac
MD5 1957d5e6be0714a8ee0d464b9ab442a6
BLAKE2b-256 525bf448c663a89872ead6114352807561dfd1c4a7a6f6a2a0c48433053b6872

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1dfb6b1b378da6dc464fc32bfbc35d520ab673f9526a9357b9b1715d21f57676
MD5 cea34722e9ac492dfd2ceb3a220b5808
BLAKE2b-256 6c83f1e9db9855ab269fbfc8f0b61275732e7dca6b362b60140a196308f8cc0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b3b13d2f33e8861d7f4831c00339bfef05dfb279e34ccb088aef5112ff7738fa
MD5 99a621897b3fc91159aac9c596dac8d6
BLAKE2b-256 3d9b44309c1794e50cb88c332a07e94d2cd68a5e20b7bdedf70986d145ddcf9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8055a72c3bc2125034b136fe25997d88c61543444150ff1ed7862a0318b0149a
MD5 25abd06adccc6cb0b467b4e71c1e4664
BLAKE2b-256 96e963ff3429b7cd87a4acab22ba805bf82919a87d42eaa2696d96a0068c2f38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c3a91b6c6420710963c9013f87f456ef07dfd97e2abba773ac3ae2d2a80e6e8
MD5 230418f5964d034cfe36eee5b64c86e1
BLAKE2b-256 4c66330b50928df24d94b4a9d686487d01c770221a1da16669914f4cceb7dbb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp311-cp311-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 ec4798330c3f1ae99c5b354f2c64c1cd5160f648e000b9902562aa47ab06bf03
MD5 11c536dee6673ed828a96df16b3e1ca9
BLAKE2b-256 2ce4f22993ad2e7575c332a529c8a210e681f4d50f78686d3d92034095600719

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1b7d69a195fe44ba113313d1226d63b22aee1cb37908ce37f2f7ec025f03320b
MD5 bb28c2dc61c7779fff749e05e730ccb1
BLAKE2b-256 73446367eb8df063b8f94a376df5268871ea29b3d44f2b4faeb66596b19d255f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8645e30f27723d846d0b429d7db872e7525f641068365b45bf538f00cb15d93d
MD5 226d8715c8344c84f7dfc1804850c7c6
BLAKE2b-256 aa94e059789ec32387b78c2d098dd9622c3a6b901de28cb71b5f0260abc40417

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3720186913d7b563d4edb6bf54aa4c60e6c338d581707b96f74b71fe0defc92d
MD5 b52cb4b814343686319473b6e67a2067
BLAKE2b-256 6eed0a32f71899307123c537676e251270dd60d5e5a1934555d96f77f123e8cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0a4e125a84305eb0c73c4f75b0b0f00c46a66abbffe449bd83c1688eabb98d51
MD5 74f609b3ee6aa74395b670d78e28942a
BLAKE2b-256 21bec66f6a34a950b791648e3a5202ff2e5fc65cdc3abe266bbaa7bbb578e039

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