Skip to content

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

Terminal window
npm install -g github:Vendidit/cli
ven --version

For local development:

Terminal window
git clone git@github.com:Vendidit/cli.git
cd cli
npm install # also builds the auth-client + auth-shared git deps
npm link # makes `ven` runnable from your checkout

Requires Node ≥ 22.


Sign in

Terminal window
ven login

ven 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:

Terminal window
ven --app marketplace-v2 login
ven --api http://localhost:8080/api/v1 login

Env-var equivalents: VEN_APP_CODE, VEN_API_URL.


What’s next


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.