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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARMv7l

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

verysmolcode-0.9.6-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.6.tar.gz.

File metadata

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

File hashes

Hashes for verysmolcode-0.9.6.tar.gz
Algorithm Hash digest
SHA256 68266921117d7f62588410c4464e00716c3a4811c7915c5efac94f2395b2ec30
MD5 685184d8fd3bdbe4d129870b74bf6d48
BLAKE2b-256 502649167cf3400582d3829469256109285e04f92e9986f0da8709cc58564663

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5567427fd574e30703cab0a1389c209651d3c78aa9fe348a88f4882e7983c906
MD5 43af03dc6a0a7ffda39f4f7c2d5bd427
BLAKE2b-256 89736f31fc38212da9d9230c22439e36cc67b9e98999feed20ec1073dbc6fae3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp313-cp313-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 28d47cf8dfe48a93ecd64f859fab2d4bc85e5405e4fbf0a75a8f21721b2d09db
MD5 c1912f24e28661cafca1d5c33b95fa50
BLAKE2b-256 b20ba3a63c2c6407bdb8becc07a4e13fb59483475836c7b8cb9a0672d364c681

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d0522cecbe70aa066e7db41a6bba0bb8073f62bf462116765f021d8c249d43bd
MD5 0b391dbe05bf800c6689cb319644d1d4
BLAKE2b-256 e755acb330c1fcd5c51129ccb81492dbdf4b6c61b661fda44cdb706d220abb97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c160703ca067b86b771178a013d25802bcf146f651a0947ddded65df1f2e52fa
MD5 ee48e24c524bb0ea26802247d3874caf
BLAKE2b-256 b5c0c373237c461a4fafe08595aa0cf514766cd63da4d2fcab0874292dc7a812

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cee3abdaeca67e71ca57c575ea4754a0f7c917d774a3217a2f61b7f954c078e3
MD5 c342a853d5bf58307c99f63707ec81ac
BLAKE2b-256 7e312a4b93ed8639b675c46a77ae6898388aaca0f039d22637b7f92f032a52c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f2082666cd1c0065c555f6514deffa17f8533d86fdacce7ec88f3399913dbadf
MD5 0d8df8d1828450a99a126ecacfd681c6
BLAKE2b-256 71ac5f2b05e3b9cccfc2dd83962ee870aec8bd622e176587db4091d24978e592

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4c8ecca17bba8bf1410cd1e045f4269596ce0c52a8aa8702ceee053088ef2ab8
MD5 ebe15722cbd4d7f41bcfb68b7ed31710
BLAKE2b-256 4d8b57bfedfbdce7f0f47f0c6fa7cac3831442014988cd150e77db2a08210c06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp312-cp312-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 db07a4cc8cb73dff96dfdb2bd3a1683a14b8b137d478f61970dd95591cd4390d
MD5 b6603f10a3f0e4f3dd7dd60c645841f1
BLAKE2b-256 877ea968ab855e68734788eb4317cda39abf95cb733b1ba7143f76fa5a9a32da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a8d40715aa595461aeee0313df0ac26452a9cd7cdfd050eb618b21d70dfa8425
MD5 a9f253142585bd681bf5126fe8b2d707
BLAKE2b-256 1acb6982ab2aa944dc1f8d7332eb541b6105e41e3295e8d7cd7a957d09574af4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ccb3ff53767e5966dab4a31a2cc1e563f4d7ec1c8243d25496333663189a14e
MD5 bf5313a58e47fc3b4b0356cd593e3970
BLAKE2b-256 bc60a31d487917cf6d98248f8b95345e0470cac13b3f4f95802e64417119fa0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a90bd2ad1aeb2cf6bc6046ceda060a65284da68af5233b65893310b991676292
MD5 8ff8cb4e62d7cd2bb54747b902cad728
BLAKE2b-256 2f3b67b787cbbd2fbdf56c46ac88ec77f2e1f172bd8efd0882e9f2de42fb0452

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 10f5a56c20f1f8ff252789187bf38193988c56e9b4e641889ceb7711a7b75567
MD5 2970a62217d59aa763a38914148718fe
BLAKE2b-256 c389a1634f6e7ee786bae6c75cbab59e1762d15b0737f8b43c354390592acf63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 67ba4d844777369b551b441f3232941a33a8817d8bcbc609cce639931bf92bfe
MD5 79706e5cc286b1e8b7d86b80035b756f
BLAKE2b-256 79ea4626c93bbb84f0eada0b058adbe3e2ea7543f4d3fdfd0ff52f790e869ed3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp311-cp311-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 25243bfccdadf9e5afc3969820eef4bb9ea92d6b7fd38735079299c458f47b87
MD5 9c918a7838346e4ae1f2c2afabd3265f
BLAKE2b-256 9480f441cebd032c6510df905e016af4100ddecd16359d44eb6bc90e2e0feaf4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db45e9d93dead7819320e84dd18291601d59f9739655dff42f70787b3ce13945
MD5 3fe9e56b175a5d793f702d157a9ae6a5
BLAKE2b-256 a05adfe006b25da759ce91dc9b88974f9c194575f70ef10216120b2337b76182

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6faca98cdec28d981d968a4439988bf038077deaee287e4993f0b65ca76251e1
MD5 fb9126223e882095f02f40f4d020aac5
BLAKE2b-256 1a19ce876507c843a41f36050477b91e3a3b6b335aadb41fdfad4fe1740f4612

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 30ea78dd9030d565653bb640f7ea6d71c63499035f11283aa1e31e218c924a37
MD5 bc06537a80030726ffd7b96522662ba6
BLAKE2b-256 3104619e3687b9a61eadda8f034af8c467bd514fe1998c79ab7ee2903edcf80e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for verysmolcode-0.9.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1388c7ac22f6ad614fbc130580454ef3bd2eeb2f337541df3c1cde4559a02970
MD5 3d102be8561eda703eedfd83c6a938e1
BLAKE2b-256 f9b9a366274361bf5cb6eedb743e8bebf7ddee304c0b66d25cdc5394c3724e14

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