CLI Overview

What is the Ravi CLI?

The Ravi CLI (ravi) is a Go command-line client that gives AI agents programmatic access to their Identity — email, phone, credential vault, and 2FA. It’s designed to be used by both humans and AI agents.

Installation

brew install ravi-hq/tap/ravi

See Installation for more options.

Design principles

JSON-first output

All commands support the --json flag. JSON output is stable and designed for programmatic parsing by AI agents. Human-readable output is for interactive use only.

# For agents — structured, parseable
ravi inbox email --unread --json | jq -r '.[0].subject'

# For humans — formatted, readable
ravi inbox email --unread

Client-side encryption

The CLI handles all encryption and decryption locally. When you store a password, it’s encrypted before leaving your machine. When you retrieve one, it’s decrypted after arriving. The server never sees plaintext credentials.

Transparent token management

Access tokens refresh automatically. The CLI detects token expiry and refreshes before making the request. If a request returns 401, it retries once after refreshing. You never need to manually manage tokens.

Identity scoping

Every API request is scoped to the active Identity via the X-Ravi-Identity header. Switch Identities with ravi identity use <name> and all subsequent commands operate against that Identity.

Configuration

Configuration is stored in ~/.ravi/ with secure file permissions (0600):

FileContents
auth.jsonAccess token, refresh token, user email, encryption keypair
config.jsonActive Identity UUID and name

Per-project override

A .ravi/config.json in the current working directory overrides the global config. This allows different projects to use different Identities automatically.

Command groups

GroupPurpose
ravi authLogin, logout, check status
ravi identityCreate, list, switch Identities
ravi getGet email address, phone number
ravi inboxRead SMS and email (grouped by conversation/thread)
ravi messageRead individual messages (flat list)
ravi emailCompose, reply, reply-all
ravi passwordsWebsite credential CRUD
ravi secretsKey-value secret CRUD
ravi feedbackSend feedback to the Ravi team

Global flags

FlagDescription
--jsonOutput in JSON format (recommended for agents)
--helpShow help for any command
--versionShow version information

Next steps