Skip to main content
The Opsh REPL is an interactive prompt where you type natural-language requests and Opsh translates them into shell commands in real time. It runs as a persistent session, so your working directory, history, and session state are preserved between requests.

Starting the REPL

Run opsh with no arguments to open the REPL:
Opsh starts a shell session, loads your configuration and recent shell history, then drops you into the interactive prompt.

The prompt

The prompt shows your current directory followed by >:
When you’re in your home directory, it displays ~ instead of the full path:

Typing a request

Type your request in plain English and press Enter. You don’t need to remember any command syntax — just describe what you want to do:
Opsh sends your request to your configured AI provider, which generates a shell command. Opsh then displays the command, a brief explanation of what it does, and its risk level before asking whether to run it.

The confirmation prompt

After Opsh shows the generated plan, it waits for your response: If you press e, Opsh shows an edit prompt where you can modify the command directly:
If you press r, Opsh asks the AI to produce a safer or simpler alternative.

Example session

Keyboard shortcuts

  • Ctrl+C — cancels the current input and returns to a fresh prompt. It does not exit Opsh.
  • Up arrow — cycles through your shell history within the REPL session, the same as in a standard terminal.

Exiting

Type !exit or press Ctrl+D to exit the REPL and return to your shell.
If you installed Opsh with shell integration, the REPL starts automatically whenever you open a new terminal window. You can disable this by running !uninstall to remove the shell integration, or by editing your shell startup file directly.