navapi 0.1.0-alpha.1
Pre-release
Pre-release
First public alpha of navapi — the discovery-first Business Central API toolkit. Four faces, one brain, validated live against a real BC tenant (22 API routes, 645 entity sets, full CRUD with transparent ETags).
What's in the box
@navapi/core— auth (client credentials, token caching), route discovery via the runtimeapiRoutesAPI, per-route$metadataingestion + on-disk cache, company resolution, CRUD with GET→If-Match→retry-once-on-412, server-driven pagination (odata.maxpagesize),$count,$batch, bound actions, navigation properties, OS-keychain secret storage with file fallback.@navapi/cli— thenavapicommand: profiles, companies, discovery, queries (--filter/--select/--orderby/--count/--nav/--show-url), writes, actions, batch,secrets status|migrate. TTY-aware: humans get tables, pipes get stable JSON.@navapi/mcp— 14 typed MCP tools over stdio with real pagination (nextLink→get_next_page), shared profiles with the CLI.navapi-vscode(attached.vsix) — Profiles / Companies / Endpoint Browser sidebar, records grid with a BC-style query builder ($filter/$select/$count, copyable query URL), server-side sorting, FastTab detail panes with lazy-loaded navigations, right-click Filter… / Filter to This Value / Copy Value, add/edit profile form with Test Connection.
Install
npm i -g @navapi/cli@alpha # CLI (the bare `navapi` npm name is squatted; the command is still `navapi`)
npm i @navapi/core@alpha # library
npm i -g @navapi/mcp@alpha # MCP server (`navapi-mcp`)
code --install-extension navapi-vscode-0.0.6.vsix # extension (download below)
⚠️ The attached.vsixbundles the OS-keychain binding for Windows x64 only; on other platforms the extension falls back to file-based secret storage. Alpha-quality: expect sharp edges, report them.
Notes
- Secrets: stored in the OS keychain (Credential Manager / Keychain / libsecret); pre-existing plaintext file secrets migrate automatically on first use.
NAVAPI_SECRET_BACKEND=fileopts out;NAVAPI_CLIENT_SECRETcovers CI. - Route enumeration is company-scoped — set a default company (
navapi company use) to see custom and Microsoft API routes. - 128 tests, CI on ubuntu/windows × Node 20/22.