Command line
The CLI discovers operations from the instance you connect to. The examples use pnpm vibase from the repository root.
Sign in to an instance
Section titled “Sign in to an instance”pnpm vibase login --server https://api.example.compnpm vibase me getThe CLI prints a URL and a code. Open the URL in a browser and approve the device login. Your instance must have Clerk authentication and device login configured.
For API-key authentication, pass the key over stdin. With VIBASE_API_KEY supplied by your environment or secret manager:
printf '%s' "$VIBASE_API_KEY" | pnpm vibase login --api-key --server https://api.example.comWork with records
Section titled “Work with records”pnpm vibase --helppnpm vibase contacts list --limit 10pnpm vibase contacts create --name "Ada Lovelace"pnpm vibase contacts get <contact-id>Put command words before flags. Body properties become flags in kebab case; --data accepts a JSON body, @file.json, or - for stdin. Use --all to follow list pagination.
Output is JSON, or one record per line for lists. Errors go to stderr. Exit codes are 0 for success, 1 for an API or network failure, and 2 for usage or configuration errors.
Give an agent its own identity
Section titled “Give an agent its own identity”For an agent account using device login:
- Invite its email in your instance’s Clerk application with public metadata
{"vibase_role":"agent"}. - Sign in using that account with
pnpm vibase --profile agent login --server https://api.example.com. - Use the agent ID printed at login to grant scopes from an owner session:
pnpm vibase agents update <agent-id> \ --data '{"scopes":["contacts:read","contacts:write"]}'New agent accounts start without scopes. An owner can add or remove individual grants:
pnpm vibase agents update <agent-id> \ --add-scopes '["tasks:read"]' \ --remove-scopes '["contacts:write"]'To stop an agent’s access:
pnpm vibase agents update <agent-id> --data '{"disabled":true}'Use profiles and sign out
Section titled “Use profiles and sign out”Use --profile work or --profile agent to keep identities separate. Profiles are stored under $XDG_CONFIG_HOME/vibase/, falling back to the platform’s default config location.
pnpm vibase logoutOAuth logout revokes the refresh token and removes the saved profile. An already issued access token remains valid until expiry unless backend authorization blocks it.