> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rivvr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CI authentication

> Run rivvr in CI with credentials from your secret store.

CI pipelines (such as GitHub Actions or GitLab CI) run commands with nobody at the keyboard and usually have no keychain. So in CI, `rivvr` reads everything from environment variables.

Store the values in your CI system's secret storage. Never write them in the pipeline file itself.

## Signing in

Tell `rivvr` where to connect:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
RIVVR_API_URL=https://rivvr.customer.example
RIVVR_PROJECT=research
RIVVR_CLUSTER=development
```

Then add one of these two ways to sign in:

* `RIVVR_ACCESS_TOKEN`: a short-lived access token.
* `RIVVR_USERNAME` and `RIVVR_PASSWORD`: always set both.

If more than one is set, `rivvr` uses the access token first, then the username and password, then a login saved on the machine. Values from environment variables are never saved to disk.

Example:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr deploy hf://HuggingFaceTB/SmolLM2-135M-Instruct --name ci-model --max-cost-per-hour 3 --wait --json
```

Each run of `deploy` creates a new model, so give each pipeline run a different `--name`. Keep `--max-cost-per-hour` within the budget you've been given.

## Sending prompts in CI

Set the inference key with two variables, always together:

* `RIVVR_INFERENCE_KEY_ID`: the key ID
* `RIVVR_INFERENCE_KEY`: the key secret

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr model infer ci-model --key-id "$RIVVR_INFERENCE_KEY_ID" --prompt "Reply OK." --json
```

These variables win over any key saved on the machine. The ID in `--key-id` must match `RIVVR_INFERENCE_KEY_ID`. If the key is wrong or not allowed, the request fails. `rivvr` won't try a saved key instead.

The inference key only works for sending prompts. To look up the model, `rivvr` still needs the sign-in variables above.

For JSON output and exit codes, see [scripting](https://docs.rivvr.ai/configuration/scripting.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.