@apijack/core
v1.14.1
Published
Jack into any OpenAPI spec and rip a full-featured CLI with AI-agentic workflow automation
Maintainers
Readme
apijack
Jack into any OpenAPI spec and rip a full-featured CLI with AI-agentic workflow automation.
What is apijack?
apijack turns any API into a CLI.
GET /api/pets
GET /api/pets/{id}
GET /api/owners
GET /api/owners/{id}becomes a command tree that mirrors your API:
apijack
├── pets
│ ├── list
│ └── get <id>
└── owners
├── list
└── get <id>$ apijack pets get 25Getting Started
bun install -g @apijack/coreapijack setup # Configure URL + credentials (auth auto-detected)
apijack generate # Pull OpenAPI spec, generate types/client/commands
apijack --help # See all generated commandsNew to apijack? Follow the Quickstart guide with a working example API.
Claude Code Plugin
Install as a Claude Code plugin to let Claude interact with your APIs directly:
apijack plugin installThen in Claude Code, run /reload-plugins. The plugin exposes MCP tools and skills for setup, code generation, command execution, and routine authoring.
Example prompt:
"Use /setup-api to connect apijack to my todo list API at http://localhost:8080, then use /write-routine to automate an e2e test: create 10 todos and then delete them all."
For other MCP-compatible editors (Cursor, Windsurf, etc.), see MCP Server Integration.
As a Framework
Build dedicated CLI products with apijack as a dependency:
bun add @apijack/coreimport { createCli, BasicAuthStrategy } from "@apijack/core";
const cli = createCli({
name: "mycli",
description: "My API CLI",
version: "1.0.0",
specPath: "/v3/api-docs",
auth: new BasicAuthStrategy(),
});
await cli.run();See Building a CLI for the full configuration reference.
Features
- OpenAPI codegen -- types, client, and Commander commands from any spec (details)
- Claude Code plugin -- one-command setup, MCP server, AI-integrated skills
- Pluggable auth strategies -- Basic, Bearer, API Key, Session/CSRF, or build your own (details)
- Secure credential handling -- dev URLs stored locally, production APIs require env vars (details)
- Multi-environment config -- switch between dev/staging/prod with
config switch(details) - YAML routine engine -- variables, conditions,
forEach, assertions, sub-routines (details) -o routine-stepexport -- run any command with-o routine-stepto emit YAML for workflows (details)- Project mode -- project-local config, routines, and extensions (details)
- OpenAPI 3.0 + 3.1 -- comprehensive spec support (compatibility matrix)
Plugins
apijack supports pre-built plugins as standalone npm packages for common utilities. Install via cli.use(plugin()) and configure per-routine via a top-level plugins: block in routine YAML. See CLAUDE.md for the full contract and <cli> plugins list to inspect registered plugins.
Documentation
Full documentation is available on the wiki:
- Quickstart
- Building a CLI
- Writing Routines
- Authentication Strategies
- Session Auth
- Project Mode
- CLI Command Reference
- Routine YAML Schema
Requirements
- Bun runtime
License
MIT
