The CLI — overview
ven is the Vendidit platform CLI — an interactive + scriptable command-line tool wrapping the same @vendidit/auth-client SDK that powers our browser apps. Use it to sign in, browse and edit users, manage organizations, and register new consuming apps without leaving your terminal.
┌ ven · vendidit cli│◆ What do you want to do?│ ● 🪪 Profile│ ○ 👥 Users│ ○ 🏢 Organizations│ ○ 📦 Apps│ ○ ↩ Logout│ ○ ❌ Exit└Install
npm install -g github:Vendidit/cliven --versionFor local development:
git clone git@github.com:Vendidit/cli.gitcd clinpm install # also builds the auth-client + auth-shared git depsnpm link # makes `ven` runnable from your checkoutRequires Node ≥ 22.
Sign in
ven loginven prompts for email + password (and a 6-digit TOTP code if 2FA is active), then writes a token pair to ~/.vendidit/session.json with file mode 0600. The refresh token is picked up automatically on subsequent runs — you stay signed in until your refresh expires or someone revokes the session.
By default ven logs in via the auth-client-demo app (Vendidit-internal, @vendidit.com-only). Switch apps any time:
ven --app marketplace-v2 loginven --api http://localhost:8080/api/v1 loginEnv-var equivalents: VEN_APP_CODE, VEN_API_URL.
What’s next
- Commands reference — every command with examples.
- Scripting —
--json+ non-interactive forms for ops scripts. - App registration —
ven apps createis now the canonical path.
Architecture (one paragraph)
ven is built as a single ESM bundle (dist/cli.js) via tsup. Internally it follows a SOLID split: a small services/ layer owns SDK access (everything goes through @vendidit/auth-client — login/refresh/logout/me/sessions/admin lookups — with bare authenticatedRequest() calls for the few admin org/app endpoints the SDK hasn’t surfaced yet). A commands/ layer composes services + prompts the user (via @clack/prompts) + renders results (tables via cli-table3, brand colors via picocolors). Both modes — interactive prompts and direct positional args — hit the same service methods and the same render functions, so the look is identical regardless of how you invoked it.