apix
apix is a Rust CLI for importing, browsing, searching, and calling API endpoint docs stored as local markdown vaults.
Features
- Import vaults from OpenAPI 3.0/3.1 specs (
apix import) - Browse endpoint/type docs (
apix show,apix peek) - Search local vault content (
apix grep) - Execute HTTP calls from vault frontmatter (
apix call) - Sync registry + namespaces with sparse-checkout (
apix update,apix pull) - Shell completions (
apix completions) - Auto-initializes
~/.apixon first use
Install
curl | sh
Install script is maintained in the web repo.
Latest:
|
Pinned version:
|
Custom install directory:
|
Homebrew (recommended)
Explicit form:
Build from source
Prerequisites:
- Rust toolchain (
rustup,cargo,rustc)
Build:
Binary path:
Verify install
Quick Start
# Show help
# Initialize config/home explicitly (optional)
# Import a local vault from an OpenAPI spec
# Import directly into a vault repo worktree
# Show full route markdown
# Show condensed view (frontmatter + required request fields)
# Full-text grep within a namespace
# Indexed search across sources
# List local inventory
# List detailed routes for a namespace/version
Command Reference
apix search <query> [--source <name>] [--all-sources] [--no-auto-update]: Search indexed APIsapix update [--source <name>] [--all-sources]: Clone/pull source registry metadataapix pull <namespace>[/<version>] [--source <name>]: Sparse-checkout a namespace (or specific version) from a source (default:core)apix import <source> --name <namespace> [--output <vault_root>] [--overwrite]: Generate vault files from an OpenAPI specapix ls [namespace|namespace/version] [--source <name>]: List local inventory or detailed routesapix show <route> [--source <name>]: Print full markdown for a route/type fileapix peek <route> [--source <name>]: Print frontmatter + condensed required input infoapix grep <namespace> <query> [--limit N] [--source <name>]: Search local markdown filesapix call <route> ... [--source <name>]: Execute HTTP request resolved from route frontmatterapix completions <bash|zsh|fish|elvish|powershell>: Generate shell completionsapix init: Create~/.apixstructure and default configapix source add/remove/list: Manage third-party sourcesapix registry rebuild [--source <name>] [--path <vault_root>]: Rebuild registry index from a source root or vault repo path
Route Format
Route strings are slash-separated.
Short form:
<namespace>/<version>/<path segments>/<METHOD>
Explicit source form:
<source>/<namespace>/<version>/<path segments>/<METHOD>
Example:
petstore/v1/pets/{petId}/GET
core/petstore/v1/pets/{petId}/GET
apix call Examples
# Route with literal path segment auto-mapped to {id}
# Explicit path/query/header/body flags
# Body from stdin
|
# Body from file
Configuration
Default home directory:
~/.apix- override with
APIX_HOME
Default registry remote:
https://github.com/apix-sh/vault.git- override with
APIX_REGISTRY_URL
Auto-update controls:
auto_update = true|false(default:true)auto_update_ttl_seconds = 21600(6 hours,0disables time-based auto-update checks)APIX_AUTO_UPDATEoverridesauto_updateAPIX_AUTO_UPDATE_TTL_SECONDSoverridesauto_update_ttl_seconds
Default source priority:
.local,core- override with
APIX_SOURCES(comma-separated), e.g.APIX_SOURCES=.local,core,acme
Default config file:
= true
= ""
= true
= 21600
= [".local", "core"]
[]
= "https://github.com/apix-sh/vault.git"
[]
= "https://github.com/acme/apix-vaults.git"
Source Model
- Local builds are stored at
~/.apix/vaults/.local/<namespace>/<version>/... - Core registry is stored at
~/.apix/vaults/core/<namespace>/<version>/... - Third-party sources are stored at
~/.apix/vaults/<source>/<namespace>/<version>/...
Short route resolution order follows sources config (or APIX_SOURCES).
If a short route exists in multiple sources, apix returns an ambiguity error and asks for --source or explicit source-prefixed route.
Search vs Grep
search: Indexed API discovery across sources usingregistry.json(can include not-yet-pulled APIs)grep: Full-text markdown search within one namespace/source (content-level search)ls: Local inventory and route listing from local files
ls modes:
apix ls: list namespaces grouped by sourceapix ls <namespace>: list versions for a namespace across sourcesapix ls <namespace>/<version>: list paths and methods with one-line route summaries- Route-detail mode resolves from one source only:
--sourceif provided, else first match by priority (.local->core-> third-party)
Registry lifecycle:
core/third-party sources: registry index comes from source root (registry.json) afterupdate/pull.localsource: registry index is auto-rebuilt afterimport- Manual reindex:
- local source:
apix registry rebuild --source .local - vault repo path:
apix registry rebuild --path /path/to/vault
- local source:
Vault repo spec (for --path mode and source compatibility):
Search auto-update:
searchcan auto-refresh sourceregistry.jsonbefore matching- Auto-update uses registry-only fetch; it does not update pulled namespace content
.localis excluded from auto-update and timestamp tracking- Last successful source refresh timestamp:
~/.apix/vaults/<source>/.last-updated - Skip once with
apix search ... --no-auto-update
Output Behavior
- If stdout is a TTY: markdown is rendered for humans (
termimad) - If stdout is piped: raw markdown is emitted
--rawforces raw markdown even in TTY mode--no-colororNO_COLOR=1disables color stylingshowandls <namespace>/<version>auto-page output in TTY mode usingpagerconfig /PAGER(fallback:less -FRX)--no-pagerdisables pager usage
Development
Release Automation
Releases are automated with GitHub Actions + release-plz:
.github/workflows/release-plz.yml:- opens/updates release PRs from commits on
main - bumps
Cargo.tomlversion and changelog - publishes crate + creates GitHub release after release PR merge
- opens/updates release PRs from commits on
.github/workflows/release.yml:- builds multi-platform binaries
- uploads release tarballs and
SHA256SUMSto the published GitHub release
Recommended commit style for clean changelogs:
- Conventional Commits (
feat:,fix:,feat!:)