> ## Documentation Index
> Fetch the complete documentation index at: https://pasteguard.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Coding Agents

> Protect codebase context, logs, tickets, and secrets in Codex, Claude Code, and other coding agents

Coding agents often receive more than code. They see logs, stack traces, support tickets, config snippets, test fixtures, environment examples, and production context.

PasteGuard sits between the coding agent and the provider, masks PII and secrets before the request leaves your environment, and restores supported placeholders in responses.

## What Gets Detected

* **Secrets**: API keys, private keys, database passwords, bearer tokens, JWTs, connection strings, and `.env` values
* **PII**: Customer names, emails, phone numbers, locations, account data, test fixtures, comments, and log output

PII detection works [in many languages](/concepts/pii-detection). Full entity lists: [PII Detection](/concepts/pii-detection), [Secrets Detection](/concepts/secrets-detection).

## Codex CLI

Codex users signed in with ChatGPT should use PasteGuard's Codex endpoint:

```toml theme={null}
model_provider = "pasteguard-codex"

[model_providers.pasteguard-codex]
name = "PasteGuard Codex"
base_url = "http://127.0.0.1:3000/codex"
wire_api = "responses"
requires_openai_auth = true
supports_websockets = false
```

Run a smoke test:

```bash theme={null}
codex exec --skip-git-repo-check 'Reply with exactly: ok'
```

<Note>
  Codex Responses requests are scanned, masked, unmasked, and shown in the dashboard. In route mode, sensitive Codex requests are blocked because PasteGuard does not route Codex Responses traffic to a local provider.
</Note>

## Claude Code

One environment variable:

```bash theme={null}
ANTHROPIC_BASE_URL=http://localhost:3000/anthropic claude
```

To make it permanent, add to your shell profile:

```bash theme={null}
export ANTHROPIC_BASE_URL=http://localhost:3000/anthropic
```

## Cursor

1. Open **Settings** -> **Models**
2. Scroll to **API Keys**
3. Enable **Override OpenAI Base URL**
4. Enter: `http://localhost:3000/openai/v1`
5. Add your OpenAI API key

## Other Coding Agents

Most coding agents respect standard provider base URL settings:

```bash theme={null}
# OpenAI-compatible agents
export OPENAI_API_BASE=http://localhost:3000/openai/v1

# Anthropic-compatible agents
export ANTHROPIC_BASE_URL=http://localhost:3000/anthropic
```

## API Endpoints

| Target                      | PasteGuard URL                    |
| --------------------------- | --------------------------------- |
| OpenAI-compatible agents    | `http://localhost:3000/openai/v1` |
| Anthropic-compatible agents | `http://localhost:3000/anthropic` |
| Codex CLI                   | `http://localhost:3000/codex`     |
