Docs · Coding agents

# Codex

Use Whiskers from Codex.

There are two ways to set up Codex:

-   Automatic (setup script) Recommended One command writes Codex's config and saves your key.
-   Manual (edit the configuration yourself) Copy each file into place and put your key in your environment.

## Automatic (setup script)

Recommended

The setup script does the manual steps for you: it checks your key, writes Codex's config, keeping what's already in the file, and saves the key in your environment. Run it again to pick up new models, change the key, or undo the setup.

Linux, macOS, WSL 

```
curl -fsSL https://whiskers.nyuu.dev/setup.sh | sh -s -- --agents codex
```

Windows PowerShell 

```
& ([scriptblock]::Create((irm https://whiskers.nyuu.dev/setup.ps1))) -Agents codex
```

Faster still: create a key on the [Keys page](https://whiskers.nyuu.dev/keys) and choose Codex there. You get this command with everything filled in, key included, so there's nothing to answer.

## Manual (edit the configuration yourself)

1.  1
    
    ### Put your API key in an environment variable
    
    Add this to your shell profile (~/.zshrc, ~/.bashrc), with your key from the Keys page.
    
    ~/.zshrc 
    
    ```
    export WHISKERS_API_KEY=sk-...
    ```
    
2.  2
    
    ### Add Whiskers as a provider
    
    In ~/.codex/config.toml. If the file exists, merge these settings into it. Codex can't look up a model it doesn't ship with, so the config gives it the model's context window; pick the model to start on.
    
    Model 
    
    More models
    
    Each of these is a setting Codex already has, shown by its own name. Leave one as it is and it keeps its default.
    
    `review_model` Code reviews with /review. 
    
    `agents.default_subagent_model` The agents Codex spawns, unless it names a model for one. 
    
    `memories.extract_model` Extracting memories from each conversation. 
    
    `memories.consolidation_model` Consolidating memories across conversations. 
    
    ~/.codex/config.toml 
    
    ```
    model_provider = "whiskers"
    model = "deepseek-v4.1-flash"
    model_context_window = 1000000
    show_raw_agent_reasoning = true
    web_search = "disabled"
    
    [model_providers.whiskers]
    name = "Whiskers"
    base_url = "https://whiskers.nyuu.dev/v1"
    env_key = "WHISKERS_API_KEY"
    wire_api = "responses"
    ```
    
3.  3
    
    ### Start it
    
    Run codex. It warns that it has no metadata for the model; that's expected, and the config covers what it needs. To switch models, pick another one above and copy the config again.
    
    shell 
    
    ```
    codex
    ```
    

The config lists today's models. When new ones appear on Models and pricing, copy it again.
