python -m runegraft (or call CLI.shell() from your own app) and you’ll see a prompt such as runegraft>.
Completion & validation
- Fuzzy tab completion: type
spand press Tab to matchspinner; flags and short options are suggested after the command name. - Autosuggestions: past input surfaces inline hints (fish shell style) that you can accept with the right arrow key.
- Live validation: Runegraft parses arguments as you type. You’ll see inline error messages when a required arg is missing or an option value has the wrong type.
Persistent history
Command history lives under~/.runegraft/history/<cli-name>.txt, so each CLI gets its own timeline. Run history show in the shell to display the latest entries or history clear to truncate the file.
Built-in helpers
| Command | Description |
|---|---|
help / ? | Print the structured help table (same output as CLI.print_help). |
exit, quit, q | Leave the shell. |
clear | Clear the terminal without leaving the session (Ctrl+L works too). |
alias | Manage simple aliases (alias set ll "list --long"). |
history | Show or clear recorded commands. |
! | Run the rest of the line as a system command without leaving the shell. |
Aliases
Aliases let you map short names to longer command strings. Because alias expansion only touches the first token, options remain intact:Embedding the shell
When you callCLI(shell_name).shell() inside your own program, the class automatically constructs the history path, prompt text, and completer tree from registered commands. No additional configuration is necessary unless you want to subclass Shell for deeper customization.