troxy-cli
v1.8.3
Published
AI payment control — protect your agent's payments with policies
Maintainers
Readme
troxy-cli
The official Troxy CLI — onboard AI agents, manage MCPs and policies from the terminal.
Prerequisites
Node.js 18+ is required. Run node -v — if you get a version, skip this.
Amazon Linux / RHEL / CentOS
curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
sudo yum install -y nodejsUbuntu / Debian
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt-get install -y nodejsmacOS
brew install nodeAny system (nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install --ltsVerify: node --version and npx --version should both return a version.
Install
npm install -g troxy-cliOr run without installing:
npx troxy-cli <command>Commands
| Command | Description |
|---------|-------------|
| troxy init | Connect an agent to Troxy — validates API key, sets agent name, patches MCP configs |
| troxy login | Start a 12-hour CLI session (opens browser → copy code → paste into terminal) |
| troxy mcps | List connected MCP agents and their status |
| troxy policies | List and manage policies |
| troxy activity | View recent transaction audit log |
| troxy insights | Spending stats and decision breakdown |
| troxy status | Show connection status and account overview |
How it works
- User runs
troxy init --key txy-...in their agent project - CLI validates the key against
api.troxy.io, prompts for agent name - Writes a
.troxy/config.jsonto the project directory - Agent uses the config to call
/evaluatebefore every payment
MCP Server
The CLI also ships an MCP server (src/mcp-server.js) that exposes Troxy as a tool for Claude and other MCP-compatible agents.
Auth flow
troxy login uses a device-code flow:
- Opens your browser to the Troxy login page
- You log in and copy the code shown on the page
- Paste the code into the terminal
- Stores the JWT locally for 12 hours
Stack
- Node.js 18+ (ESM)
- Zero runtime dependencies except
@modelcontextprotocol/sdk - Published to npm as
troxy-cli
Related repos
| Repo | Description | |------|-------------| | troxy-tf-live | Backend API the CLI talks to | | troxy-dashboard | Web dashboard alternative |
