Smart Input Modes

Five ways to interact with the CLI. Use whichever fits your workflow.

ModeSyntaxExample
Semantic Searchopena2a ~<query>opena2a ~drift
Contextualopena2a ?opena2a ?
Natural Languageopena2a "<query>"opena2a "find leaked credentials"
Guided Wizardopena2aNo arguments
Directopena2a <command>opena2a protect --dry-run

Semantic Search (~)

Use ~ followed by a keyword to fuzzy-match commands by description, not just name. Useful when you know what you want to do but not the exact command.

# Find commands related to credential drift
opena2a ~drift
# Find commands related to tampering detection
opena2a ~tamper

Contextual Mode (?)

Run opena2a ? to get recommendations based on your current project context. The CLI analyzes the directory structure, package files, and configuration to suggest relevant commands.

# Get context-aware suggestions
opena2a ?

Natural Language

Describe what you want in plain English. The CLI uses local pattern matching first, falling back to Claude Haiku (with consent) for ambiguous queries.

opena2a "find leaked credentials in my project"
opena2a "check if my packages are trusted"

LLM fallback requires explicit consent. Enable with opena2a config llm on. All processing uses Claude Haiku for minimal latency.

Guided Wizard

Run opena2a with no arguments to start an interactive wizard that walks you through available commands with descriptions and prompts.

opena2a

Direct Commands

Standard CLI usage with explicit command names and flags. See the command reference for all available commands.

opena2a protect --dry-run --format json

When to Use Which

SituationRecommended ModeWhy
First time using the CLIGuided WizardWalks you through all commands with descriptions.
Know what you want, not the command nameSemantic Search (~)Fuzzy-matches descriptions, not just names.
Exploring what to do next in a projectContextual (?)Analyzes your project and suggests relevant commands.
Complex multi-step taskNatural Language ("...")Describe the goal in plain English.
CI/CD pipelines or scriptsDirectDeterministic, no prompts, machine-readable output.
Know exact command and flagsDirectFastest path, no interpretation overhead.

More Examples

# Semantic search: find MCP-related commands
$ opena2a ~mcp
Matched commands:
  mcp        MCP server identity: audit, sign, verify
  detect     Shadow AI Discovery: find unmanaged MCP servers
# Contextual: project has .env but no .gitignore
$ opena2a ?
Based on your project:
  1. protect   .env file found but not gitignored (auto-fixable)
  2. init      No security assessment found
  3. guard     Config files not signed
# Natural language: describe what you need
$ opena2a "sign my MCP server configs and check integrity"
Interpreted as: opena2a mcp sign <server>
Did you mean to sign a specific server? Available servers:
  filesystem, playwright, github

Mode Precedence

The CLI detects the input mode from the first argument. If the argument starts with ~, it enters semantic search mode. If it equals ?, it enters contextual mode. If it is wrapped in quotes, it enters natural language mode. If no arguments are provided, the guided wizard launches. Otherwise, the argument is treated as a direct command name. In CI mode (--ci), the guided wizard and contextual modes are disabled, and natural language mode falls back to direct command matching without LLM assistance.

Related