Commands
Full reference for every agex CLI command.
agex init
Detect your project's tech stack and generate an agex.toml manifest.
agex initThe CLI inspects your package.json, lock files, config files, and directory structure to determine which agentic tools you use and what your stack looks like, then writes a starter agex.toml.
agex search
Search the hub for artifacts.
agex search <query>
agex search "next.js clerk"
agex search "mcp postgres"Results show the artifact reference, type, vote count, and description.
agex info
Show details for a specific artifact.
agex info @username/slug
agex info @rkrebs/nextjs-claudeDisplays title, type, category, tags, version count, vote count, and the artifact content.
agex add
Add a hub artifact to agex.toml and immediately sync it to disk.
agex add @username/slug
agex add @rkrebs/nextjs-claude
agex add @rkrebs/nextjs-claude@2 # pin to a specific versionThis is equivalent to manually adding the entry to agex.toml and then running agex sync. The artifact files are written to disk according to the placement rules.
agex sync
Fetch all remote artifacts listed in agex.toml and write them to disk.
agex sync- Downloads each artifact from the hub
- Writes files according to platform placement rules
- Merges JSON-type artifacts (MCP servers, hooks) without overwriting existing entries
- Skips
local:references (those are only synced onagex push .)
Run this after cloning a repo that has an agex.toml, or after manually editing the manifest.
agex remove
Remove an artifact from agex.toml and delete its materialized files from disk.
agex remove @username/slug
agex remove @rkrebs/nextjs-claudeFor merge-json artifacts (MCP servers, hooks), only the entries tagged with that artifact's ref are removed — other entries in the same file are preserved.
agex clean
Remove all files that were materialized by agex sync, without modifying agex.toml.
agex cleanUseful for resetting your workspace before a fresh agex sync, or for removing artifacts that are no longer tracked.
agex push
Publish a file as an artifact, or push your entire agex.toml as a project.
Push a single artifact
agex push <file>
agex push CLAUDE.md
agex push .claude/skills/deploy/SKILL.mdThe CLI auto-detects the artifact type from the filename:
| Filename pattern | Detected type |
|---|---|
CLAUDE.md | claude-md |
.cursorrules / *cursorrule* | cursorrules |
AGENTS.md | agents-md |
*copilot* | copilot |
*skill* | skill-action |
*mcp* | mcp-server |
*hook* | hook |
If the type can't be detected, you'll be prompted interactively.
Options:
| Flag | Description |
|---|---|
--title <title> | Artifact title (used as the slug) |
--description <desc> | Short description |
--type <type> | Override detected artifact type |
--category <cat> | Override detected category |
--tag <tags> | Stack tags, comma-separated (e.g. nextjs,typescript) |
--tool <tools> | Tool tags, comma-separated (e.g. claude-code,cursor) |
--changelog <msg> | Changelog message when updating an existing artifact |
If the artifact already exists (matched by slug), it is updated — a new version is created.
Push a directory (multi-file artifact)
agex push ./my-skill/
agex push ./my-skill/ --title "My MCP Skill" --type skill-actionWhen the path is a directory, the CLI:
- Walks the tree (skipping
.git,node_modules,__pycache__, etc.) - Reads all text files
- Bundles them as a multi-file artifact
- The primary file is the first
.mdfound (or configurable via prompts)
Push a project
agex push .Pushes the current directory as a project using agex.toml. The CLI:
- Uploads any
local:file references as artifacts (creating or updating them) - Creates or updates the project on the hub
- Links all artifact refs (both remote and newly pushed local) to the project
agex run
Fetch an artifact and output its content to stdout. Designed for piping into agents.
agex run <ref>
agex run @community/go-refactoring
agex run @user/mcp-builder --version 2Options:
| Flag | Description |
|---|---|
--version <n> | Use a specific version |
--file <path> | Output a specific file from a multi-file artifact |
--all | Output all files concatenated with path headers |
--no-header | Skip the header comment, output raw content only |
Examples:
# Pipe a skill into Claude Code
agex run @community/go-refactoring | claude -p "refactor this file"
# Output a specific file from a multi-file artifact
agex run @user/mcp-builder --file scripts/eval.py
# Output all files
agex run @user/mcp-builder --all | claude -p "review this skill"
# Raw output without header
agex run @user/config --no-header > CLAUDE.mdWhen piped (stdout is not a TTY), agex run outputs a lightweight header comment followed by the content. In interactive mode, it shows formatted output with tips.
agex status
Show the status of your agentic coding environment — which artifacts are synced, which are outdated, which have missing files.
agex statusOutput:
agex status
Project: my-app
Platforms: claude-code, cursor
✓ rules/nextjs @rkrebs/nextjs-rules v3
⚠ skills/mcp-builder @anthropic/mcp-builder v2 (v3 available)
✗ hooks/lint @company/eslint-hook v1 — files missing, run agex syncagex update
Check for and apply updates to all artifacts in your agex.toml.
agex update # update all to latest
agex update --check # dry run — show what would update
agex update @user/slug # update a specific artifactRespects pinned versions — artifacts with @3 won't be updated past v3. Shows changelogs for each update.
agex login
Authenticate with GitHub via device flow.
agex loginPrints a code, opens GitHub in your browser, and waits for you to authorize. No tokens to manage — the session is stored at ~/.config/agex/auth.json.
agex logout
Clear your local authentication session.
agex logoutagex whoami
Show the currently authenticated user.
agex whoami