opendunes
Coding agents
Copy page ▾

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.
  2. Write the model profile.
  3. Start Junie on the profile.
  4. Run it from a script.

1. Install Junie CLI

OnInstall line
macOS, Linuxcurl -fsSL https://junie.jetbrains.com/install.sh | bash
Windows, PowerShelliex (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.

JSON
{
  "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"
  }
}
KeyHolds
idthe model ID Junie sends, from Models
baseUrlthe full address of the route, /v1/chat/completions included
apiTypeOpenAICompletion: the chat completions shape
apiKeyyour key, read from OPENDUNES_API_KEY when Junie starts
fasterModela 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

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.

Do

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

Shell
junie --model custom:opendunes

In 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.

Watch out

If OPENDUNES_API_KEY is not set, Junie cannot load the profile. Open a new terminal after editing your shell profile.

4. Run it from a script

Give the task as an argument, and Junie runs it without asking:

Shell
junie --model custom:opendunes "Fix the failing test in tests/test_cart.py"

A run without the interface trusts the project and loads its .junie settings without asking. Run it on your own code only.

Errors

StatusMeansDo
401the key is wrong, paused, revoked or expiredcheck OPENDUNES_API_KEY in the terminal Junie starts from
402the 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 spentmake a depositDepositMoney entering your balance, by CIB or Edahabia card.More on Balance and charges →, or raise the cap
404the model ID is not on sale, or baseUrl lacks /v1/chat/completionscopy 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