Skip to main content
Opsh includes a set of built-in meta commands you can run from the REPL prompt. These commands are prefixed with ! so Opsh knows not to pass them to the AI — they control session behavior directly. You can also pass several flags when launching Opsh from the command line.

Meta commands

Type any of these at the Opsh prompt and press Enter:

CLI flags

Pass these flags when running opsh from your terminal:

--init

Walks you through choosing an AI provider, entering your API key, setting your preferred model, and configuring options like warp mode. Saves the result to ~/.opsh/config.json. You can re-run --init at any time to update your configuration.
Generates the command and shows the plan, but exits without running anything. Useful for reviewing what Opsh would do before committing.

--shell

Forces Opsh to use the specified shell for command generation and execution. By default, Opsh detects your current shell automatically.
Use !cmd to toggle raw command mode when you want to run a shell command directly without any AI translation. For example, if you need to run a specific script exactly as written, switch into raw command mode, run it, then toggle back. Raw command mode is indicated in the prompt and affects only the current session.