Installation
Rivano ships three installable packages: the TypeScript SDK for programmatic access, the CLI for terminal-based operations, and the gateway for proxying LLM traffic.
SDK
Install @rivano/sdk into your project:
// npm
// npm install @rivano/sdk
// yarn
// yarn add @rivano/sdk
// pnpm
// pnpm add @rivano/sdk
import Rivano from '@rivano/sdk';
const rivano = new Rivano({ apiKey: 'rv_...' }); The SDK requires Node.js 18 or later. It ships with full TypeScript types — no @types package needed.
CLI
Install the CLI globally:
npm install -g @rivano/cli
Verify the installation:
rivano --version
# @rivano/cli 1.0.0
Log in with your API key:
rivano login
# Rivano API key: rv_...
# ✔ Logged in as [email protected]
CLI config file
The CLI stores credentials at ~/.rivano/config.json:
{
"apiKey": "rv_...",
"baseUrl": "https://api.rivano.ai"
}
You can edit this file directly or use rivano login to regenerate it. Run rivano logout to delete it.
Gateway
Install the gateway globally:
npm install -g @rivano/gateway
Verify the installation:
rivano-gateway --version
# @rivano/gateway 1.0.0
The gateway reads its configuration from a rivano.yaml file. Run rivano init in any directory to create one.
Environment variables
Both the CLI and SDK respect these environment variables, which take precedence over config files but are overridden by explicit flags or constructor options:
| Variable | Description | Default |
|---|---|---|
RIVANO_API_KEY | Your Rivano API key | — |
RIVANO_BASE_URL | Override the API base URL | https://api.rivano.ai |
Set them in your shell or .env file:
export RIVANO_API_KEY=rv_...
export RIVANO_BASE_URL=https://api.rivano.ai
SDK configuration options
The Rivano constructor accepts the following options:
| Option | Type | Description | Default |
|---|---|---|---|
apiKey | string | Your Rivano API key | Required |
baseUrl | string | API base URL | https://api.rivano.ai |
timeout | number | Request timeout in milliseconds | 30000 |
retries | number | Number of retry attempts on transient errors | 2 |
import Rivano from '@rivano/sdk';
const rivano = new Rivano({
apiKey: process.env.RIVANO_API_KEY!,
baseUrl: 'https://api.rivano.ai',
timeout: 10000,
retries: 3,
});
Config priority
For the CLI, configuration is resolved in this order (highest to lowest priority):
- Flags —
--api-key rv_...passed directly to a command - Environment variables —
RIVANO_API_KEY,RIVANO_BASE_URL - Config file —
~/.rivano/config.json
Never commit your API key to source control. Use environment variables in CI/CD environments and secret managers in production.
Next steps
- Quickstart — Send your first proxied request
- Core Concepts — Understand the mental model
- SDK Overview — Full SDK reference
Related
- CLI Overview — All CLI commands and global flags
- Gateway Configuration — rivano.yaml reference