agent-cli 0.70.4__py3-none-any.whl → 0.71.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -296,45 +296,45 @@ def transcribe_daemon( # noqa: PLR0912
296
296
  "user",
297
297
  "--role",
298
298
  "-r",
299
- help="Role name for logging (e.g., 'meeting', 'notes', 'user').",
299
+ help="Label for log entries. Use to distinguish speakers or contexts in logs.",
300
300
  ),
301
301
  silence_threshold: float = typer.Option(
302
302
  1.0,
303
303
  "--silence-threshold",
304
304
  "-s",
305
- help="Seconds of silence to end a speech segment.",
305
+ help="Seconds of silence after speech to finalize a segment. Increase for slower speakers.",
306
306
  ),
307
307
  min_segment: float = typer.Option(
308
308
  0.25,
309
309
  "--min-segment",
310
310
  "-m",
311
- help="Minimum speech duration in seconds to trigger a segment.",
311
+ help="Minimum seconds of speech required before a segment is processed. Filters brief sounds.",
312
312
  ),
313
313
  vad_threshold: float = typer.Option(
314
314
  0.3,
315
315
  "--vad-threshold",
316
- help="VAD speech detection threshold (0.0-1.0). Higher = more aggressive filtering.",
316
+ help="Silero VAD confidence threshold (0.0-1.0). Higher values require clearer speech; lower values are more sensitive to quiet/distant voices.",
317
317
  ),
318
318
  save_audio: bool = typer.Option(
319
319
  True, # noqa: FBT003
320
320
  "--save-audio/--no-save-audio",
321
- help="Save audio segments as MP3 files.",
321
+ help="Save each speech segment as MP3. Requires `ffmpeg` to be installed.",
322
322
  ),
323
323
  audio_dir: Path | None = typer.Option( # noqa: B008
324
324
  None,
325
325
  "--audio-dir",
326
- help="Directory for MP3 files. Default: ~/.config/agent-cli/audio",
326
+ help="Base directory for MP3 files. Files are organized by date: `YYYY/MM/DD/HHMMSS_mmm.mp3`. Default: `~/.config/agent-cli/audio`.",
327
327
  ),
328
328
  transcription_log: Path | None = typer.Option( # noqa: B008
329
329
  None,
330
330
  "--transcription-log",
331
331
  "-t",
332
- help="JSON Lines log file path. Default: ~/.config/agent-cli/transcriptions.jsonl",
332
+ help="JSONL file for transcript logging (one JSON object per line with timestamp, role, raw/processed text, audio path). Default: `~/.config/agent-cli/transcriptions.jsonl`.",
333
333
  ),
334
334
  clipboard: bool = typer.Option(
335
335
  False, # noqa: FBT003
336
336
  "--clipboard/--no-clipboard",
337
- help="Copy each transcription to clipboard.",
337
+ help="Copy each completed transcription to clipboard (overwrites previous). Useful with `--llm` to get cleaned text.",
338
338
  ),
339
339
  # --- Provider Selection ---
340
340
  asr_provider: str = opts.ASR_PROVIDER,
@@ -368,25 +368,37 @@ def transcribe_daemon( # noqa: PLR0912
368
368
  config_file: str | None = opts.CONFIG_FILE,
369
369
  print_args: bool = opts.PRINT_ARGS,
370
370
  ) -> None:
371
- """Run a continuous transcription daemon with voice activity detection.
371
+ """Continuous transcription daemon using Silero VAD for speech detection.
372
372
 
373
- This command runs indefinitely, capturing audio from your microphone,
374
- detecting speech segments using Silero VAD, transcribing them, and
375
- logging results with timestamps.
373
+ Unlike `transcribe` (single recording session), this daemon runs indefinitely
374
+ and automatically detects speech segments using Voice Activity Detection (VAD).
375
+ Each detected segment is transcribed and logged with timestamps.
376
376
 
377
- Examples:
378
- # Basic daemon
379
- agent-cli transcribe-daemon
377
+ **How it works:**
380
378
 
381
- # With role and custom silence threshold
382
- agent-cli transcribe-daemon --role meeting --silence-threshold 1.5
379
+ 1. Listens continuously to microphone input
380
+ 2. Silero VAD detects when you start/stop speaking
381
+ 3. After `--silence-threshold` seconds of silence, the segment is finalized
382
+ 4. Segment is transcribed (and optionally cleaned by LLM with `--llm`)
383
+ 5. Results are appended to the JSONL log file
384
+ 6. Audio is saved as MP3 if `--save-audio` is enabled (requires `ffmpeg`)
385
+
386
+ **Use cases:** Meeting transcription, note-taking, voice journaling, accessibility.
383
387
 
