CLI Reference¶
The axl command-line tool ships with axl-core. All five commands are documented below.
Installation¶
The axl binary is added to your PATH automatically.
Commands¶
axl parse¶
Parse a raw AXL packet and display its structure.
Output:
Packet
Header
Domain: OPS
Tier: 3
Fields
[0] cpu_high
[1] node-7
[2] threshold=90
Flags
[0] ALERT
[1] ROUTE
With preamble elements:
Output:
Packet
Preamble
Rosetta: ipfs://Qm.../rosetta.axl
Timestamp: 1711234567
Header
Domain: SIG
Tier: 2
Fields
[0] breach
[1] zone-3
Flags
[0] ALERT
axl validate¶
Validate a packet for syntactic and semantic correctness.
Output:
Invalid packet:
Output:
Valid: false
Domain: BOGUS
Tier: 99
Errors:
- Unknown domain: BOGUS
- Tier out of range: 99 (must be 1-5)
Warnings: []
With strict mode:
Output:
axl translate¶
Translate an AXL packet to English or JSON.
Translate to English¶
Output:
Translate to JSON¶
Output:
{
"domain": "OPS",
"tier": 3,
"fields": [
"cpu_high",
"node-7",
"threshold=90"
],
"flags": [
"ALERT"
],
"timestamp": null,
"rosetta": null,
"payment": null
}
axl emit¶
Construct and emit a new AXL packet from parameters.
axl emit --domain SIG --tier 3 --fields "intrusion_detected,sector-4,confidence=0.97" --flags "ALERT,ESCALATE"
Output:
With timestamp and nonce:
axl emit --domain OPS --tier 2 --fields "deploy_complete,service=api-v3" --flags "ACK,LOG" --timestamp --nonce
Output:
With payment proof:
axl emit --domain PAY --tier 1 --fields "invoice_settled,amount=500,currency=USDC" --flags "ACK" --payment "0xabc123:sig_def456:21000"
Output:
axl version¶
Print the installed version.
Output:
Exit Codes¶
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Invalid packet / parse error |
2 |
Validation failure |
3 |
Unknown command or flag |
Environment Variables¶
| Variable | Description | Default |
|---|---|---|
AXL_STRICT |
Enable strict validation globally | false |
AXL_OUTPUT |
Default output format (text/json) |
text |
AXL_NO_COLOR |
Disable colored terminal output | false |