{"id":46048633,"url":"https://github.com/apix-sh/cli","last_synced_at":"2026-03-08T04:01:34.487Z","repository":{"id":341327547,"uuid":"1169727026","full_name":"apix-sh/cli","owner":"apix-sh","description":"Local-first, progressive disclosure API discovery and browsing CLI for the agentic era.","archived":false,"fork":false,"pushed_at":"2026-03-06T16:42:27.000Z","size":203,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T07:42:32.680Z","etag":null,"topics":["agent","api","cli","local-first","markdown","openapi","rust"],"latest_commit_sha":null,"homepage":"https://apix.sh","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apix-sh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T05:34:16.000Z","updated_at":"2026-03-06T16:41:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/apix-sh/cli","commit_stats":null,"previous_names":["apix-sh/cli"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/apix-sh/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix-sh%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix-sh%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix-sh%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix-sh%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apix-sh","download_url":"https://codeload.github.com/apix-sh/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix-sh%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30242403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","api","cli","local-first","markdown","openapi","rust"],"created_at":"2026-03-01T08:08:22.976Z","updated_at":"2026-03-08T04:01:34.459Z","avatar_url":"https://github.com/apix-sh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apix\n\n`apix` is a Rust CLI for importing, browsing, searching, and calling API endpoint docs stored as local markdown vaults.\n\n## Features\n\n- Import vaults from OpenAPI 3.0/3.1 specs (`apix import`)\n- Browse endpoint/type docs (`apix show`, `apix peek`)\n- Search local vault content (`apix grep`)\n- Execute HTTP calls from vault frontmatter (`apix call`)\n- Sync registry + namespaces with sparse-checkout (`apix update`, `apix pull`)\n- Shell completions (`apix completions`)\n- Auto-initializes `~/.apix` on first use\n\n## Install\n\n### curl | sh\n\n\u003e Install script is maintained in the [web repo](https://github.com/apix-sh/web/blob/main/public/install.sh).\n\nLatest:\n\n```bash\ncurl -fsSL https://apix.sh/install | sh\n```\n\nPinned version:\n\n```bash\ncurl -fsSL https://apix.sh/install | sh -s -- --version v0.1.0\n```\n\nCustom install directory:\n\n```bash\ncurl -fsSL https://apix.sh/install | sh -s -- --bin-dir \"$HOME/.local/bin\"\n```\n\n### Homebrew (recommended)\n\n```bash\nbrew tap apix-sh/tap\nbrew install apix\n```\n\nExplicit form:\n\n```bash\nbrew install apix-sh/tap/apix\n```\n\n### Build from source\n\nPrerequisites:\n\n- Rust toolchain (`rustup`, `cargo`, `rustc`)\n\nBuild:\n\n```bash\ncargo build --release\n```\n\nBinary path:\n\n```bash\n./target/release/apix\n```\n\n### Verify install\n\n```bash\napix --version\napix --help\n```\n\n## Quick Start\n\n```bash\n# Show help\ncargo run -- --help\n\n# Initialize config/home explicitly (optional)\ncargo run -- init\n\n# Import a local vault from an OpenAPI spec\ncargo run -- import tests/fixtures/petstore.json --name petstore\n\n# Import directly into a vault repo worktree\ncargo run -- import tests/fixtures/petstore.json --name petstore --output /path/to/vault\n\n# Show full route markdown\ncargo run -- show petstore/v1/pets/GET\n\n# Show condensed view (frontmatter + required request fields)\ncargo run -- peek petstore/v1/pets/{petId}/GET\n\n# Full-text grep within a namespace\ncargo run -- grep petstore pet --limit 20 --source .local\n\n# Indexed search across sources\ncargo run -- search pet\n\n# List local inventory\ncargo run -- ls\ncargo run -- ls --source .local\ncargo run -- ls petstore\n\n# List detailed routes for a namespace/version\ncargo run -- ls petstore/v1\ncargo run -- ls petstore/v1 --source core\n\n# Filter routes by path prefix\ncargo run -- ls petstore/v1/pet\ncargo run -- ls petstore/v1/store/order\n```\n\n## Command Reference\n\n- `apix search \u003cquery\u003e [--source \u003cname\u003e] [--all-sources] [--no-auto-update]`: Search indexed APIs\n- `apix update [--source \u003cname\u003e] [--all-sources]`: Clone/pull source registry metadata\n- `apix pull \u003cnamespace\u003e[/\u003cversion\u003e] [--source \u003cname\u003e]`: Sparse-checkout a namespace (or specific version) from a source (default: `core`)\n- `apix import \u003csource\u003e --name \u003cnamespace\u003e [--output \u003cvault_root\u003e] [--overwrite]`: Generate vault files from an OpenAPI spec\n- `apix ls [namespace|namespace/version[/path...]] [--source \u003cname\u003e]`: List local inventory or detailed routes\n- `apix info \u003cnamespace/version\u003e [--source \u003cname\u003e]`: Print API metadata from frontmatter\n- `apix show \u003croute\u003e [--source \u003cname\u003e]`: Print full markdown for a route/type file\n- `apix peek \u003croute\u003e [--source \u003cname\u003e]`: Print frontmatter + condensed required input info\n- `apix grep \u003cnamespace\u003e \u003cquery\u003e [--limit N] [--source \u003cname\u003e]`: Search local markdown files\n- `apix call \u003croute\u003e ... [--source \u003cname\u003e]`: Execute HTTP request resolved from route frontmatter\n- `apix completions \u003cbash|zsh|fish|elvish|powershell\u003e`: Generate shell completions\n- `apix init`: Create `~/.apix` structure and default config\n- `apix source add/remove/list`: Manage third-party sources\n- `apix registry rebuild [--source \u003cname\u003e] [--path \u003cvault_root\u003e]`: Rebuild registry index from a source root or vault repo path\n\n## Route Format\n\nRoute strings are slash-separated.\n\nShort form:\n\n```text\n\u003cnamespace\u003e/\u003cversion\u003e/\u003cpath segments\u003e/\u003cMETHOD\u003e\n```\n\nExplicit source form:\n\n```text\n\u003csource\u003e/\u003cnamespace\u003e/\u003cversion\u003e/\u003cpath segments\u003e/\u003cMETHOD\u003e\n```\n\nExample:\n\n```text\npetstore/v1/pets/{petId}/GET\ncore/petstore/v1/pets/{petId}/GET\n```\n\n## `apix call` Examples\n\n```bash\n# Route with literal path segment auto-mapped to {id}\ncargo run -- call demo/v1/items/item_123/GET\n\n# Explicit path/query/header/body flags\ncargo run -- call demo/v1/items/{id}/POST \\\n  -p id=item_123 \\\n  -q expand=full \\\n  -H \"Authorization: Bearer \u003ctoken\u003e\" \\\n  -d '{\"name\":\"item\"}'\n\n# Body from stdin\necho '{\"name\":\"item\"}' | cargo run -- call demo/v1/items/{id}/POST -p id=item_123 -d @-\n\n# Body from file\ncargo run -- call demo/v1/items/{id}/POST -p id=item_123 -d @payload.json\n```\n\n## Configuration\n\nDefault home directory:\n\n- `~/.apix`\n- override with `APIX_HOME`\n\nDefault registry remote:\n\n- `https://github.com/apix-sh/vault.git`\n- override with `APIX_REGISTRY_URL`\n\nAuto-update controls:\n\n- `auto_update = true|false` (default: `true`)\n- `auto_update_ttl_seconds = 21600` (6 hours, `0` disables time-based auto-update checks)\n- `APIX_AUTO_UPDATE` overrides `auto_update`\n- `APIX_AUTO_UPDATE_TTL_SECONDS` overrides `auto_update_ttl_seconds`\n\nDefault source priority:\n\n- `.local`, `core`\n- override with `APIX_SOURCES` (comma-separated), e.g. `APIX_SOURCES=.local,core,acme`\n\nDefault config file:\n\n```toml\ncolor = true\npager = \"\"\nauto_update = true\nauto_update_ttl_seconds = 21600\nsources = [\".local\", \"core\"]\n\n[registry]\nremote = \"https://github.com/apix-sh/vault.git\"\n\n[source.acme]\nremote = \"https://github.com/acme/apix-vaults.git\"\n```\n\n## Source Model\n\n- Local builds are stored at `~/.apix/vaults/.local/\u003cnamespace\u003e/\u003cversion\u003e/...`\n- Core registry is stored at `~/.apix/vaults/core/\u003cnamespace\u003e/\u003cversion\u003e/...`\n- Third-party sources are stored at `~/.apix/vaults/\u003csource\u003e/\u003cnamespace\u003e/\u003cversion\u003e/...`\n\nShort route resolution order follows `sources` config (or `APIX_SOURCES`).\nIf a short route exists in multiple sources, `apix` returns an ambiguity error and asks for `--source` or explicit source-prefixed route.\n\n## Search vs Grep\n\n- `search`: Indexed API discovery across sources using `registry.json` (can include not-yet-pulled APIs)\n- `grep`: Full-text markdown search within one namespace/source (content-level search)\n- `ls`: Local inventory and route listing from local files\n\n`ls` modes:\n\n- `apix ls`: list namespaces grouped by source\n- `apix ls \u003cnamespace\u003e`: list versions for a namespace across sources\n- `apix ls \u003cnamespace\u003e/\u003cversion\u003e`: list paths and methods with one-line route summaries\n- `apix ls \u003cnamespace\u003e/\u003cversion\u003e/\u003cpath...\u003e`: filter routes to those under the given path prefix\n- Route-detail mode resolves from one source only: `--source` if provided, else first match by priority (`.local` -\u003e `core` -\u003e third-party)\n\nRegistry lifecycle:\n\n- `core`/third-party sources: registry index comes from source root (`registry.json`) after `update`/`pull`\n- `.local` source: registry index is auto-rebuilt after `import`\n- Manual reindex:\n  - local source: `apix registry rebuild --source .local`\n  - vault repo path: `apix registry rebuild --path /path/to/vault`\n\nVault repo spec (for `--path` mode and source compatibility):\n\n- [`docs/vault-repo-spec.md`](docs/vault-repo-spec.md)\n\nSearch auto-update:\n\n- `search` can auto-refresh source `registry.json` before matching\n- Auto-update uses registry-only fetch; it does not update pulled namespace content\n- `.local` is excluded from auto-update and timestamp tracking\n- Last successful source refresh timestamp: `~/.apix/vaults/\u003csource\u003e/.last-updated`\n- Skip once with `apix search ... --no-auto-update`\n\n## Output Behavior\n\n- If stdout is a TTY: markdown is rendered for humans (`termimad`)\n- If stdout is piped: raw markdown is emitted\n- `--raw` forces raw markdown even in TTY mode\n- `--no-color` or `NO_COLOR=1` disables color styling\n- `show` and `ls \u003cnamespace\u003e/\u003cversion\u003e` auto-page output in TTY mode using `pager` config / `PAGER` (fallback: `less -FRX`)\n- `--no-pager` disables pager usage\n\n## Development\n\n```bash\ncargo fmt --all\ncargo test --locked\ncargo check --locked\n```\n\n## Release Automation\n\nReleases are automated with GitHub Actions + `release-plz`:\n\n- `.github/workflows/release-plz.yml`:\n  - opens/updates release PRs from commits on `main`\n  - bumps `Cargo.toml` version and changelog\n  - publishes crate + creates GitHub release after release PR merge\n- `.github/workflows/release.yml`:\n  - builds multi-platform binaries\n  - uploads release tarballs and `SHA256SUMS` to the published GitHub release\n\nRecommended commit style for clean changelogs:\n\n- Conventional Commits (`feat:`, `fix:`, `feat!:`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapix-sh%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapix-sh%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapix-sh%2Fcli/lists"}