Getting Started

Installation and configuration

Install the Ahur CLI and set up your API key to run AI assistants

Prerequisites

  • Node.js version 18 or later
  • npm or pnpm (for installation)
  • A valid API key from the Ahur developer panel
To get an API key, head to your Ahur account panel. Keys always start with the ak_ prefix.

Installation methods

npm
npm install -g ahur-cli

Once installed, the ahur command becomes available:

ahur --version

2. Run directly with npx

You can run it straight away, without installing anything:

npx ahur-cli launch claude

Setting your API key

After installation, the first step is to set your API key:

ahur config set api_key ak_38d1b7fc6a7ac5a37d051820bba4427438e2896111015c8484047bfaeb5fbf57

The key is stored in ~/.config/ahur/config.json.

Optional settings

Set the server address (if you need a dedicated server):

ahur config set base_url https://api.ahur.ir/v1

Set the default model:

ahur config set model ahur/general

Running an assistant

Running Claude Code

ahur launch claude

The Ahur CLI automatically:

  1. Checks whether Claude Code is present on your system
  2. Installs it if needed
  3. Fetches the list of Ahur models
  4. Shows you the models so you can pick one
  5. Starts Claude Code wired up to the Ahur API

Running with a specific model

ahur launch claude --model ahur/general

Resuming a previous conversation

To resume an earlier conversation, pass its ID with --resume:

ahur launch claude --resume sess_abc123

This argument is passed straight through to the target assistant.

Running the Codex CLI

ahur launch codex

Managing your configuration

ahur config show              # show all settings
ahur config get api_key       # show the API key
ahur config set model <name>  # set the default model
The config file lives at ~/.config/ahur/config.json. You can edit it directly if you prefer.

Troubleshooting

"No API key configured" error

ahur config set api_key ak_your_key_here

"Failed to fetch models" error

  • Check your internet connection
  • Check the server address: ahur config get base_url
  • Make sure your API key is correct

Assistant installation errors

If the automatic install of Claude Code or the Codex CLI fails, you can install it manually:

npm install -g @anthropic-ai/claude-code
# or
npm install -g @openai/codex

Then run ahur launch claude again.

Resources