@tangcent/apilot
v0.1.2
Published
Navigate your APIs. Scans source code and exports to Markdown, cURL, Postman, and more.
Readme
APilot
Navigate your APIs. Automatically.
APilot scans your source code, extracts API endpoints, and exports them to the format you need — Postman collections, Markdown docs, cURL commands, and more. No annotations required, no runtime needed.
1 AI Agent Skill
| Skill | Description |
|-------|-------------|
| apilot | Scan source code and export API endpoints to Postman, Markdown, cURL, and more |
What it does
Point APilot at a source directory and it figures out the rest:
apilot export ./my-service --formatter postman --output collection.json
apilot export ./my-service --formatter markdown --format detailed
apilot export ./my-service --formatter curlIt detects your language and framework automatically, walks the source tree, and produces clean, structured API output — ready to import into Postman, share as docs, or drop into a CI pipeline.
Supported languages & frameworks
| Language | Frameworks | |------------|-----------------------------------------| | Java | Spring MVC, JAX-RS, Feign | | Go | Gin, Echo, Fiber | | Node.js | Express, Fastify, NestJS | | Python | FastAPI, Django REST, Flask |
Output formats
| Format | Description |
|----------|------------------------------------------|
| markdown | Markdown docs (simple or detailed) |
| curl | One curl command per endpoint |
| postman | Postman Collection v2.1 JSON |
Quick Start (AI Agent)
The following steps are for AI Agents (Claude Code, Cursor, etc.).
Step 1 — Install
# Install CLI
npm install -g @tangcent/apilot
# Install CLI SKILL (required)
npx skills add tangcent/apilot -y -gStep 2 — Export APIs
# Scan source code and export to Postman
apilot export ./my-service --formatter postman --output api.postman_collection.json
# Generate Markdown documentation
apilot export ./my-service --formatter markdown --format detailed --output API.md
# Generate cURL commands
apilot export ./my-service --formatter curlStep 3 — Verify
apilot export --list-collectors
apilot export --list-formattersInstallation
npm (recommended)
npm install -g @tangcent/apilotDownload binary
Grab the latest release for your platform from the releases page:
# macOS (Apple Silicon)
curl -L https://github.com/tangcent/apilot/releases/latest/download/apilot-darwin-arm64 -o apilot
chmod +x apilot && sudo mv apilot /usr/local/bin/Build from source
git clone https://github.com/tangcent/apilot.git
cd apilot
go build -o apilot ./apilot-cliInstall from source (local development)
Use the install script to build and install apilot to your local PATH — handy for testing changes before release:
# Clone and enter the repo
git clone https://github.com/tangcent/apilot.git
cd apilot
# Build and install to /usr/local/bin (or ~/.local/bin if no write access)
./scripts/install-local.sh
# Or specify a custom install directory
./scripts/install-local.sh /usr/local/bin
# Verify
apilot --versionAfter making code changes, just re-run ./scripts/install-local.sh to rebuild and reinstall.
Usage
apilot export <source-path> [flags]
Flags:
--collector string Collector name (auto-detected if omitted)
--formatter string Output format: markdown, curl, postman (default: markdown)
--format string Format variant, e.g. simple, detailed (default: simple)
--output string Output file path (default: stdout)
--list-collectors Print available collectors and exit
--list-formatters Print available formatters and exitExamples
# Export a Spring Boot project to Postman
apilot export ./backend --formatter postman --output api.postman_collection.json
# Generate detailed Markdown docs
apilot export ./backend --formatter markdown --format detailed --output API.md
# Quick cURL reference to stdout
apilot export ./backend --formatter curlIDE integrations
- VSCode — via the APilot VSCode extension (right-click any folder to export)
- JetBrains — see easy-api for the IntelliJ plugin
Extending APilot
APilot has a plugin system. Any binary that speaks the stdin/stdout JSON protocol can be registered as an external collector or formatter — no recompilation needed.
// ~/.config/apilot/plugins.json
{
"plugins": [
{
"name": "rust",
"type": "collector",
"command": "apilot-collector-rust"
}
]
}See docs/plugin-protocol.md for the full protocol spec.
Architecture
APilot is a multi-module Go monorepo with a clean three-layer design:
apilot-cli (bundled binary)
└── api-master (engine + plugin runtime)
├── api-collector-{java,go,node,python}
└── api-formatter-{markdown,curl,postman}The api-collector and api-formatter packages define the stable interfaces. Everything else is an implementation. See docs/architecture.md for the full breakdown.
Contributing
PRs and issues are welcome. See CONTRIBUTING.md to get started.
