# Devin CLI

Source: https://docs.aicentos.com/en/clients/devin-cli

Language: en

> Use aicentos in Devin CLI — connect through the OpenAI-compatible configuration

Devin CLI is Devin's command-line client. It supports specifying an OpenAI-compatible API address through environment variables or a configuration file. Point the Base URL at aicentos and fill in the API Key, and the models aicentos offers become available in the terminal.

## Prerequisites

First create a dedicated key for Devin CLI on the console's "API Keys" page (naming it `devin-cli` makes usage easier to track).

## Installation

Node.js 18+ and npm are required first:

```bash
node -v
npm -v
```

Install globally with npm:

```bash
npm install -g devin-cli
```

Verify after installing:

```bash
devin --version
```

## Setup steps

Both environment variables and a configuration file are supported; environment variables take precedence.

### Option 1: Environment variables (recommended)

```bash
export DEVIN_BASE_URL="https://aicentos.com/v1"
export DEVIN_API_KEY="your_api_key_here"
```

To persist them, write them into `~/.zshrc` or `~/.bashrc`, then run `source ~/.zshrc`.

### Option 2: Configuration file

Edit `~/.devin/config.json`:

```json
{
  "apiKey": "your_api_key_here",
  "baseURL": "https://aicentos.com/v1",
  "model": "gpt-4o"
}
```

## Configuration to fill in

| Field    | Value                                              |
| -------- | -------------------------------------------------- |
| API Key  | The key created in the console                     |
| Base URL | `https://aicentos.com/v1`                          |
| Model    | A model name from the Model Gallery in the console |

## Test

Once configured, run:

```bash
devin
```

Send a simple prompt in the interactive session; receiving a normal reply means the integration works. On an authentication error, check whether `DEVIN_API_KEY` is correct, whether `DEVIN_BASE_URL` carries the `/v1` suffix, and whether the account balance is sufficient.

## Notes

* The Base URL only goes up to `/v1`; do not extend it to the full `/v1/chat/completions` path
* When both environment variables and the configuration file exist, the environment variables win
* It is a good idea to confirm the visible models with `GET /v1/models` first, then fill in the Model ID