CLI Reference
CLI Reference
Complete reference for the Memax CLI. Every command, subcommand, flag, and option.
The Memax CLI (memax-cli) is the primary interface for power users. It's designed to feel like git — composable commands, Unix-friendly (pipes, redirection), fast startup, minimal output.
npm install -g memax-cliCommand overview
Core commands
| Command | Description |
|---|---|
push | Push knowledge to your hub |
recall | Semantic search for relevant memories |
search | Structured search with filters |
sync | Sync a directory with your hub |
Hub management
| Command | Description |
|---|---|
hub create | Create a new hub |
hub list | List accessible hubs |
hub invite | Invite a member |
hub switch | Switch active hub |
Agent tools
| Command | Description |
|---|---|
agents | Manage agent configs and sessions |
hook | Install/manage agent hooks |
mcp | Start/manage MCP server |
Utility
| Command | Description |
|---|---|
login | Authenticate with Memax |
logout | Clear stored credentials |
whoami | Show current user and hub |
config | Get/set configuration values |
list | List memories with filters |
show | Display a specific memory |
delete | Delete a memory |
Global flags
memax [command] [flags]| Flag | Description |
|---|---|
--api-key | API key (overrides OAuth) |
--hub | Target hub ID |
--format json | Output as JSON |
--no-color | Disable colored output |
--debug | Enable debug logging |
--version | Show version |
--help | Show help |
Unix philosophy
The CLI is designed for composability:
# Pipe recall output to clipboard
memax recall "auth design" | pbcopy
# Use in shell scripts
if memax recall "deploy checklist" | grep -q "migration"; then
echo "Don't forget to run migrations"
fi
# Combine with other tools
memax list --format json | jq '.[] | select(.category == "decisions")'JSON output (--format json) is stable and suitable for scripting. Human-readable output may change between versions.