CLI
CLI Overview
The agex CLI connects your local project to the hub — push, pull, and sync agent artifacts from your terminal.
The agex CLI is a Node.js tool that bridges your local project and the agex hub. It handles authentication, artifact discovery, publishing, and syncing — without ever needing to open a browser for day-to-day workflow.
What it does
Discovery agex search, agex info
Core workflow agex init, agex add, agex sync, agex remove, agex clean
Publishing agex push
Auth agex login, agex logout, agex whoamiTypical workflow
First time in a new project:
agex login # authenticate with GitHub (one-time)
agex init # detect stack, generate agex.toml
agex search "next" # find relevant artifacts
agex add @rkrebs/nextjs-claude
agex sync # write files to diskSharing your own configs:
agex push CLAUDE.md # publish a single artifact
agex push . # publish the whole agex.toml projectUpdating existing artifacts:
# After editing locally:
agex push CLAUDE.md --changelog "Add testing conventions"Global options
| Flag | Description |
|---|---|
--json | Output results as JSON (useful for scripting) |
--version | Show CLI version |
--help | Show help |
Environment variables
| Variable | Description |
|---|---|
AGEX_API_URL | Override the API base URL (default: https://agex.dev) |
Set AGEX_API_URL=http://localhost:3000 when developing against a local hub instance.