CLI
The Gerbil CLI lets you run models, generate text, and manage everything from your terminal, no code required to get started.
Installation
One-off, no install required:
npx @tryhamster/gerbil "Your prompt here"Global install, use gerbil directly:
npm install -g @tryhamster/gerbilgerbil (assumes global install). Use npx @tryhamster/gerbil if not installed.Generate Text
The default command generates text from a prompt:
# Basic usagegerbil "Write a haiku about coding"
# With optionsgerbil "Explain recursion" --model qwen3.5-0.8b --max-tokens 200
# With thinking modegerbil "What is 17 × 23?" --thinking
# Stream outputgerbil "Tell me a story" --stream
# Output as JSONgerbil "Extract the name" --jsonOptions
| Option | Description | Default |
|---|---|---|
-m, --model | Model to use | qwen3.5-0.8b |
-n, --max-tokens | Maximum tokens | 256 |
-t, --temperature | Sampling temperature | 0.7 |
-s, --system | System prompt | - |
--thinking | Enable thinking mode | false |
--stream | Stream output | false |
--json | Output as JSON | false |
REPL (Interactive Mode)
Launch the full interactive REPL with model management, chat, skills, and more:
# Launch REPLgerbil repl
# Or justgerbilSee the REPL documentation for full details.
REPL View Shortcuts
Jump directly to any REPL view:
gerbil chat # Chat viewgerbil skills # Skills viewgerbil tools # Tools viewgerbil model # Model viewgerbil integrate # Frameworks viewgerbil benchmark # Benchmark viewgerbil info # Info viewgerbil serve # Serve viewAll REPL features are available, press Esc to access the main menu.
Interactive Chat
Opens the REPL directly in chat view:
# Start chat (opens REPL in chat view)gerbil chatModel switching, thinking mode, and tool calling are all available inside the REPL, press Esc for the menu.
Text-to-Speech
Generate speech on-device with native Kani-TTS-2:
# Speak text with the default voicegerbil speak "Hello world"
# Adjust speech speed (0.5-2.0)gerbil speak --speed 1.2 "Cheerio!"
# Save to file instead of playinggerbil speak --output hello.wav "Hello world"
# Pick a different TTS modelgerbil speak --model OuteAI/OuteTTS-1.0-0.6B "Hello world"
# List TTS models and voicesgerbil speak --list-modelsgerbil speak --list-voicesSpeech-to-Text
Transcribe audio files on-device with native Moonshine:
# Transcribe audio filegerbil transcribe recording.wav
# Save to filegerbil transcribe recording.wav --output transcript.txt
# Show timestamps for each segmentgerbil transcribe recording.wav --timestamps
# List STT modelsgerbil transcribe --list-modelsVoice Chat
Complete voice conversation loop (STT → LLM → TTS):
# Voice chat from audio filegerbil voice question.wav
# Customize the LLM and STT modelsgerbil voice question.wav --model qwen3.5-0.8b --stt-model whisper-tiny.en
# With custom system promptgerbil voice question.wav --system "You are a pirate!"
# Enable thinking modegerbil voice question.wav --thinkingThis transcribes your audio (Moonshine), generates a response (LLM), and speaks it back (Kani-TTS-2).
Built-in Skills
# Generate commit message from staged changesgerbil commitgerbil commit --type conventional
# Summarize a text filegerbil summarize README.mdgerbil summarize notes.md --length short --format bullets
# Explain codegerbil explain src/index.tsgerbil explain src/utils.ts --level beginner
# Code reviewgerbil review src/index.tsgerbil review src/index.ts --focus security,performanceModel Management
# List available modelsgerbil models
# Search modelsgerbil models --search "qwen"Models download automatically the first time you use them and stay cached on disk. Use gerbil cache and gerbil cleanup to manage disk space.
Server Mode
# Opens REPL Serve view (interactive)gerbil serve
# CLI mode (non-interactive)gerbil serve --http --port 3000 --model qwen3.5-0.8bgerbil serve --mcp --model qwen3.5-0.8bSystem Info
# Opens REPL Info view (interactive)gerbil info
# CLI mode (text output)gerbil info --cligerbil info --cli --model qwen3.5-0.8b
# Benchmark a modelgerbil benchgerbil bench --model qwen3.5-0.8b --runs 5Cache Management
# Show cached models and disk usagegerbil cache
# Remove models older than 7 daysgerbil cache --older-than 7
# Remove all cached modelsgerbil cache --clean
# Show what the cache is holdinggerbil cleanup
# Free the most spacegerbil cleanup --allStructured Output
Generate validated JSON straight from the terminal:
# Generate a JSON objectgerbil object "Extract the name and age: John is 25"
# Validate against required keys (JSON file with { "required": ["name", "age"] })gerbil object --schema shape.json "Extract the name and age: John is 25"
# Retries and samplinggerbil object --retries 2 --temperature 0.3 "List three colors as JSON"Updates
Gerbil checks for updates automatically but never installs without your permission.
REPL
Version shown in header. When update available, press u to update:
Gerbil v1.0.0 · Update v1.0.1 → Press u
# Press 'u'⬇ Updating...✅ Updated! Restart to use v1.0.1CLI
After commands, shows update notification if available:
$ gerbil "Hello"Hello! How can I help you today?
Update available: v1.0.0 → v1.0.1. Run gerbil update.Manual Update Command
Dedicated command with clear progress feedback:
$ gerbil updateℹ Update available: v1.0.0 → v1.0.1⠋ Installing v1.0.1...✔ ✅ Updated to v1.0.1Why no auto-update?
- ✓ User control, never downloads without permission
- ✓ Non-disruptive, background check doesn't block workflow
- ✓ CI/CD safe, won't break automation with surprise updates
- ✓ Bandwidth friendly, only downloads when approved