Help · Documentation
Set Up Your API With Coding Agents
Choose Codex CLI or Claude Code, install the client, connect it with an API token from the API Access page, then run it inside a real project folder.
AeroLink CLI
OPENAI-COMPATIBLEThe AeroLink terminal coding agent, running on your machine through your gateway.
OpenAI-compatible base URL
https://www.deepllm.pro/v1Anthropic-compatible base URL
https://www.deepllm.proAeroLink AI CLI - Windows
Watch the full walkthrough first:
AeroLink AI CLI is an AI coding agent for your AeroLink account. It runs in your terminal: you ask in plain language, and it reads your project, writes the code and runs your tests - every request goes through your own AeroLink Gateway, and the only models you can use are the models your Gateway offers.
Let's get started.
Prerequisites
To use AeroLink AI CLI in your terminal, you'll need:
- PowerShell (Command Prompt works too - see below).
- An AeroLink API key from API Access in your dashboard (it starts with
sk-).
You need nothing else - no Node.js, no Bun, no Git, no other AI tool.
Install
Open PowerShell and run:
irm https://www.deepllm.pro/cli/install.ps1 | iexAlready using Command Prompt? Run this instead:
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://www.deepllm.pro/cli/install.ps1 | iex"The installer verifies the download checksum, installs aerolink.exe into %LOCALAPPDATA%\AeroLink\bin and adds that folder to your PATH.
Configure
The quickest connection is from your dashboard: open API Access and press Set Up AeroLink CLI. Pick the key the CLI will use and the model it will run, and you get one command - no key to copy, no configuration file to write:
powershell -ExecutionPolicy Bypass -Command '$env:AEROLINK_SETUP_CODE=''XXXX-XXXX-XXXX-XXXX-XXXX-XXXX''; irm https://www.deepllm.pro/cli/setup-aerolink.ps1 | iex'On macOS or Linux:
AEROLINK_SETUP_CODE='XXXX-XXXX-XXXX-XXXX-XXXX-XXXX' bash -c "$(curl -fsSL https://www.deepllm.pro/cli/setup-aerolink.sh)"The setup checks that the CLI is installed, exchanges the one-time setup code over HTTPS and lets the CLI write its own configuration. The code works once and expires after 15 minutes; your API key is never part of the command.
Or configure it yourself - one command connects everything - the Base URL, your API key, and the model catalog:
aerolink login --base-url https://www.deepllm.pro/v1 --api-key sk_your_token_hereAeroLink checks the key against your Gateway (GET /v1/models), saves the connection and the model catalog on your computer, picks the first model as default and prints:
1Connected - 2 models available (https://www.deepllm.pro/v1).
2 Default model: aerolink/claude-sonnet-5.5
3
4 Next: run "aerolink" to start the coding agent.Prefer not to put the key on the command line? Run plain aerolink login and paste when asked - it asks for the Gateway URL followed by the key (the same flow is the /connect command inside the TUI). Prefer the one-command setup instead: Set Up AeroLink CLI in API Access does the whole thing with a one-time code. Scripts can set AEROLINK_BASE_URL + AEROLINK_API_KEY instead.
Priority when several sources exist: --api-key flag, then environment, then the saved configuration.
Initialize
Now that you're connected, navigate to a project you want to work on:
cd C:\path\to\projectAnd launch:
aerolinkThe interface opens immediately, ready to use - your default model and Gateway: connected are shown at the top. Nothing else to configure.
Usage
You are now ready to use AeroLink AI CLI. If you are new to using an AI coding agent, here are some examples that might help.
Ask questions
> list the files of this project and explain what it does
Add features
Give it enough detail to understand what you want - talk to it like you are talking to a junior developer on your team:
> add a unit test for the add() function
Make changes
For straightforward changes, ask it to build directly, pointing at an existing example to follow:
> the test fails - find out why and fix it
AeroLink works inside the folder it was started in: it reads and edits your files and runs your commands, and it asks before it changes anything or runs a command.
One-shot mode (no interface)
aerolink run "summarize this repository in five bullet points"aerolink run prints the answer and exits - useful in scripts and pipelines. Add --auto to approve the tool calls it needs without asking.
Start over
/undo reverts the changes of the last turn, /new starts a fresh session, Ctrl+C cancels the running task.
Models - yours only
AeroLink AI CLI shows only the models your AeroLink Gateway offers. There is no built-in model catalog and no third-party provider: the list comes from your Gateway at login time and is refreshed with:
aerolink modelsInside a session, /models opens the picker (your Gateway models only). The default model is the one aerolink login saved; AeroLink never swaps in a different model behind your back. If your Gateway stops offering your default model, AeroLink tells you and keeps the selection until you choose another with /models.
Customize
/themeschanges the look,/settingsthe editor and behaviour./agentsswitches between specialized agents;/variantschanges the thinking effort./mcps,/pluginsand/skillsextend the agent with MCP servers, plugins and skills.- Project-level configuration lives in an
aerolink.jsonfile in your project root.
Everyday commands
| Command | What it does |
|---|---|
aerolink | open the coding agent in the current folder |
aerolink run "<task>" | run one task, print the result, exit |
aerolink models | list the models your Gateway offers |
aerolink login | connect (or reconnect) to your Gateway |
aerolink doctor | check installation, configuration and Gateway connectivity |
aerolink config | show your settings (the API key is never printed) |
aerolink config set model aerolink/<id> | change the default model |
aerolink session list | list saved sessions |
aerolink uninstall | remove the configuration |
Inside a session:
| Command | What it does |
|---|---|
/models | pick one of your Gateway models |
/connect | set or change the Gateway connection (Base URL + key) |
/new , /sessions | start a fresh session , resume an old one |
/undo , /redo | revert , re-apply the changes of the last turn |
/diff | review the changes of this session |
/usage | show the usage your Gateway reported |
/help | show every command |
/exit | leave |
What the agent can do
The agent lists, reads and searches your files, writes and edits files, and runs commands in the project folder. Reading, listing and searching are always allowed inside the project folder; creating or editing a file and running a command need your approval - AeroLink shows what it wants to do and waits for your answer. Anything outside the project folder is refused.
Where things are stored
| Path | Contents |
|---|---|
%USERPROFILE%\.config\aerolink\aerolink.json | Gateway Base URL, API key, default model, model catalog (owner-only permissions) |
%USERPROFILE%\.local\share\aerolink\aerolink.db | your sessions and history |
%LOCALAPPDATA%\AeroLink\bin\aerolink.exe | the executable |
The API key is never printed and never logged: every command that shows it prints a masked form only.
Fix Old API Gateway Configuration
If this computer was configured with another API provider before, or you tried an older AeroLink setup, those old settings can still override your new one. That is why you can have a perfectly valid AeroLink key and still see Invalid API Token or 401 Unauthorized.
AeroLink CLI reads settings in this order:
- command-line flags (
aerolink login --base-url…) - environment variables (for example
AEROLINK_API_KEY) - your saved configuration (
…\.config\aerolink\aerolink.json)
So an old environment variable wins even when your saved config is correct.
Symptoms and cause
| What you see | What it means | Fix |
|---|---|---|
Invalid API token / 401 Unauthorized | The key the CLI used was rejected — usually the old environment variable, not the one you saved | Remove or update the old variable (steps 4–6 below) |
Could not reach / connection failure | The Base URL is wrong or points at a removed Gateway | Remove or update AEROLINK_BASE_URL |
aerolink doctor prints API key from AEROLINK_API_KEY | The environment key is winning | Remove or update the variable |
| Config looks correct, still 401 | Your shell never reloading the variable after install | Open a new terminal |
1 — Back up your existing configuration
Do not delete anything first. Make a copy of your current folder:
1$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
2$backup = "$env:USERPROFILE\.config\aerolink.backup-$stamp"
3Copy-Item "$env:USERPROFILE\.config\aerolink" -Recurse -Destination $backup -ForceBackups contain your key. Keep the backup folder private; you can delete it once AeroLink works.
2 — List conflicting environment variables (names only)
This command prints variable names, never values:
Get-ChildItem Env: | Where-Object Name -match '^(AEROLINK|ANTHROPIC|OPENAI|CODEX|CLAUDE|API_KEY)' | Select-Object -ExpandProperty Name3 — Check what AeroLink is using
1aerolink doctor
2aerolink config…\aerolink.jsonshows the Gateway Base URL and whether the key is usable.aerolink doctortells you which key is in effect and whether the Gateway accepts it.
If doctor says API key from AEROLINK_API_KEY, your environment is overriding the saved config.
4 — Remove only the conflicting environment variables
Remove only the variables that point at the old Gateway. These three are safe to remove if you do not use them for anything else:
1[Environment]::SetEnvironmentVariable("AEROLINK_API_KEY", $null, "User")
2[Environment]::SetEnvironmentVariable("AEROLINK_BASE_URL", $null, "User")If you need to keep them, update them to your current Gateway instead — do not leave an old value in place:
[Environment]::SetEnvironmentVariable("AEROLINK_API_KEY", "YOUR_API_KEY", "User")Do not touch variables you do not recognize — those belong to Claude Code, Codex, OpenCode or other apps.
Open a new PowerShell window after changing them — the current window keeps the old values.
5 — Point AeroLink at your Gateway
If the saved config is still wrong (or you want to start fresh with your new key), do the connect flow again:
aerolink loginPaste the configuration code from API Access → Set Up AeroLink CLI (or press the button again for a fresh one).
6 — Verify
aerolink doctorYou should see the Gateway reachable and your models listed. If it still fails, verify that AEROLINK_API_KEY is set to the current value (new window) or clear it and repeat from step 4.
Restoration
To restore the backup exactly as it was:
Copy-Item "$backup\*" -Recurse -Destination "$env:USERPROFILE\.config\aerolink" -ForceIf you prefer a clean start, leave the backup untouched and press Set Up AeroLink CLI again — rerunning the setup is safe.
Troubleshooting
"The gateway rejected the API key." The token is wrong, revoked or belongs to another Gateway. Create a new one in API Access and run aerolink login again (or /connect inside a session).
"Could not reach the gateway at ..." Check the Base URL with aerolink config - it must be the OpenAI-compatible address ending in /v1 - and that the Gateway is reachable from your network.
"Model unavailable: ..." You asked for a model your Gateway does not offer. Run aerolink models to see the ones you can use.
An old AEROLINK_API_KEY environment variable wins over my saved key. AeroLink gives environment variables priority over the saved configuration (a flag overrides both), so an old or revoked variable reports "Invalid API token." even after a successful setup. Run aerolink doctor to see which key is in effect. If the environment key is the problem, remove it in a new PowerShell window: [Environment]::SetEnvironmentVariable("AEROLINK_API_KEY", $null, "User") (or delete the AEROLINK_API_KEY and AEROLINK_BASE_URL rows in System Properties > Environment Variables) — or update them to your current Gateway address and key. Nothing is deleted automatically: Set Up AeroLink CLI only prints what to do, and the saved configuration stays correct.
"Updates are not configured for this AeroLink build." This build is distributed by your Gateway, not by an update server: re-run the install command from the top of this page to update.
Windows refuses to run the executable. Smart App Control can block unsigned files. Keep the protection on and let an administrator allow the file.
aerolink is not recognized after installing. Open a new terminal so the PATH change applies.
"Managed service port ... is already in use by another process." Another program (often an OpenCode desktop service) already holds the CLI's local port. Give the CLI its own port and run it again:
aerolink service set port 28895
(The same happens with aerolink run - it starts the same local service.)
Known limitations
- Windows x64 is the platform verified today; macOS and Linux installers ship with the same flow.
- The executable is not code-signed.
- The interactive interface needs a real terminal (Windows Terminal, conhost); it does not run inside pipes or editors' mini-terminals.
- Sessions are stored on your computer, in the paths above.