Overview
The AgentDoor CLI provides commands for:- init - Interactive setup and OpenAPI import
- status - Configuration validation and endpoint checks
- keygen - Ed25519 keypair generation for agents
Installation
Commands
init
Initialize AgentDoor in your project with interactive prompts or OpenAPI auto-import.Interactive Mode
Walks you through setup step-by-step:- Framework selection (Next.js, Express, Hono, FastAPI)
- OpenAPI spec import (optional)
- Scope configuration
- Service metadata
- x402 payments setup
agentdoor.config.ts- Configuration filepublic/.well-known/agentdoor.json- Discovery documentpublic/.well-known/agent-card.json- A2A agent card
OpenAPI Import
Auto-generate configuration from an OpenAPI specification:- Parses OpenAPI 3.x specs (YAML or JSON)
- Infers scopes from endpoint tags and paths
- Suggests pricing based on HTTP methods
- Filters out destructive operations (DELETE, admin endpoints) by default
Options
status
Check configuration files and test live endpoints.Local File Checks
Validates local configuration:Remote Endpoint Checks
Probe a running server:Options
keygen
Generate Ed25519 keypairs for agent authentication.Output
Default Location
Keypairs are saved to~/.agentdoor/keys.json with restrictive permissions (0600).
File format (JSON):
Options
PEM Format
Generate PEM-formatted keys for interoperability:agent.pub (public key):
agent.key (private key, mode 0600):
Configuration File
Theagentdoor init command generates a configuration file:
agentdoor.config.ts:
Discovery Document
The.well-known/agentdoor.json discovery document:
Framework Integration
After runningagentdoor init, integrate with your framework:
Next.js
Express.js
Hono
Agent Usage
After generating keys withagentdoor keygen, agents can register:
Troubleshooting
Command not found
Install CLI globally or use npx:Config validation errors
Runagentdoor status to see specific validation issues:
OpenAPI import failures
Ensure your OpenAPI spec is valid:Permission denied (keygen)
Ensure write permissions to output directory:CI/CD Integration
Generate config in CI
Pre-deployment checks
Best Practices
- Version control: Commit
agentdoor.config.tsand discovery documents - Secrets: Never commit wallet addresses or API keys
- Environment variables: Use env vars for sensitive config
- Status checks: Run
agentdoor statusbefore deployment - Key rotation: Periodically regenerate agent keypairs
- OpenAPI sync: Re-run
init --from-openapiwhen API changes - Documentation: Update service description when adding scopes