agex.dev
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 whoami

Typical 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 disk

Sharing your own configs:

agex push CLAUDE.md          # publish a single artifact
agex push .                  # publish the whole agex.toml project

Updating existing artifacts:

# After editing locally:
agex push CLAUDE.md --changelog "Add testing conventions"

Global options

FlagDescription
--jsonOutput results as JSON (useful for scripting)
--versionShow CLI version
--helpShow help

Environment variables

VariableDescription
AGEX_API_URLOverride the API base URL (default: https://agex.dev)

Set AGEX_API_URL=http://localhost:3000 when developing against a local hub instance.

On this page