aci
Rust implementation of "Mount APIs as CLIs".
aci mounts HTTP APIs as command-line interfaces in two ways:
- generic raw fetch mode (
aci call ...) - config-driven mount mode (
aci --config aci.toml <mount> ...)
It also includes a coding-agent-oriented quick guide:
aci skills
Install
Trusted Publishing
This repository is configured for crates.io trusted publishing.
Create and push a v<version> tag to trigger publish:
or:
Before first publish, enable trusted publishing for crate aci in crates.io and link f4ah6o/aci-rs.
Quick Start
0) Coding agent guide
1) Generic API client mode
2) Config-driven mode (aci.toml)
= "aci"
[[]]
= "github"
= "remote"
= "https://api.github.com"
Raw Fetch Flags
-X, --method <METHOD>-H, --header "Key: Value"(repeatable)-d, --data <json>--body <json>--query key=value(repeatable)- unknown
--key valueis treated as query for compatibility
Auth / Token Example
OpenAPI Mounts
Mount with OpenAPI by setting openapi in aci.toml:
= "aci"
[[]]
= "pet"
= "remote"
= "https://petstore3.swagger.io"
= "/api/v3"
= "./openapi.json"
= 10000
Behavior:
operationIdbecomes command name- missing
operationIdfalls back tomethod_pathname - path params are positional args
- query/body params are
--option value - OpenAPI mounts always have
rawsubcommand fallback
Example:
Exit Codes
0: success1: upstream/API execution failure2: usage/config/input error