Support for Slash Commands and Custom Command Definitions via .codex File in VS Code Extension
What feature would you like to see?
Overview
It would be incredibly useful if the Codex VS Code extension supported command-style inputs directly within the edito allowing developers to trigger context-aware actions using commands that start with /, similar to modern AI IDEs or Discord-style interactions.
Proposal
Introduce two complementary features:
- Slash Commands (
/) in the Command Palette and Inline Editor Input
Developers could type / followed by a command (e.g., /generate-tests, /explain, /refactor to async, /specify, etc.) to trigger Codex actions.
- These could be auto-completed with descriptions (just like GitHub Copilot’s inline suggestions).
- Commands would support arguments (e.g.,
/api doc create user.ts) and could operate on highlighted code blocks, files, or entire projects.
- Custom Command Registry via
.codexFile
A new .codex configuration file at the project root would allow developers or teams to define their own commands essentially extending Codex behavior.
These custom commands could integrate into the Codex workflow, letting teams define their own AI syntax without hard-coding everything into the extension.
Benefits
- Makes Codex a programmable assistant rather than a static tool.
- Enables team-wide workflows and standardized AI conventions across repositories.
- Reduces cognitive friction: developers can interact with Codex through short, intuitive commands instead of long prompts.
- Encourages creative, scriptable AI development patterns (e.g.,
/speckit.plan,/testify,/summarize PR #123).
Long-Term Vision
Imagine the Codex extension as a true command-driven interface for software creation where each repo defines its own AI-powered commands that evolve with the codebase. Codex becomes the shell, and the .codex file defines the dialect.
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