Junie CLI
Run Junie CLI, JetBrains' terminal agent, on models you pay for in DADAThe Algerian dinar, the one currency the docs show.More on Balance and charges →.
Junie takes a custom model profile: a JSON file naming an address, a model IDModel IDThe name a request calls a model by, lab/model, copied from Models.More on Models → and a key. A profile pointing at OpenDunes sends each request to POST /v1/chat/completions.
1. Install Junie CLI
| On | Install line |
|---|---|
| macOS, Linux | curl -fsSL https://junie.jetbrains.com/install.sh | bash |
| Windows, PowerShell | iex (irm 'https://junie.jetbrains.com/install.ps1') |
Create an API keyAPI keyThe key you create and send with every request that calls a model.More on API keys → for Junie alone, and cap it on API Keys (API keys shows how). Put it in your shell profile, ~/.zshrc or ~/.bashrc, as export OPENDUNES_API_KEY="…".
2. Write the model profile
Save this as ~/.junie/models/opendunes.json. The file's name, opendunes, is the profile's name.
{
"id": "anthropic/claude-sonnet-4.5",
"baseUrl": "https://opendunes.com/v1/chat/completions",
"apiType": "OpenAICompletion",
"apiKey": "${OPENDUNES_API_KEY}",
"displayName": "Claude Sonnet 4.5 on OpenDunes",
"providerName": "OpenDunes",
"fasterModel": {
"id": "anthropic/claude-haiku-4.5"
}
}| Key | Holds |
|---|---|
id | the model ID Junie sends, from Models |
baseUrl | the full address of the route, /v1/chat/completions included |
apiType | OpenAICompletion: the chat completions shape |
apiKey | your key, read from OPENDUNES_API_KEY when Junie starts |
fasterModel | a second model for Junie's side tasks, such as summaries |
Each model is charged at its own rate, shown on its page in Models.
Don't write the key itself into a profile under .junie/models/ in a project. That folder is committed, and the key goes with it.
Keep ${OPENDUNES_API_KEY} in apiKey: the profile can then be shared, and each person runs it on their own key.
3. Start Junie on the profile
junie --model custom:opendunesIn a session, /model custom:opendunes switches to it, and /model lists every model Junie knows, your profile among them. Send one task, then open Activity, in the app on opendunes.com: each request Junie sent is there, with its charge in DA.
If OPENDUNES_API_KEY is not set, Junie cannot load the profile. Open a new terminal after editing your shell profile.
Errors
| Status | Means | Do |
|---|---|---|
| 401 | the key is wrong, paused, revoked or expired | check OPENDUNES_API_KEY in the terminal Junie starts from |
| 402 | the balanceBalanceWhat you can spend, in DA.More on Balance and charges → is at zero or below, cannot pay the request's hold, or the key's cap is spent | make a depositDepositMoney entering your balance, by CIB or Edahabia card.More on Balance and charges →, or raise the cap |
| 404 | the model ID is not on sale, or baseUrl lacks /v1/chat/completions | copy the ID from Models, and the address from step 2 |
Every other status: Errors and retries. Other terminal agents: Coding agents.
Next: OpenCode · Hermes Agent
Last modified on