PURECORTEX CLI
The PURECORTEX CLI (pcx) is the operator-friendly wrapper around the same live API used by the SDKs. It is useful for smoke checks, governance inspection, agent debugging, and chat-session bootstrap without writing custom scripts.
Installation
Requires Python 3.10+
Option A: pipx
brew install pipx
pipx ensurepath
pipx install "git+https://github.com/chaosoracleforall-agent/purecortexai.git#subdirectory=cli"
Option B: From source
git clone https://github.com/chaosoracleforall-agent/purecortexai.git
cd purecortexai/cli
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Verify the installation:
pcx info
macOS 15+ uses an externally-managed Python. Prefer
pipxor a virtual environment instead of systempip install.
Configuration
Optional environment variables:
export PURECORTEX_API_URL=https://purecortex.ai
export PURECORTEX_API_KEY=ctx_your_key
PURECORTEX_API_KEY is required only for authenticated commands like pcx chat and pcx session.
Health & Protocol
status
Check backend health plus Redis, orchestrator, and agent loop status.
pcx status
Example output:
╭──────────────────── PURECORTEX Status ────────────────────╮
│ Backend Online │
│ Version: 0.7.0 │
│ Overall status: ok │
│ Redis: connected │
│ Orchestrator: initialized │
│ Agent loop: running │
╰───────────────────────────────────────────────────────────╯
info
Print the canonical testnet protocol identifiers and public URLs.
pcx info
supply
Show the current CORTEX supply breakdown.
pcx supply
treasury
Print treasury balances and revenue split data.
pcx treasury
burns
Show buyback-burn history.
pcx burns
agents
List the registered protocol agents and their current status.
pcx agents
activity
Show recent activity for one protocol agent.
pcx activity senator
pcx activity curator
pcx activity social
Authenticated Chat
chat
Chat with a protocol agent over the authenticated REST API.
export PURECORTEX_API_KEY=ctx_your_key
pcx chat senator
session
Create a short-lived WebSocket session token from the current API key.
export PURECORTEX_API_KEY=ctx_your_key
pcx session
This is useful when you want to debug the raw WebSocket flow manually or hand a short-lived token to a separate client.
Governance
overview
Show high-level governance counters.
pcx overview
proposals
List governance proposals from the backend governance API.
pcx proposals
proposal
Show the full details for a single proposal.
pcx proposal 3
constitution
Display the current constitution preamble.
pcx constitution
Current Commands
pcx statuspcx infopcx supplypcx treasurypcx burnspcx agentspcx activity <agent>pcx chat <agent>pcx sessionpcx overviewpcx proposalspcx proposal <id>pcx constitution
Notes
- Read-only commands use public endpoints.
pcx chatandpcx sessionrequirePURECORTEX_API_KEY.- The CLI reads canonical testnet identifiers from
deployment.testnet.jsonwhen available. - The CLI package now includes its own
README.md, which makes editable installs and future packaging much more reliable.