@solomei-ai/auth
v0.1.4
Published
Public bootstrap for Callimacus: `callimacus login` configures the private SDK registry (.npmrc) + API access. The full tool is the private @solomei-ai/callimacus-cli.
Readme
@solomei-ai/auth
The public bootstrap for Callimacus. One callimacus login configures everything
a developer needs to build on Callimacus: the private SDK download (~/.npmrc) and
an API key — with zero prior setup.
This package is intentionally small and public so a new client can run it before they
have any credentials. The full operator/tenant-config CLI is the private
@solomei-ai/callimacus-cli, installable only after login configures the registry.
npx @solomei-ai/auth login
# or: npm i -g @solomei-ai/auth && callimacus loginFirst run
npx @solomei-ai/auth login # device-code → writes ~/.npmrc + the API profile
npm i -g @solomei-ai/callimacus-cli # now installs (private, via the configured registry)
callimacus configure … # the full toollogin uses a device-code flow: it prints a URL + short code, opens your browser
(falling back to "paste this URL" on headless boxes), you approve in the dashboard, and
it writes the credentials. The registry token goes to user-level ~/.npmrc; the
API token is stored as a profile in ~/.callimacus/config.json — the same file
@solomei-ai/callimacus-cli reads, so this one login configures that CLI too.
Commands
| Command | What it does |
|---|---|
| login | Authorize this machine (device-code; or no-op materialize from CALLIMACUS_NPM_TOKEN in CI). |
| init | Scaffold the current project: .npmrc scope map, .env API key, .gitignore. |
| whoami | Show the active profile + project. |
| use <project> | Switch the active project profile. |
| logout | Clear stored profiles and strip the registry lines from ~/.npmrc. |
| setup-ci [--print] | Configure the registry from CALLIMACUS_NPM_TOKEN (writes ~/.npmrc, or prints with --print). |
CI
A developer with several projects has one registry token (machine-level) and a per-project API key. In CI, skip the browser:
env:
CALLIMACUS_NPM_TOKEN: ${{ secrets.CALLIMACUS_NPM_TOKEN }} # the registry token
steps:
- run: npx @solomei-ai/auth setup-ci # writes ~/.npmrc headlessly
- run: npm ciConfiguration
| Env var | Default | Purpose |
|---|---|---|
| CALLIMACUS_API_URL | https://api.callimacus.ai | API host (device-flow endpoints). Override for dev. |
| CALLIMACUS_REGISTRY_URL | https://npm.callimacus.ai | Private registry the .npmrc points at. |
| CALLIMACUS_NPM_TOKEN | — | Registry token for non-interactive login/setup-ci. The former name CALLIMACUS_TOKEN is still accepted (with a deprecation warning). |
Notes
- Config interop: writes
~/.callimacus/config.jsonin the exact schema@solomei-ai/callimacus-cli(itslib/config.ts) reads, so the two share one profile. - SDK env var names:
initwritesCALLIMACUS_CLIENT_ID/CALLIMACUS_CLIENT_SECRETto.env— the current names the@solomei-ai/callimacus-sdkenv wrapper reads (CALLIMACUS_PUBLIC_KEY/PRIVATE_KEYstill work but the SDK logs a deprecation warning). - No native deps: pure Node +
commander, sonpm i -g/npxwork on Windows, Linux, macOS, and WSL.0600/0700file modes are enforced on Unix; on Windows they no-op and the files rely on the user-scoped profile dir (same posture asaws/gcloud/gh).
