@combinatrix-ai/avm
v0.1.2
Published
A version manager for AI coding agents. Think `nvm` for AI coding agents. **avm** provides reproducible agent execution environments, project-level configuration, and isolated agent runtimes.
Downloads
321
Readme
avm
A version manager for AI coding agents.
Think nvm for AI coding agents. avm provides reproducible agent execution environments, project-level configuration, and isolated agent runtimes.
Features
- Install specific versions of AI coding agents
- Use different agent versions per project
avm.config.jsonproject configuration- Reproducible agent environments under
~/.avm
Supported Agents
- @openai/codex
- @anthropic-ai/claude-code
- @google/gemini-cli
Getting Started
Install the CLI
npm install -g @combinatrix-ai/avmInstalling an Agent
avm install codex # installs latest @openai/codex
avm install [email protected] # installs @openai/[email protected]
avm install claude # installs @anthropic-ai/claude-code
avm install gemini # installs @google/gemini-cli
# override package if needed
avm install codex --package @your-scope/codex-cli
avm install codex --registry https://registry.npmjs.org # custom registryListing Agents
Installed
avm listRemote (including not installed)
avm list --remote # list npm packages of coding agentsUsing an Agent
avm global [email protected] # set global default when no avm.config.json
avm # start default agent (global or from avm.config.json)
avm -v # show avm CLI version
avm self-update # update avm itself via npm -gavm self-update and update checks
avm self-updaterunsnpm install -g @combinatrix-ai/avm@latestunder the hood (or--to <version>for a specific version).avmwill periodically check the npm registry (at most once per day) and print a message if a newer version ofavmis available.- Set
AVM_NO_UPDATE_CHECK=1to disable the automatic update check.
Configuration & state
You configure per-project defaults via avm.config.json, and avm keeps global installation and “current agent” state under ~/.avm.
avm.config.json (project config)
- File name:
avm.config.json - Location: searched from the current directory upward until found; the nearest one wins.
- Purpose: define project-level defaults for which agent to run, which package/version to use, and what default args to prepend.
You can create or update it manually, or via:
avm local [email protected] # writes or updates avm.config.json in this directory
avm local codex -a "--dangerously-bypass-approvals-and-sandbox" # set default args in avm.config.jsonExample avm.config.json:
{
"default": {
"name": "codex"
},
"codex": {
"version": "0.45.1",
"args": "resume"
},
"claude": {
"args": "resume"
},
"gemini": {
"package": "@your-scope/gemini-cli"
}
}avm # Start codex with args provided
avm claude # Start claude with its args from avm.config.jsonWhen you run avm inside the project, it will prefer the agent specified in the nearest avm.config.json.
How it works
- Agents install into
~/.avm/agents/<name>/<version>vianpm install --prefix. - Binaries are resolved from the package
binfield (fallback tonode_modules/.bin/<package>). - State is stored in
~/.avm/state.jsonand updated when youglobalor run an agent.
Files under ~/.avm
Files
~/.avm/agents/<name>/<version>/.meta.json- Written by
avm install <agent>,avm global <agent>, and when running an agent. - Stores installation metadata:
{ name, package, version, args, installedAt }.
- Written by
~/.avm/state.json- Updated by
avm global <agent>and whenever you run an agent viaavm .... - Stores the current agent under
current(plus timestamps and any future state).
- Updated by
What each command updates
avm install <agent>:- Ensures the agent is installed under
~/.avm/agents/<name>/<version>and writes/updates.meta.jsonthere. - Does not modify
~/.avm/state.jsonor anyavm.config.json.
- Ensures the agent is installed under
avm global <agent> [--args "<agent-args>"]:- Ensures the agent is installed and updates the corresponding
.meta.json(includingargswhen provided). - Updates
~/.avm/state.json(thecurrentagent: name, package, version, args). - Does not touch
avm.config.json.
- Ensures the agent is installed and updates the corresponding
avm local <agent> [--args "<agent-args>"]:- Creates or updates
avm.config.json(nearest in the directory tree): sets"default.name"and per-agentversion/args. - Does not install the agent or change
~/.avm/state.jsonor any.meta.json.
- Creates or updates
Resolution rules when running avm
When avm decides what to run, it combines CLI input, project config, and saved state:
- Agent name:
- CLI
<agent>/<agent>@<version>(e.g.avm [email protected]) avm.config.json.default.name(nearest config in the directory tree)~/.avm/state.json.current.name(last used / global default)
- CLI
- Package name:
- CLI
--package avm.config.json["<agent-name>"].package~/.avm/state.json.current.packagefor that agent- Built-in defaults (
codex→@openai/codex, etc.)
- CLI
- Version:
<agent>@<version>in the CLI (e.g.[email protected])avm.config.json["<agent-name>"].version~/.avm/state.json.current.versionfor that agent"latest"
- Default args:
avm.config.json["<agent-name>"].args(project-scoped defaults)~/.avm/state.json.current.args/.meta.jsonfor that agent (set viaavm global <agent> --args "..."or previous runs)- No default args
Default args are prepended to the agent process arguments before any extra CLI arguments you pass after the agent name (e.g. avm codex -- extra flags).
Roadmap
- Optional fully-managed Node runtimes
- Agent marketplace / registry
- Lockfile for full reproducibility
- Agent diff / compare functionality
Development & Release
Basic release flow (handled by GitHub Actions):
Make code changes and ensure tests pass:
npm testBump the version with npm (do not edit
package.jsonmanually):npm version patch # or: minor / majorThis updates
package.json, creates a commit, and tagsvX.Y.Z.Push the branch and tags:
git push origin main --follow-tagsThe
Publish Packageworkflow (triggered by thev*tag) runs tests and publishes@combinatrix-ai/avmto npm.
Avoid running npm publish locally; prefer the CI-based publish flow above.