384
- # With LLM cleanup
385
- agent-cli transcribe-daemon --llm --role notes
388
+ **Examples:**
389
+
390
+ agent-cli transcribe-daemon
391
+ agent-cli transcribe-daemon --role meeting --silence-threshold 1.5
392
+ agent-cli transcribe-daemon --llm --clipboard --role notes
393
+ agent-cli transcribe-daemon --transcription-log ~/meeting.jsonl --no-save-audio
394
+ agent-cli transcribe-daemon --asr-provider openai --llm-provider gemini --llm
386
395
 
387
- # Custom log file and audio directory
388
- agent-cli transcribe-daemon --transcription-log ~/meeting.jsonl --audio-dir ~/audio
396
+ **Tips:**
389
397
 
398
+ - Use `--role` to tag entries (e.g., `speaker1`, `meeting`, `personal`)
399
+ - Adjust `--vad-threshold` if detection is too sensitive (increase) or missing speech (decrease)
400
+ - Use `--stop` to cleanly terminate a running daemon
401
+ - With `--llm`, transcripts are cleaned up (punctuation, filler words removed)
390
402
  """
391
403
  if print_args:
392
404
  print_command_line_args(locals())
@@ -229,15 +229,23 @@ def voice_edit(
229
229
  config_file: str | None = opts.CONFIG_FILE,
230
230
  print_args: bool = opts.PRINT_ARGS,
231
231
  ) -> None:
232
- """Interact with clipboard text via a voice command using local or remote services.
233
-
234
- Usage:
235
- - Run in foreground: agent-cli voice-edit --input-device-index 1
236
- - Run in background: agent-cli voice-edit --input-device-index 1 &
237
- - Check status: agent-cli voice-edit --status
238
- - Stop background process: agent-cli voice-edit --stop
239
- - List output devices: agent-cli voice-edit --list-output-devices
240
- - Save TTS to file: agent-cli voice-edit --tts --save-file response.wav
232
+ """Edit or query clipboard text using voice commands.
233
+
234
+ **Workflow:** Captures clipboard text → records your voice command → transcribes
235
+ it sends both to an LLM → copies result back to clipboard.
236
+
237
+ Use this for hands-free text editing (e.g., "make this more formal") or
238
+ asking questions about clipboard content (e.g., "summarize this").
239
+
240
+ **Typical hotkey integration:** Run `voice-edit &` on keypress to start
241
+ recording, then send SIGINT (via `--stop`) on second keypress to process.
242
+
243
+ **Examples:**
244
+
245
+ - Basic usage: `agent-cli voice-edit`
246
+ - With TTS response: `agent-cli voice-edit --tts`
247
+ - Toggle on/off: `agent-cli voice-edit --toggle`
248
+ - List audio devices: `agent-cli voice-edit --list-devices`
241
249
  """
242
250
  if print_args:
243
251
  print_command_line_args(locals())
agent_cli/cli.py CHANGED
@@ -14,9 +14,32 @@ from .config import load_config, normalize_provider_defaults
14
14
  from .core.process import set_process_title
15
15
  from .core.utils import console
16
16
 
17
+ _HELP = """\
18
+ AI-powered voice, text, and development tools.
19
+
20
+ **Voice & Text:**
21
+
22
+ - **Voice-to-text** - Transcribe speech with optional LLM cleanup
23
+ - **Text-to-speech** - Convert text to natural-sounding audio
24
+ - **Voice chat** - Conversational AI with memory and tool use
25
+ - **Text correction** - Fix grammar, spelling, and punctuation
26
+
27
+ **Development:**
28
+
29
+ - **Parallel development** - Git worktrees with integrated coding agents
30
+ - **Local servers** - ASR/TTS with Wyoming + OpenAI-compatible APIs,
31
+ MLX on macOS ARM, CUDA/CPU Whisper, and automatic model TTL
32
+
33
+ **Provider Flexibility:**
34
+
35
+ Mix local (Ollama, Wyoming) and cloud (OpenAI, Gemini) backends freely.
36
+
37
+ Run `agent-cli <command> --help` for detailed command documentation.
38
+ """
39
+
17
40
  app = typer.Typer(
18
41
  name="agent-cli",
19
- help="A suite of AI-powered command-line tools for text correction, audio transcription, and voice assistance.",
42
+ help=_HELP,
20
43
  context_settings={"help_option_names": ["-h", "--help"]},
21
44
  add_completion=True,
22
45
  rich_markup_mode="markdown",
@@ -56,7 +79,7 @@ def main(
56
79
  ),
57
80
  ] = False,
