Codex Command Extensions

Custom slash commands, Tab autocomplete and retained terminal views for Codex CLI. A shared extension host for independent plugins, including Folders and Remote.

View source on GitHubCheaux/codex-command-extensions

Build a Codex CLI command extension

The shared host reads a provider manifest. It does not require Codex Folders or Codex Remote to register your own commands. Install the host first.

Put terminal-extension.json at your package root and include it in your release:

{
  "schemaVersion": 1,
  "id": "my-extension",
  "commands": [{
    "name": "/mytool",
    "description": "Open my tool",
    "action": {
      "type": "view",
      "executable": "${NODE}",
      "args": ["${EXTENSION_ROOT}/dist/cli.js", "interactive"]
    }
  }]
}

Your installer calls codex-terminal register /absolute/path/to/terminal-extension.json. Registrations save the manifest path, so updating the package at that path updates its definitions for newly opened terminals. Duplicate command names and shortcuts are rejected. Missing or malformed providers are skipped with a diagnostic. Registering a provider does not execute its actions.

Supported placeholders are ${NODE} (the host’s Node executable), ${EXTENSION_ROOT} (the manifest directory), and ${CODEX_BIN} (the original Codex executable). Programs receive their own args and optional env; Codex model/sandbox flags are not forwarded to feature programs.

Command options:

Actions:

Register and inspect

codex-terminal register /absolute/path/to/terminal-extension.json
codex-terminal enable
codex-terminal status --json

Open a new Codex terminal and try the command. To use a provider for one launch without saving its registration:

codex-terminal launch --extension /absolute/path/to/terminal-extension.json --

Treat extension programs as code you choose to run. Registration itself does not execute the action. Source and tests document the current implementation; report issues without private chats or pairing credentials.