CLI API Reference
User-facing commands. Built with Typer and Rich.
Main App
shh.cli.app
Main CLI application entry point.
default_command(ctx, style=None, translate=None)
Record audio and transcribe. Press Enter to stop.
Source code in shh/cli/app.py
main()
Setup Command
shh.cli.commands.setup
Setup command for configuring the shh CLI.
setup_command()
Interactive setup to configure OpenAI API key.
Prompts the user for their API key and saves it to the config file.
Source code in shh/cli/commands/setup.py
Config Command
shh.cli.commands.config
Config management commands for the shh CLI.
config_edit()
Open configuration file in $EDITOR.
Source code in shh/cli/commands/config.py
config_get(key)
Get a single configuration value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The setting key to retrieve (e.g., 'default_style') |
required |
Source code in shh/cli/commands/config.py
config_reset()
Reset configuration to defaults (keeps API key).
Source code in shh/cli/commands/config.py
config_set(key, value)
Update a configuration setting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The setting key to update |
required |
value
|
str
|
The new value |
required |
Source code in shh/cli/commands/config.py
config_show()
Display current configuration settings.
Source code in shh/cli/commands/config.py
config_wizard()
Interactive configuration wizard.
Source code in shh/cli/commands/config.py
Record Command
shh.cli.commands.record
Recording command for the shh CLI.
record_command(style=None, translate=None)
async
Record audio, transcribe, and optionally format/translate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style
|
TranscriptionStyle | None
|
Formatting style to apply (overrides config default) |
None
|
translate
|
str | None
|
Target language for translation |
None
|
Source code in shh/cli/commands/record.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |