npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@axtrabase/cli

v0.1.2

Published

The AxtraBase CLI — inspect an AxtraBase project's schema, permissions, and environment, and build against it without touching Dataverse directly.

Readme

@axtrabase/cli

The axtrabase CLI lets a human or a coding agent inspect an AxtraBase project — schema, permissions, environment — and build against it through the REST API or the public @axtrabase/sdk package, without ever touching Dataverse or Microsoft OAuth directly.

Install

npm install -g @axtrabase/cli
# or, without installing:
npx @axtrabase/cli whoami

If axtrabase --version says command not found right after install, npm's default global prefix likely isn't on your PATH (or isn't writable at all, in which case the install itself silently fails). Fix:

mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc   # or ~/.bashrc
source ~/.zshrc
npm install -g @axtrabase/cli

Authenticate

axtrabase login

This is a control-plane credential, not a Dataverse or Microsoft credential — the CLI never asks for, stores, or uses Dataverse/Entra secrets. login opens (or prints) a dashboard URL where you generate a CLI token, shown exactly once; paste it back into the terminal prompt (input is masked). The token is stored at ~/.config/axtrabase/credentials.json with 0600 permissions.

axtrabase logout            # remove the local credential only
axtrabase logout --revoke   # also revoke the token on AxtraBase

Non-interactive / CI use

Set AXTRABASE_CLI_TOKEN and skip login entirely — every command reads it first, before the local credential file, and never persists or logs it. Useful for CI and for handing a coding agent a scoped, disposable token.

AXTRABASE_CLI_TOKEN=axcli_... axtrabase context --agent

AXTRABASE_CLI_TOKEN takes precedence over a stored login credential. logout can't unset an environment variable in the shell that invoked it, so instead of falsely claiming "not logged in" it says so explicitly:

$ AXTRABASE_CLI_TOKEN=axcli_... axtrabase logout
Authentication is coming from AXTRABASE_CLI_TOKEN.
Nothing was removed.
Unset the variable in your shell to log out locally:
  bash/zsh:    unset AXTRABASE_CLI_TOKEN
  PowerShell:  Remove-Item Env:AXTRABASE_CLI_TOKEN

--revoke still revokes the active env token server-side (useful for CI/agent cleanup) — it just still can't remove the variable itself.

Select an organisation and project

axtrabase organisations list     # alias: orgs
axtrabase orgs use axtraxia

axtrabase projects list
axtrabase projects use hr-portal

Selection persists to ~/.config/axtrabase/config.json (non-secret — base URL, active org/project). Every project-scoped command after this is concise:

axtrabase tables list

Commands

| Command | What it does | | ---------------------------------------------------- | -------------------------------------------------------------------------------------------- | | login / logout | Authenticate/de-authenticate the CLI. | | whoami | Signed-in user, organisation, active API. | | organisations list / orgs use <org> | Discover and select an organisation. | | projects list / show <project> / use <project> | Discover, inspect, and select a project. | | connection status / verify | The active project's Dataverse connection status; verify re-runs the live readiness check. | | tables list / describe <table> | The Dataverse table catalog, and one table's full column/lookup metadata. | | context [--json\|--agent] | The single most useful command — see below. | | schema export --format json\|typescript | Export table metadata, or generate TypeScript interfaces from it. | | permissions list | Table permission grants (read-only in v1). | | keys list / create / revoke | API key metadata (never the raw key after creation), creation, revocation. | | requests list / get <request-id> | Data-plane request telemetry — the debugging loop. | | events list / get <event-id> / tail | The public Change Feed — list, inspect, and live-tail record changes. | | config list / get / set / unset | Local, non-secret CLI settings. | | docs / openapi | Open developer docs / print the OpenAPI spec. | | status | Fast "am I ready to work" summary — auth, org, project, connection, table/key counts. |

Every command supports -h/--help.

context — the one command to start with

axtrabase context
axtrabase context --json     # the full payload, machine-readable
axtrabase context --agent    # compact, purpose-built for a coding agent

Human output: project, organisation, connection health, table counts, enabled tables (with per-key access if you pass --api-key <id>), whether a usable API key exists, and the SDK/REST entry points. --agent output includes an explicit axtrabase.rules array (use the REST API or the SDK, not Dataverse; keep keys server-side; respect the access field; don't fabricate unresolved metadata).

Exit codes

| Code | Meaning | | ---- | -------------------------------------------------------------- | | 0 | Success | | 1 | Generic failure | | 2 | Authentication required (not logged in, revoked/expired token) | | 3 | Authorization denied | | 4 | Not found | | 5 | Connection not ready | | 6 | Invalid arguments (including "no active project selected") |

--json mode returns { "error": { "code", "message", "requestId"? } } on failure and never mixes a printed error with exit code 0.

Environment variables

| Variable | Purpose | | ------------------------- | -------------------------------------------------------------------------------------- | | AXTRABASE_CLI_TOKEN | Bypasses login/the local credential file. Never persisted or logged. | | AXTRABASE_API_URL | Overrides the API origin (below saved config, above the production default). | | AXTRABASE_DASHBOARD_URL | Overrides where login sends you to generate a token. | | AXTRABASE_PROJECT | Overrides the active project (below an explicit --project flag, above saved config). | | AXTRABASE_CONFIG_DIR | Overrides ~/.config/axtrabase/ — mainly for tests/isolated environments. | | AXTRABASE_API_KEY | A project API key for data-plane commands (events). Never persisted or logged. |

Precedence everywhere it applies: explicit flag > environment variable > saved config > production default.

Full documentation

The complete command reference, agent integration guide, and error model live in docs/cli.md and docs/agents.md.