Package Exports
- @trymesh/cli/dist/local-tools.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@trymesh/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Terminal-first AI engineering agent. Zero-config, 11 models, browser-based sign-in.
Website · Docs · Quickstart · Benchmarks
Install
npm install -g @trymesh/cli
mesh login
meshmesh login opens a browser and hands the session back to your terminal. No API keys to copy, no config to edit. The shared Mesh gateway routes to Gemini 3.5 Flash by default; switch models with /model.
Requires Node.js 20 or newer.
Why Mesh
Mesh is built to prove its work, not perform it.
- Required-verify gate — every code change is followed by the exact test or typecheck command extracted from your
package.json. If the command doesn't exit 0, the turn fails. No "tests pass" without a passing command. - Anti-thrash hard-block — after three consecutive edits without a passing verify, write tools are rejected until the agent runs the verify and reports back. Stops the failure spiral that comes from blindly editing more.
- Adaptive scaffolding — every prompt is classified into a tier (trivial / small / complex). Trivial requests get a 900-byte system prompt and a four-step budget. Complex refactors get the full toolkit: workflow state machine, evidence ledger, full AST capsule with reverse-index, ensemble sampling. Same agent, right gear for the job.
- AST-precise capsules — for TypeScript and JavaScript, capsules are extracted with ts-morph (exports, generics, JSDoc, imports). Python, Rust, and Go use structured regex. Capsules are cached in
.mesh/capsules/v1/and invalidated viafs.watchon source changes. - Task memory — fingerprints similar past tasks and surfaces which tools succeeded vs failed before, so the same trap doesn't get walked into twice.
Models
Default: Gemini 3.5 Flash. Switch any time with /model inside the CLI or --model <alias> from the shell.
| Provider | Model | CLI alias |
|---|---|---|
| Google (Vertex) | Gemini 3.5 Flash | gemini-3.5-flash |
| Google (Vertex) | Gemini 3.1 Pro Preview | gemini-3.1-pro |
| Google (Vertex) | Gemini 2.5 Pro | gemini-2.5-pro |
| xAI (Vertex) | Grok 4.20 Reasoning | grok-reasoning |
| xAI (Vertex) | Grok 4.20 Non-Reasoning | grok |
| Z.ai (Vertex) | GLM 5 | glm-5 |
| Moonshot (NVIDIA NIM) | Kimi K2.6 | kimi |
| DeepSeek (NVIDIA NIM) | DeepSeek V4 Pro | deepseek |
| Qwen (NVIDIA NIM) | Qwen 3 Coder | qwen |
| Meta (NVIDIA NIM) | Llama 4 | llama |
| OpenAI (NVIDIA NIM) | GPT-OSS 120B | gpt-oss |
All eleven are reachable through the Mesh gateway after mesh login. No personal API keys required.
Usage
# Interactive REPL in your project
mesh
# Sign in (opens a browser, hands the session back to the terminal)
mesh login
# Check who you're signed in as
mesh whoami
# One-shot turn from the shell
mesh "explain how the cost router decides between models"
# Force a model for this run only
mesh --model gemini-2.5-pro "refactor invoice.ts to use async/await"
# Inspect tier + capsule + system prompt without spending a token
mesh scaffold inspect "rename Status to JobState across all files"
# Health check
mesh doctorInside the REPL, /help lists every slash command. Highlights:
/model— switch models from a picker/index— rebuild the workspace capsule cache/voice— enable voice input/output/usage— current session token + cost totals/dashboard— open the live supervision view in a browser/exit— close cleanly
Adaptive scaffolding
Mesh classifies every turn into one of three tiers and only spins up the machinery that tier needs.
| Tier | When it fires | What's active |
|---|---|---|
| trivial | ≤ 2 files, ≤ 300 LOC, QA or single-edit intent | Minimal system prompt (~900 bytes), no capsule, no workflow state, 4-step budget |
| small | ≤ 10 files, single-intent task | Compact path+signatures capsule, evidence ledger in memory, 8-step budget |
| complex | Refactor, ship, risk=high, or ≥ 8 files | Full capsule with reverse-index, workflow state machine, edit-session tracking, 18-step budget, optional ensemble sampling |
Preview the tier decision for any prompt without spending a token:
mesh scaffold inspect "fix the null deref in parse.ts" --capsule --system-promptForce a tier for power-user sessions:
MESH_FORCE_TIER=complex meshConfiguration
Mesh works out of the box. Override any of these with environment variables:
# Force a default model
export MESH_MODEL_ID=google/gemini-2.5-pro
# Force a scaffolding tier
export MESH_FORCE_TIER=complex
# Ensemble sampling (1-3 samples, picks the best)
export MESH_ENSEMBLE_SIZE=2
# Cap session cost in USD — BudgetExceededError fires above this
export MESH_MAX_COST_USD=1.00
# Hide the per-turn cost footer
export MESH_HIDE_COST=1
# Skip the browser flow during `mesh login`, fall back to password prompt
export MESH_AUTH_NO_BROWSER=1Bring-your-own keys (bypasses the shared gateway):
export GOOGLE_API_KEY=your_key # Gemini direct
export NVIDIA_API_KEY=your_key # NVIDIA NIM directBenchmarks
The bench suite ships with the package under apps/cli/bench/.
# Deterministic compression bench — no LLM, no auth
node $(npm root -g)/@trymesh/cli/bench/static-bench.mjs
# Live bench against Vertex AI Gemini (requires `gcloud auth application-default login`)
node $(npm root -g)/@trymesh/cli/bench/llm-bench.mjsCurrent floors on the live CLI source tree (151 files):
| Tier | Capsule compression vs raw |
|---|---|
| trivial (system prompt only) | ~900 bytes |
| small (compact capsule) | ~39× |
| complex (full capsule) | ~21× |
Reproducible: same files in, same numbers out. Full methodology in apps/cli/bench/README.md.
License
Proprietary — © Edgar Baumann. All rights reserved.
For licensing inquiries: edgar.baumann@try-mesh.com