CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-openai--codex

OpenAI Codex CLI is a lightweight coding agent that runs locally, providing multimodal inputs, rich approvals workflow, and terminal-based AI-assisted development

Overview
Eval results
Files

interactive-mode.mddocs/

Interactive Mode

The interactive mode is Codex CLI's default operation, providing a rich terminal user interface for conversational AI-assisted development.

Usage

codex [OPTIONS]

Options

-m, --model <MODEL>                          # Specify AI model to use
--oss                                        # Use open source models
-p, --profile <PROFILE>                      # Use specific config profile
-c, --config <KEY=VALUE>                    # Runtime configuration overrides
-s, --sandbox <MODE>                         # Set sandbox mode
-a, --ask-for-approval <POLICY>              # Set approval policy
--full-auto                                  # Enable full automation mode
--dangerously-bypass-approvals-and-sandbox  # Bypass safety controls (dangerous)
-C, --cd <DIRECTORY>                         # Set working directory
--search                                     # Enable web search
-i, --image <FILE>                           # Include image files (comma-separated)
[PROMPT]                                     # Initial prompt text (positional argument)

Examples

# Basic interactive session
codex

# Start with specific model
codex -m gpt-4

# Start with working directory
codex -C /path/to/project

# Include images in context
codex -i screenshot.png,diagram.jpg

# Start with initial prompt
codex "Help me refactor this code"

# Full automation with sandbox
codex --full-auto -s workspace-write

# Use configuration profile
codex -p production

Configuration Options

Sandbox Modes

-s, --sandbox none               # No sandboxing
-s, --sandbox network-none       # Disable network access
-s, --sandbox workspace-read     # Read-only workspace access
-s, --sandbox workspace-write    # Read-write workspace access

Approval Policies

-a, --ask-for-approval always      # Always ask for approval
-a, --ask-for-approval on-request  # Ask when explicitly requested
-a, --ask-for-approval never       # Never ask for approval

Model Selection

-m, --model gpt-4                  # Use GPT-4
-m, --model gpt-3.5-turbo         # Use GPT-3.5 Turbo
-m, --model <custom-model>        # Use custom model name
--oss                             # Use open source model

Interactive Features

  • Multimodal Input: Support for text, images, and screenshots
  • Conversation History: Maintains context across interactions
  • Real-time Streaming: Live response streaming from AI
  • Approval Workflow: Configurable approval gates for code changes
  • Sandbox Integration: Secure execution environment
  • Session Persistence: Saves sessions for later resumption

Session Management

Interactive sessions are automatically saved and can be resumed later:

  • Sessions are identified by UUID
  • Most recent session can be resumed with codex resume --last
  • Specific sessions can be resumed with codex resume <session-id>

File and Image Handling

# Include multiple images
codex -i "screenshot1.png,diagram.svg,mockup.jpg"

# Change working directory
codex -C /path/to/project

# Include images and set directory
codex -C /project -i "docs/diagram.png" "Implement the architecture shown"

Configuration Override Examples

# Override specific config values
codex -c model=gpt-4 -c sandbox_mode=workspace-write

# Use specific profile with overrides
codex -p team -c approval_policy=always

Install with Tessl CLI

npx tessl i tessl/npm-openai--codex

docs

authentication.md

development-utilities.md

execution-mode.md

index.md

interactive-mode.md

mcp-management.md

protocol-mode.md

session-management.md

tile.json