58
81
  ) -> None:
59
- """A suite of AI-powered tools."""
82
+ """AI-powered voice, text, and development tools."""
60
83
  if ctx.invoked_subcommand is None:
61
84
  console.print("[bold red]No command specified.[/bold red]")
62
85
  console.print("[bold yellow]Running --help for your convenience.[/bold yellow]")
agent_cli/config_cmd.py CHANGED
@@ -20,7 +20,17 @@ from agent_cli.core.utils import console
20
20
 
21
21
  config_app = typer.Typer(
22
22
  name="config",
23
- help="Manage agent-cli configuration files.",
23
+ help="""Manage agent-cli configuration files.
24
+
25
+ Config files are TOML format and searched in order:
26
+
27
+ 1. `./agent-cli-config.toml` (project-local)
28
+ 2. `~/.config/agent-cli/config.toml` (user default)
29
+
30
+ Settings in `[defaults]` apply to all commands. Override per-command
31
+ with sections like `[chat]` or `[transcribe]`. CLI arguments override
32
+ config file settings.
33
+ """,
24
34
  add_completion=True,
25
35
  rich_markup_mode="markdown",
26
36
  no_args_is_help=True,
@@ -40,30 +50,30 @@ CONFIG_PATH_OPTION: Path | None = typer.Option(
40
50
  None,
41
51
  "--path",
42
52
  "-p",
43
- help="Path to config file. Uses auto-detection if not specified.",
53
+ help="Override auto-detection and use this config file path.",
44
54
  )
45
55
  CONFIG_PATH_INIT_OPTION: Path | None = typer.Option(
46
56
  None,
47
57
  "--path",
48
58
  "-p",
49
- help="Custom path for config file. Default: ~/.config/agent-cli/config.toml",
59
+ help="Where to create the config file (default: `~/.config/agent-cli/config.toml`).",
50
60
  )
51
61
  FORCE_OPTION: bool = typer.Option(
52
62
  False, # noqa: FBT003
53
63
  "--force",
54
64
  "-f",
55
- help="Overwrite existing config without confirmation.",
65
+ help="Overwrite existing config without prompting for confirmation.",
56
66
  )
57
67
  RAW_OPTION: bool = typer.Option(
58
68
  False, # noqa: FBT003
59
69
  "--raw",
60
70
  "-r",
61
- help="Output raw file contents (for copy-paste).",
71
+ help="Print plain file contents without syntax highlighting or line numbers.",
62
72
  )
63
73
  JSON_OPTION: bool = typer.Option(
64
74
  False, # noqa: FBT003
65
75
  "--json",
66
- help="Output as JSON for automation.",
76
+ help="Output as JSON with `path`, `exists`, and `content` fields.",
67
77
  )
68
78
 
69
79
 
@@ -149,10 +159,13 @@ def config_init(
149
159
  path: Path | None = CONFIG_PATH_INIT_OPTION,
150
160
  force: bool = FORCE_OPTION,
151
161
  ) -> None:
152
- """Create a new config file with all options commented out.
162
+ """Create a new config file with all options as commented-out examples.
153
163
 
154
- The generated config file serves as a template showing all available
155
- options. Uncomment and modify the options you want to customize.
164
+ Generates a TOML template with `[defaults]` for global settings and
165
+ command-specific sections like `[chat]`, `[transcribe]`, etc. Uncomment
166
+ and edit the options you want to customize.
167
+
168
+ Example: `agent-cli config init && agent-cli config edit`
156
169
  """
157
170
  target_path = _get_config_file(path) or USER_CONFIG_PATH
158
171
 
@@ -182,7 +195,9 @@ def config_edit(
182
195
  ) -> None:
183
196
  """Open the config file in your default editor.
184
197
 
185
- The editor is determined by: $EDITOR > $VISUAL > platform default.
198
+ Editor preference: `$EDITOR` `$VISUAL` `nano`/`vim` → `vi` (or
199
+ `notepad` on Windows). If no config exists, run `agent-cli config init`
200
+ first.
186
201
  """
187
202
  config_file = _get_config_file(path)
188
203
 
@@ -234,7 +249,11 @@ def config_show(
234
249
  raw: bool = RAW_OPTION,
235
250
  json_output: bool = JSON_OPTION,
236
251
  ) -> None:
237
- """Display the config file location and contents."""
252
+ """Display the active config file path and contents.
253
+
254
+ By default, shows syntax-highlighted TOML with line numbers. Use `--raw`
255
+ for plain output (useful for piping), or `--json` for programmatic access.
256
+ """
238
257
  config_file = _get_config_file(path)
239
258
 
240
259
  if config_file is None: