virgil-cli
v0.1.29
Published
A coding agent for your terminal that remembers what it already solved. Same job twice: 0 API calls.
Maintainers
Readme
Virgil
Virgil saves tokens with a shared library. A coding agent for your terminal: before it calls the model, it checks what it — or anyone else — already solved.
npx virgil-cliNo account, no card. 15 free credits. Mac, Linux and Windows, Node 18 or newer.
Why a shared brain
A local agent that learns alone stays dumb: every user repeats the same mistakes, forever. Virgil does the one thing a solo tool can't — it shares generalized solutions through a central library, so the more people use it, the smarter it gets for everyone. That's the deal, stated up front:
- Your machine runs the agent. The network makes it grow.
- The network never gets your files or your API key. It exchanges small, generalized patterns that already proved themselves in three or more projects, plus short learning excerpts (see Learning below), which you can turn off.
- Don't want to contribute learning excerpts?
virgil learn off. Want the model on your own endpoint?virgil brain.
This is a design choice, not a secret. Read on for exactly what leaves your machine.
Why
Every coding agent sends every task to the model. First time, tenth time, same price.
Virgil keeps four local libraries: debug, code, design and speech. Before every task a router checks them:
| Virgil finds… | Cost | |---|---| | a known answer | 0 model calls | | a known pattern | 1 call to adapt it | | nothing | the full chain, then the result is stored |
Every solution that passes its test goes into your library. Blocks that work in three or more projects are generalized and shared through our central library, so new users start with them. The more people use it, the cheaper it gets for everyone.
Two ways to run
Virgil always calls a model. You choose which one:
- Central server (default): our hosted backend, pay per use, 15 credits free. This is also what grows the shared library for every user.
- Your own key:
virgil brainpoints Virgil at OpenAI, Azure or any OpenAI-compatible endpoint — including a local model. Your key stays in your system keychain and never reaches our server.
Either way the shared library works the same. What travels are generalized solutions and short learning excerpts, never whole files and never your key.
Measured
| Task | First time | Next time | |---|---|---| | 55 bugs from HumanEvalFix, then the same bugs renamed and reformatted | 65 calls | 14 calls | | Repairing the same file again | 8 calls | 0 calls | | "build me a stopwatch", new project | 1 call | 0 calls, ~0.5 s | | "build me a stopwatch with pause and resume" | 1 call (does not reuse the old block) | 0 calls |
Not measured yet: how well it transfers to other people's codebases. The router still matches by words, so a new requirement phrased with old words can pick the wrong block.
Try it in 30 seconds
npx virgil-cliin any folder- Ask:
build me a stopwatch with pause and resume - Type
/exit, go to another folder (cd ../mkdir test2 && cd test2), runnpx virgil-cliagain and ask the same thing - Watch the call counter drop to zero
Usage
Started with npx? Then either type npx virgil-cli instead of virgil below, or install it once with npm i -g virgil-cli to get the virgil command.
virgil interactive
virgil "fix the failing test" one task, then exit
virgil credits show your balance
virgil login top up credits
virgil brain connect your own OpenAI-compatible API (virgil brain --off to disconnect)
virgil learn off stop sending learning excerpts (virgil learn on to resume)Inside the session: /help · /auto (act without asking) · /safe (ask first, default) · /credits · /login · /clear · /exit
By default Virgil shows every shell command and file change and waits for y (once) or a (always for this kind of step). --auto skips that. Don't use it in a folder you can't afford to change.
Pricing
- Hosted (default): 1 credit = 1 cent, pay per use. 15 credits free.
- Your own key:
virgil brainconnects OpenAI, Azure or any OpenAI-compatible endpoint. The key stays in your system keychain and never reaches our server. Two days free, then 5 € a month for the shared library.
What leaves your machine
Be exact, so no one has to guess:
- The task: your request and the code the task needs go to the model you picked — our central backend (default), or your own endpoint.
- The shared library: solutions that proved themselves in three or more projects, as small generalized patterns, never whole files. This is what the central server exchanges between users.
- Learning (
/learn): after each turn Virgil sends a short excerpt of the session to our server: the last 22 messages, cut to 220 characters each (your request, Virgil's replies and the start of tool output such as a command result or a file it read). The server turns it into one reusable lesson of at most 200 characters ("this approach worked / failed") and keeps only that lesson. The excerpt itself is not stored. Turn it off any time withvirgil learn offorVIRGIL_NO_LEARN=1. Virgil shows whether learning is on when it starts. - Telemetry: an anonymous device id, OS, architecture, version and a few events (install, first prompt, crash, purchase). No prompts, no code, no file paths.
What we do NOT do
- We never read your files without your task asking for it.
- We never store your code on our server. Learning excerpts are distilled into a one-line lesson and discarded.
- We never run a command on your machine without showing it to you first (
/safeis the default).
Contact
Built by Mustafa, a former hotel chef, on an old MacBook Air. Tell me where it breaks: [email protected] · virgil-ai.cloud/try
MIT License
