1.6 KiB
1.6 KiB
name, description
| name | description |
|---|---|
| agentmail-shared | agentmail CLI: Shared patterns for authentication, global flags, and output formatting. |
agentmail — Shared Reference
Authentication
- BearerAuth (bearer token):
AGENTMAIL_API_KEYenv var or keyringagentmail:BearerAuth(populated byauth login) - TokenAuth (bearer token):
AGENTMAIL_TOKENenv var or keyringagentmail:TokenAuth(populated byauth login)
These are alternative schemes for the same request — set one of:
export AGENTMAIL_API_KEY="<your-token>"
export AGENTMAIL_TOKEN="<your-token>"
Verify authentication resolves:
agentmail auth status
Global Flags
These flags are available on every command in this CLI.
| Flag | Description | Default |
|---|---|---|
--dry-run |
Validate locally without sending the request | |
--format <FMT> |
Output format: json, table, yaml, csv, raw, jsonl, http |
table on a TTY, json when piped |
--base-url <URL> |
Override the API base URL | |
--params <JSON> |
URL/query/path parameters as JSON | |
--json <JSON> |
Request body for POST/PATCH/PUT | |
--no-retry |
Disable retries | |
--no-extract |
Print the full response body |
Output Formatting
# JSON (default)
agentmail <resource> <method> --format json
# Table view
agentmail <resource> <method> --format table
# Pipe-friendly: jq, grep, etc.
agentmail <resource> <method> | jq '.fieldName'
Dry Run
Use --dry-run to preview the HTTP request without sending it:
agentmail <resource> <method> --dry-run