vibe.cli.utils¶
Shared CLI utilities for VIBE.
Contains color definitions and other common CLI functionality.
ReadlineHelper ¶
Helper for setting up readline with history and tab completion.
Provides consistent readline behavior across CLI tools with: - Persistent command history - Tab completion for commands - Proper cleanup on exit
Usage
helper = ReadlineHelper("review_playground", ["list", "classify", "quit"]) helper.setup()
... interactive loop ...¶
__init__ ¶
__init__(history_name: str, commands: list[str] | None = None, history_length: int = 500) -> None
Initialize readline helper.
| Parameters: |
|
|---|
print_status ¶
print_status(prefix: str, color: str, message: str, details: list[str] | None = None) -> None
Print a colored status message to stdout.
| Parameters: |
|
|---|
print_plain ¶
print_plain(color: str, message: str, details: list[str] | None = None) -> None
Print a colored message without prefix.
print_progress ¶
print_progress(message: str, color: str = 'dim') -> None
Print a progress message that overwrites the current line.
Use print_progress_done() or print() to move to the next line when done.
print_progress_done ¶
print_progress_done(message: str = '', color: str = 'green') -> None
Complete a progress line and move to next line.
| Parameters: |
|
|---|
get_vibe_data_dir ¶
get_vibe_data_dir() -> Path
Get the .vibe_data directory, creating it if necessary.
Returns the path to .vibe_data/ in the current working directory.