Install
How athx Fits In
athx is a command-line client for the ATH protocol. It handles key management, attestation signing, credential storage, and all HTTP communication. Each command maps to one step in the ATH flow.Configuration
Full Flow (Gateway Mode)
Full Flow (Native Mode)
Command Reference
| Command | What it does |
|---|---|
discover | Fetch discovery document |
register | Register agent (Phase A) |
authorize | Get authorization URL (Phase B) |
token | Exchange code+session for token |
proxy <provider> <method> <path> | Call API with token |
revoke | Revoke current token |
status | Show saved credentials/tokens |
config init/show/set/set-gateway | Manage configuration |
Common Flags
| Flag | Description |
|---|---|
-g, --gateway <url or name> | Gateway URL or saved name |
-m, --mode <gateway|native> | Deployment mode (default: gateway) |
-s, --service <url> | Service URL (native mode) |
--agent-id <uri> | Override agent identity |
--key <path> | Path to ES256 PEM key |
--format <text|json> | Output format |
--provider <id> | Provider to target |
--scopes <list> | Comma-separated scopes |
--body <json> | JSON body for POST/PUT |
Scripting
Use--format json for machine-readable output:
Where Credentials Are Stored
| File | Contents |
|---|---|
~/.athx/config.json | Gateway names, agent ID, key path |
~/.athx/credentials.json | client_id/secret and tokens per gateway |
athx status -g <gateway> to check what’s stored.