Command-line interface for the Authlete API.
Authlete API: Welcome to the Authlete API documentation. Authlete is an API-first service where every aspect of the platform is configurable via API. This documentation will help you authenticate and integrate with Authlete to build powerful OAuth 2.0 and OpenID Connect servers.
At a high level, the Authlete API is grouped into two categories:
- Management APIs: Enable you to manage services and clients.
- Runtime APIs: Allow you to build your own Authorization Servers or Verifiable Credential (VC) issuers.
Authlete is a global service with clusters available in multiple regions across the world:
- πΊπΈ US:
https://us.authlete.com - π―π΅ Japan:
https://jp.authlete.com - πͺπΊ Europe:
https://eu.authlete.com - π§π· Brazil:
https://br.authlete.com
Our customers can host their data in the region that best meets their requirements.
All API endpoints are secured using Bearer token authentication. You must include an access token in every request:
Authorization: Bearer YOUR_ACCESS_TOKEN
Authlete supports two types of access tokens:
Service Access Token - Scoped to a single service (authorization server instance)
- Log in to Authlete Console
- Navigate to your service β Settings β Access Tokens
- Click Create Token and select permissions (e.g.,
service.read,client.write) - Copy the generated token
Organization Token - Scoped to your entire organization
- Log in to Authlete Console
- Navigate to Organization Settings β Access Tokens
- Click Create Token and select org-level permissions
- Copy the generated token
β οΈ Important Note: Tokens inherit the permissions of the account that creates them. Service tokens can only access their specific service, while organization tokens can access all services within your org.
- Never commit tokens to version control - Store in environment variables or secure secret managers
- Rotate regularly - Generate new tokens periodically and revoke old ones
- Scope appropriately - Request only the permissions your application needs
- Revoke unused tokens - Delete tokens you're no longer using from the console
Verify your token works with a simple API call:
curl -X GET https://us.authlete.com/api/service/get/list \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"If you're new to Authlete or want to see sample implementations, these resources will help you get started:
If you have any questions or need assistance, our team is here to help:
curl -fsSL https://raw.githubusercontent.com/authlete/authlete-cli/main/scripts/install.sh | bashiwr -useb https://raw.githubusercontent.com/authlete/authlete-cli/main/scripts/install.ps1 | iexbrew install authlete/tap/authleteAlternatively, install directly via Go:
go install github.com/authlete/authlete-cli/cmd/authlete@latestDownload pre-built binaries for your platform from the releases page.
Shell completions are available for Bash, Zsh, Fish, and PowerShell.
# Add to ~/.bashrc:
source <(authlete completion bash)
# Or install permanently:
authlete completion bash > /etc/bash_completion.d/authlete# Add to ~/.zshrc:
source <(authlete completion zsh)
# Or install permanently:
authlete completion zsh > "${fpath[1]}/_authlete"authlete completion fish | source
# Or install permanently:
authlete completion fish > ~/.config/fish/completions/authlete.fishauthlete completion powershell | Out-String | Invoke-Expressionauthlete service get --bearer 'Bearer test_token' --service-id '<id>'
Authentication credentials can be configured in four ways (in order of priority):
Pass credentials directly as flags to any command:
authlete --bearer <value> <command> [arguments]Set credentials via environment variables:
| Variable | Description |
|---|---|
AUTHLETE_BEARER |
Authenticate every request with a Service Access Token or Organization Token. |
Set the token value in the Authorization: Bearer <token> header. |
Service Access Token: Scoped to a single service. Use when automating service-level configuration or runtime flows.
Organization Token: Scoped to the organization; inherits permissions across services. Use for org-wide automation or when managing multiple services programmatically.
Both token types are issued by the Authlete console or provisioning APIs. |
Credentials are stored securely in your operating system's keychain when you run:
authlete configureSecret credentials (tokens, API keys, passwords) are automatically stored in:
- macOS: Keychain
- Linux: GNOME Keyring / KWallet (via D-Bus Secret Service)
- Windows: Windows Credential Locker
If no keychain is available (e.g., in CI environments), credentials fall back to the config file.
Run the interactive configure command to store non-secret settings:
authlete configureConfiguration is stored in ~/.config/authlete/config.yaml.
Available commands
get- Get Servicelist- List Servicesupdate- Update Servicedelete- Delete Service β‘get-configuration- Get Service Configuration
get- Get Clientlist- List Clientscreate- Create Clientupdate- Update Clientupdate-form- Update Clientdelete- Delete Client β‘
update-lock-flag- Update Client Lockrefresh-secret- Rotate Client Secretupdate-secret- Update Client Secretlist-authorized-applications- Get Authorized Applicationslist-authorized-applications-post- Get Authorized Applicationslist-authorizations- Get Authorized Applications (by Subject)update-authorizations- Update Client Tokensrevoke-client-tokens- Delete Client Tokensrevoke-client-tokens-post- Delete Client Tokensdelete-authorizations- Delete Client Tokens (by Subject)get-granted-scopes-for-client- Get Granted Scopesget-granted-scopes-for-client-post- Get Granted Scopesget-granted-scopes- Get Granted Scopes (by Subject)delete-granted-scopes-for-client- Delete Granted Scopesdelete-granted-scopes- Delete Granted Scopes (by Subject)get-requestable-scopes- Get Requestable Scopesupdate-requestable-scopes-post- Update Requestable Scopesupdate-requestable-scopes- Update Requestable Scopesdelete-requestable-scopes- Delete Requestable Scopes
process-request- Process Authorization Requestfail- Fail Authorization Requestissue- Issue Authorization Response
get-ticket-info- Get Ticket Informationupdate-ticket- Update Ticket Information
create- Process Pushed Authorization Request
reissue-id-token- Reissue ID Tokenlist- List Issued Tokenscreate- Create Access Tokenupdate- Update Access Tokendelete- Delete Access Tokenrevoke- Revoke Access Token
process- Process Introspection Requeststandard-process- Process OAuth 2.0 Introspection Request
process- Process Revocation Request
process-request- Process Grant Management Request
service-jwks-get-api- Get JWK Set
process-authentication- Process Backchannel Authentication Requestissue- Issue Backchannel Authentication Responsefail- Fail Backchannel Authentication Requestcomplete- Complete Backchannel Authentication
authorization- Process Device Authorization Requestverification- Process Device Verification Requestcomplete- Complete Device Authorization
jose-verify-api- Verify JOSE
configuration- Process Entity Configuration Requestregistration- Process Federation Registration Request
create- Create Security Keydelete- Delete Security Keyget- Get Security Keylist- List Security Keys
get-metadata- Get Verifiable Credential Issuer Metadataget-jwt-issuer- Get JWT Issuer Informationget-jwks- Get JSON Web Key Setcreate-offer- Create Credential Offerget-offer-info- Get Credential Offer Informationparse- Parse Single Credentialissue- Issue Single Credentialbatch-parse- Parse Batch Credentialsbatch-issue- Issue Batch Credentialsdeferred-parse- Parse Deferred Credentialdeferred-issue- Issue Deferred Credential
get-api-lifecycle-healthcheck- Health Check
Operations that accept a request body support three input methods, with a clear priority chain:
authlete <command> --name "Jane" --age 30Provide the entire request body as a JSON string:
authlete <command> --body '{"name": "John", "age": 30}'Individual flags override --body values:
# Result: {name: "Jane", age: 30}
authlete <command> --body '{"name": "John", "age": 30}' --name "Jane"Pipe JSON into any command that accepts a request body:
echo '{"name": "John", "age": 30}' | authlete <command>Individual flags override stdin values:
# Result: {name: "Jane", age: 30}
echo '{"name": "John", "age": 30}' | authlete <command> --name "Jane"This is useful for chaining commands, reading from files, or scripting:
# Read body from a file
authlete <command> < request.json
# Pipe from another command
curl -s https://example.com/data.json | authlete <command>When multiple input methods are used, the priority is:
| Priority | Source | Description |
|---|---|---|
| 1 (highest) | Individual flags | --name "Jane" always wins |
| 2 | --body flag |
Whole-body JSON via flag |
| 3 (lowest) | Stdin | Piped JSON input |
Use --server <index> to select a server by its zero-based index (default: 0):
| # | Server | Description |
|---|---|---|
| 0 | https://us.authlete.com |
πΊπΈ US Cluster |
| 1 | https://jp.authlete.com |
π―π΅ Japan Cluster |
| 2 | https://eu.authlete.com |
πͺπΊ Europe Cluster |
| 3 | https://br.authlete.com |
π§π· Brazil Cluster |
authlete --server <index> <command> [arguments]Use --server-url to override the server URL entirely, bypassing any named or indexed server selection:
authlete --server-url https://custom-api.example.com <command> [arguments]Precedence: --server-url > --server > default
Every command supports a --output-format flag that controls how the response is rendered to stdout.
| Format | Flag | Description |
|---|---|---|
| Pretty | --output-format pretty (default) |
Aligned key-value pairs with color, nested indentation. Human-readable at a glance. |
| JSON | --output-format json |
JSON output. Passthrough when the response is already JSON (preserves original field order and numeric precision). Falls back to typed marshaling otherwise. |
| YAML | --output-format yaml |
YAML output via standard marshaling. |
| Table | --output-format table |
Tabular output for array responses. |
| TOON | --output-format toon |
Token-Oriented Object Notation β a compact, line-oriented format that typically uses 30β60% fewer tokens than JSON. Well-suited for piping responses into LLM prompts. |
# Default pretty output
authlete <command>
# Machine-readable JSON
authlete <command> --output-format json
# TOON for LLM-friendly compact output
authlete <command> --output-format toon
# Pipe JSON to jq without using --output-format
authlete <command> --output-format json | jq '.fieldName'Use --jq to filter or transform the response inline using a jq expression. This always outputs JSON and overrides --output-format:
# Extract a single field
authlete <command> --jq '.name'
# Filter an array
authlete <command> --jq '.items[] | select(.active == true)'Use --color to control terminal colors:
| Value | Behavior |
|---|---|
auto (default) |
Color when stdout is a TTY, plain text otherwise |
always |
Always colorize |
never |
Never colorize |
The NO_COLOR and FORCE_COLOR environment variables are also respected.
When using --all (pagination) or streaming operations, output is written incrementally as items arrive:
| Format | Streaming behavior |
|---|---|
json |
One compact JSON object per line (NDJSON) |
yaml |
YAML documents separated by --- |
toon |
One TOON-encoded object per block, separated by blank lines |
pretty (default) |
Pretty-printed items separated by blank lines |
The CLI uses standard exit codes to indicate success or failure:
| Exit Code | Meaning |
|---|---|
0 |
Success |
1 |
Error (API error, invalid input, etc.) |
On success, the response data is printed to stdout as JSON. On failure, error details are printed to stderr.
# Capture output and handle errors
authlete ... > output.json 2> error.log
if [ $? -ne 0 ]; then
echo "Error occurred, see error.log"
fiThe CLI includes two diagnostic flags available on all commands:
Preview what would be sent without making any network calls:
authlete <command> --dry-runOutput goes to stderr and includes:
- HTTP method and URL
- Request headers (sensitive values redacted)
- Request body preview (sensitive fields redacted)
The command exits successfully without contacting the API. This is useful for verifying request construction before executing.
Log request and response diagnostics while running normally:
authlete <command> --debugDebug output goes to stderr and includes:
- Request method, URL, headers, and body preview
- Response status, headers, and body preview
- Transport errors (if any)
The command still executes normally and produces its regular output on stdout.
If both --dry-run and --debug are set, --dry-run takes precedence and no network calls are made.
Sensitive information is automatically redacted in diagnostic output:
- Headers:
Authorization,Cookie,Set-Cookie,X-API-Key, and other security headers show[REDACTED] - Body: JSON fields named
password,secret,token,api_key,client_secret, etc. show[REDACTED]
Diagnostic output should still be treated as potentially sensitive operational data.
This CLI is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this CLI, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.