Codex

Set up dkod with OpenAI Codex CLI — OpenAI's agentic coding tool.


Quick Setup

Paste the prompt below into your Codex session. It will automatically install and configure the dkod CLI.

Install MCP

Connect Codex to dkod's MCP server for direct access to semantic code tools.

Cloud (dkod.io)

Add to your Codex configuration (~/.codex/config.toml):

[mcp_servers.dkod]
url = "https://api.dkod.io/mcp"

Codex will prompt for authentication on first use.

Self-Hosted

For self-hosted setups, see the Self-Hosted quickstart.

Point to your local dkod server:

[mcp_servers.dkod]
url = "http://localhost:8080/mcp"

For self-hosted, set your auth token before use:

export DKOD_AUTH_TOKEN=your-secret-token

Install the CLI

# Install via Cargo (requires Rust)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install dk-cli

Initialize & Authenticate

# Authenticate via browser (cloud only)
dk login

# Open a session (auto-detects from git remote)
dk init

For self-hosted setups, skip dk login and set export DKOD_AUTH_TOKEN=your-secret-token and export DKOD_GRPC_ADDR=http://localhost:50051, then run dk init.

Usage

Codex can use the dkod CLI directly through shell commands:

# Search code semantically
dk search "database connection pool"

# Check project status
dk status

# View changes
dk diff

# Commit and push
dk commit -m "Add connection pooling"
dk push