@wordbricks/velen
v0.2.2
Published
Velen CLI
Readme
velen
Rust CLI workspace for velen and the companion CLI API contract.
Key references:
- Human-oriented protocol and workflow spec:
docs/SPEC.md - Split OpenAPI source:
../../packages/cli-contract/openapi/source/cli.openapi.yaml - Generated JSON API contract:
../../packages/cli-contract/openapi/generated/cli.openapi.json
Runtime config:
- On Unix-like systems, the user config file is
${XDG_CONFIG_HOME:-~/.config}/velen/config.toml. - On Windows, the user config file is
%APPDATA%\\velen\\config.toml. - The current persisted keys are
active_organdrequest_timeout_sec. - Runtime config is resolved in this order: built-in defaults -> user config file -> internal typed runtime overrides.
velen org use <org>persistsactive_org. Passing--org <org>for a command takes precedence over the storedactive_orgvalue for that invocation.velen auth logoutclears both the stored auth session and the storedactive_org, so later org-scoped commands fail explicitly until a new org is selected.
Credential storage:
- On Unix-like systems, the CLI persists the full auth session blob to
${XDG_CONFIG_HOME:-~/.config}/velen/auth.json. - On Windows, the CLI persists the full auth session blob to
%APPDATA%\\velen\\auth.json. auth.jsonstores the user identity, bearer token, session timing metadata, and the last refresh timestamp.- Authenticated commands now run an explicit auth-session lifecycle before building an authenticated API client:
load
auth.jsonon startup -> call the CLI session refresh contract -> persist the returned token and timing metadata.
Version cache:
- Release builds refresh
${XDG_CONFIG_HOME:-~/.config}/velen/version.jsonon Unix-like systems and%APPDATA%\\velen\\version.jsonon Windows as a cached latest-version record sourced from the npm dist-tags for@wordbricks/velen. - The cache format mirrors Codex:
latest_version,last_checked_at, anddismissed_version.
Install:
bun install -g @wordbricks/velenbunx @wordbricks/velen --helpnpx @wordbricks/velen --help- Linux npm installs ship musl-linked binaries so the CLI runs on both glibc and musl-based distributions, including Alpine.
- Windows npm installs ship both x64 and arm64 platform binaries.
Release:
- Keep
apps/cli/package.jsonat0.0.0-dev. - Keep
apps/cli/Cargo.tomlandapps/cli/Cargo.lockat0.0.0on normal development commits. - Before tagging a release, update
apps/cli/Cargo.tomlandapps/cli/Cargo.lockto the real release version on the tagged commit. - After the release commit, return the Rust workspace version metadata to
0.0.0on the next development commit. - Configure npm trusted publishing for
@wordbricks/velenwith GitHub Actions using the workflow filenamecli-release.yml. - Push a tag like
cli-v0.1.0orcli-v0.1.0-alpha.1. - The
cli-releaseworkflow validatescli-v<version>againstapps/cli/Cargo.toml, builds GNU and musl Linux binaries plus the other platform binaries, stages npm tarballs, creates a GitHub release, and publishes them to npm withnpm publish --provenance. - Linux npm platform tarballs are staged from musl artifacts for the broadest runtime compatibility.
