Autonomous API documentation agent for backend projects.
ApiLot scans your source code, detects endpoint changes, updates Postman documentation, and stores API change history in Neo4j.
- Realtime sync with
watchand one-shot sync withsync. - Route extraction for Go/Node/Python files.
- AI extractor provider switch via env (
openaiorpioneer). - Breaking-change classification with OpenAI.
- Postman collection auto-creation and route-level update flow.
- Neo4j history timeline for API changes.
- Pending sync queue + retry behavior for transient Postman errors.
- Optional debug mode for detailed AI/process logs.
- Go
1.23.2+ - A Postman API key
- (Optional but recommended) Neo4j instance credentials
- AI API key for your selected extractor provider:
- OpenAI (
OPENAI_API_KEY), or - Pioneer (
PIONEER_API_KEY)
- OpenAI (
go run ./cmd/apilot helpgo build -o apilot ./cmd/apilot
./apilot help- Create a
.envin repo root. - Set minimum required keys:
POSTMAN_API_KEY- AI key for your provider (
OPENAI_API_KEYorPIONEER_API_KEY) WATCH_DIR(project to scan)
- Initialize:
apilot init- Choose your workflow:
- Realtime:
apilot watch
- One-shot:
apilot sync
- Realtime:
.go.js.ts.py
- Go: Gin-focused deterministic extraction (route groups supported)
- Node: Express patterns
- Python: FastAPI / Django patterns
Deterministic parsers run first. AI extraction is used as fallback/enrichment based on config and route detection heuristics.
Use these keys in your .env:
-
WATCH_DIR
Directory to scan/watch (default.). -
POSTMAN_API_KEY
Required for Postman sync. -
POSTMAN_WORKSPACE_NAME
Optional. If empty,initprompts workspace selection interactively.
AI_EXTRACTOR_PROVIDER=openai|pioneer
Switches extractor backend without code changes.
OPENAI_API_KEYOPENAI_EXTRACT_ENDPOINT(defaulthttps://api.openai.com/v1/responses)OPENAI_EXTRACT_MODEL(defaultgpt-4.1-mini)
PIONEER_API_KEYPIONEER_ENDPOINT(defaulthttps://api.pioneer.ai/inference)PIONEER_MODEL(defaultbase:Qwen/Qwen3-32B)PIONEER_TASK(defaultgenerate)
-
DOC_MODE=deep|off
deepgenerates endpoint lifecycle docs and attaches them to endpoint descriptions. -
DOC_AI_MODEL
Model used for lifecycle documentation generation.
OPENAI_API_KEYis also used for breaking-change classification.
NEO4J_URINEO4J_USERNEO4J_PASSWORD
If Neo4j config is missing, graph history persistence is skipped.
DEBUG=true|false
When true, prints detailed AI/process logs, including request/response debug traces.
-
apilot init
Bootstrap local state + Postman collection from current codebase. -
apilot watch
Realtime loop for file changes, diffing, classification, Postman sync, and Neo4j writes. -
apilot sync
One-time full rescan + sync (useful when not running watch). -
apilot diff
Show pending unsynced changes from.apilot/pending.json. -
apilot history
Show API change timeline from Neo4j in terminal table format. -
apilot help
Detailed command guide.
ApiLot stores runtime state under .apilot/:
-
.apilot/state.json
Postman sync state (workspace, collection, route sync metadata). -
.apilot/routes_state.json
Last known extracted route map. -
.apilot/pending.json
Pending change sets when sync fails and needs retry.
apilot init
apilot watchapilot init
# ... code normally ...
apilot sync- If Postman rate limit errors occur, ApiLot retries with backoff.
- If
initsees existing state, it prompts before cleanup/re-init. - If
historyshows empty project values for very old records, newer syncs will persist project name. - If AI extraction appears noisy during development, set
DEBUG=false.