Smart Input Modes
Five ways to interact with the CLI. Use whichever fits your workflow.
| Mode | Syntax | Example |
|---|---|---|
| Semantic Search | opena2a ~<query> | opena2a ~drift |
| Contextual | opena2a ? | opena2a ? |
| Natural Language | opena2a "<query>" | opena2a "find leaked credentials" |
| Guided Wizard | opena2a | No arguments |
| Direct | opena2a <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.
opena2a ~driftopena2a ~tamperContextual 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.
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.
opena2aDirect Commands
Standard CLI usage with explicit command names and flags. See the command reference for all available commands.
opena2a protect --dry-run --format jsonWhen to Use Which
| Situation | Recommended Mode | Why |
|---|---|---|
| First time using the CLI | Guided Wizard | Walks you through all commands with descriptions. |
| Know what you want, not the command name | Semantic Search (~) | Fuzzy-matches descriptions, not just names. |
| Exploring what to do next in a project | Contextual (?) | Analyzes your project and suggests relevant commands. |
| Complex multi-step task | Natural Language ("...") | Describe the goal in plain English. |
| CI/CD pipelines or scripts | Direct | Deterministic, no prompts, machine-readable output. |
| Know exact command and flags | Direct | Fastest path, no interpretation overhead. |
More Examples
$ opena2a ~mcp Matched commands: mcp MCP server identity: audit, sign, verify detect Shadow AI Discovery: find unmanaged MCP servers
$ 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
$ 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.