ivo.zilkenat
  • Joined on 2025-10-29

belege-cli (0.0.1)

Published 2026-07-13 22:37:22 +00:00 by ivo.zilkenat

Installation

registry=https://gitea.i.ivo-zilkenat.de/api/packages/ivo.zilkenat/npm/
npm install belege-cli@0.0.1
"belege-cli": "0.0.1"

About this package

Belege admin CLI — calls public Convex functions as a real user (token→JWT).

belege-cli

TypeScript CLI for Belege. Calls the public Convex functions — the same the frontend uses — as a real user, authenticated by an opaque blg_… token exchanged for a short-lived JWT at /cli/token. Architecture adopted from Plexus.

Quickstart

pnpm install
pnpm dev config show                 # in-repo (tsx), no build
pnpm dev whoami
pnpm dev tokens create "my machine"  # mint a token (shown once)
pnpm build && pnpm link:global       # → `belege-cli` on PATH

Local dev needs zero config: run from inside a started rdu worktree and the CLI resolves that deployment + bootstraps a token via the rdu admin key. Remote targets need a blg_… token — see .claude/rules/cli.md for the belege.yml schema and the full command reference.

Architecture

core/     brand-neutral framework (transport, auth, jwt-cache, config, output, spec, command)
belege/   branded layer — branding, client (env/auth resolution), command base, commands/, lib/
cli.ts    clipanion bootstrap

core/ never hard-codes a product; belege/branding.ts supplies all product-specific strings. Commands import the backend's generated api (app/convex/_generated), so calls are end-to-end typed and bundled at build.

Escape hatch: belege-cli call <module:fn> [--kind query|mutation|action] k=v … reaches any public function without a typed wrapper.

Dependencies

Development Dependencies

ID Version
@types/js-yaml ^4.0.9
@types/node ^22.10.0
clipanion 4.0.0-rc.4
convex ^1.38.0
esbuild 0.27.0
js-yaml ^4.2.0
tsx ^4.21.0
typescript ^6.0.3
Details
npm
2026-07-13 22:37:22 +00:00
1
416 KiB
Assets (1)
Versions (3) View all
0.0.3 2026-07-14
0.0.2 2026-07-13
0.0.1 2026-07-13