docs: add Supporting Other CLIs section (#423)

docs: add Supporting Other CLIs section with Claude Code, Codex and OpenCode

Adds a new documentation section covering how to use the Alias API
with third-party scaffoldings (Claude Code via proxy, Codex CLI, and
OpenCode). Includes privacy/security warning banners and support
disclaimers on each page.
This commit is contained in:
UnaiAlias 2026-03-25 12:00:20 +01:00 committed by GitHub
parent e22a1220f7
commit fd5ca01b7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 267 additions and 0 deletions

View File

@ -0,0 +1,96 @@
# Claude Code
!!! danger "Third-Party Scaffolding — Privacy & Security Warning"
Third-party scaffoldings may be serving your data outside your environment.
For **privacy** and **cybersecurity refusal optimization**, use **CAI** to obtain the best performance.
Claude Code is Anthropic's official CLI for agentic coding. Because it speaks the **Anthropic API format** natively, it cannot talk directly to the Alias API (which is OpenAI-compatible). A small proxy is required to translate between the two.
!!! warning "Support Disclaimer"
Alias Robotics **does not provide support** for developments or integrations related to Claude Code. This page documents API compatibility only. Alias simply allows usage of the Alias API through your preferred scaffolding.
---
## How It Works
```
Claude Code → Anthropic API format
claude-code-proxy (localhost:8082)
OpenAI-compatible format → Alias API
```
The proxy ([github.com/1rgs/claude-code-proxy](https://github.com/1rgs/claude-code-proxy)) intercepts Anthropic-format requests from Claude Code and forwards them to any OpenAI-compatible backend — in this case, the Alias API.
---
## Setup
### 1. Get your Alias API Key
An `ALIAS_API_KEY` (format: `sk-...`) can be obtained from either of the following:
- **[CAI PRO](https://aliasrobotics.com/cybersecurityai.php)** — full cybersecurity AI platform with access to `alias1` and other models.
- **[Alias LLMs](https://aliasrobotics.com/aliasLLMs.php)** — acquire `alias2-mini` and other Alias language models directly.
### 2. Clone and configure the proxy
```bash
git clone https://github.com/1rgs/claude-code-proxy.git
cd claude-code-proxy
```
Create a `.env` file:
```bash
# Point to the Alias API
OPENAI_API_KEY="sk-your-alias-api-key-here"
OPENAI_BASE_URL="https://api.aliasrobotics.com:666/"
# Map Claude model names to Alias models
BIG_MODEL="alias1"
SMALL_MODEL="alias1"
PREFERRED_PROVIDER="openai"
```
### 3. Run the proxy
Install `uv` if needed, then start the server:
```bash
uv run uvicorn server:app --host 0.0.0.0 --port 8082 --reload
```
Or with Docker:
```bash
docker run -d --env-file .env -p 8082:8082 ghcr.io/1rgs/claude-code-proxy:latest
```
### 4. Launch Claude Code via the proxy
```bash
ANTHROPIC_BASE_URL=http://localhost:8082 claude
```
To avoid setting this every time, export it in your shell profile:
```bash
echo 'export ANTHROPIC_BASE_URL=http://localhost:8082' >> ~/.zshrc
```
---
## Verification
Inside Claude Code, run a quick prompt and confirm the response is served via `alias1`. Token usage and billing will appear in your Alias account.
---
## Related
- [CAI PRO Quickstart](../cai_pro_quickstart.md)
- [Available Models](../cai_list_of_models.md)
- [Environment Variables](../environment_variables.md)

72
docs/other_cli/codex.md Normal file
View File

@ -0,0 +1,72 @@
# Codex CLI
!!! danger "Third-Party Scaffolding — Privacy & Security Warning"
Third-party scaffoldings may be serving your data outside your environment.
For **privacy** and **cybersecurity refusal optimization**, use **CAI** to obtain the best performance.
[Codex CLI](https://github.com/openai/codex) is OpenAI's open-source terminal-based AI coding agent. Because it uses the **OpenAI API format** natively, it can connect directly to the Alias API without any proxy.
!!! warning "Support Disclaimer"
Alias Robotics **does not provide support** for developments or integrations related to Codex CLI. This page documents API compatibility only. Alias simply allows usage of the Alias API through your preferred scaffolding.
---
## Setup
### 1. Get your Alias API Key
An `ALIAS_API_KEY` (format: `sk-...`) can be obtained from either of the following:
- **[CAI PRO](https://aliasrobotics.com/cybersecurityai.php)** — full cybersecurity AI platform with access to `alias1` and other models.
- **[Alias LLMs](https://aliasrobotics.com/aliasLLMs.php)** — acquire `alias2-mini` and other Alias language models directly.
### 2. Install Codex CLI
```bash
npm install -g @openai/codex
```
### 3. Configure environment variables
```bash
export OPENAI_API_KEY="sk-your-alias-api-key-here"
export OPENAI_BASE_URL="https://api.aliasrobotics.com:666/"
```
To persist these, add them to your shell profile (`~/.zshrc`, `~/.bashrc`, etc.):
```bash
echo 'export OPENAI_API_KEY="sk-your-alias-api-key-here"' >> ~/.zshrc
echo 'export OPENAI_BASE_URL="https://api.aliasrobotics.com:666/"' >> ~/.zshrc
source ~/.zshrc
```
### 4. Run Codex with an Alias model
```bash
codex --model alias1
```
Or set the model inline per session:
```bash
OPENAI_API_KEY="sk-your-alias-api-key-here" \
OPENAI_BASE_URL="https://api.aliasrobotics.com:666/" \
codex --model alias1
```
---
## Notes
- The Alias API is fully OpenAI-compatible — no additional configuration is required beyond pointing the base URL and API key.
- Use `alias1` for best cybersecurity performance, or `alias0` for a faster, lighter alternative.
- Token usage and billing appear in your Alias account dashboard.
---
## Related
- [CAI PRO Quickstart](../cai_pro_quickstart.md)
- [Available Models](../cai_list_of_models.md)
- [Environment Variables](../environment_variables.md)

View File

@ -0,0 +1,91 @@
# OpenCode
!!! danger "Third-Party Scaffolding — Privacy & Security Warning"
Third-party scaffoldings may be serving your data outside your environment.
For **privacy** and **cybersecurity refusal optimization**, use **CAI** to obtain the best performance.
[OpenCode](https://opencode.ai) is an open-source, terminal-based AI coding assistant. It supports OpenAI-compatible providers, which means the Alias API can be plugged in directly without any proxy.
!!! warning "Support Disclaimer"
Alias Robotics **does not provide support** for developments or integrations related to OpenCode. This page documents API compatibility only. Alias simply allows usage of the Alias API through your preferred scaffolding.
---
## Setup
### 1. Get your Alias API Key
An `ALIAS_API_KEY` (format: `sk-...`) can be obtained from either of the following:
- **[CAI PRO](https://aliasrobotics.com/cybersecurityai.php)** — full cybersecurity AI platform with access to `alias1` and other models.
- **[Alias LLMs](https://aliasrobotics.com/aliasLLMs.php)** — acquire `alias2-mini` and other Alias language models directly.
### 2. Install OpenCode
```bash
npm install -g opencode-ai
```
Or via Homebrew (macOS):
```bash
brew install sst/tap/opencode
```
### 3. Configure the Alias provider
OpenCode uses a `~/.config/opencode/config.json` file. Add a custom OpenAI-compatible provider pointing to the Alias API:
```json
{
"provider": {
"alias": {
"api": "https://api.aliasrobotics.com:666/",
"name": "Alias Robotics",
"env": ["ALIAS_API_KEY"]
}
},
"model": "alias/alias1"
}
```
Then export your key:
```bash
export ALIAS_API_KEY="sk-your-alias-api-key-here"
```
### 4. Run OpenCode
```bash
opencode
```
OpenCode will pick up the configured provider and route requests to the Alias API.
---
## Alternative: environment variable approach
If you prefer not to edit the config file, OpenCode also respects standard OpenAI environment variables:
```bash
export OPENAI_API_KEY="sk-your-alias-api-key-here"
export OPENAI_BASE_URL="https://api.aliasrobotics.com:666/"
opencode --model alias1
```
---
## Notes
- Use `alias1` for best cybersecurity performance, or `alias0` for a faster, lighter alternative.
- Token usage and billing appear in your Alias account dashboard.
---
## Related
- [CAI PRO Quickstart](../cai_pro_quickstart.md)
- [Available Models](../cai_list_of_models.md)
- [Environment Variables](../environment_variables.md)

View File

@ -77,6 +77,14 @@ nav:
- Commands Reference: cli/commands_reference.md
- Advanced Usage: cli/advanced_usage.md
# ========================================
# SUPPORTING OTHER CLIs
# ========================================
- Supporting Other CLIs:
- Claude Code: other_cli/claude_code.md
- Codex CLI: other_cli/codex.md
- OpenCode: other_cli/opencode.md
# ========================================
# CORE CONCEPTS
# ========================================