Metadata-Version: 2.3
Name: shh-cli
Version: 0.2.0
Summary: Voice transcription CLI powered by OpenAI Whisper
Keywords: whisper,transcription,voice,openai,cli,speech-to-text
Author: Marius Pruvot
Author-email: Marius Pruvot <marius.pruvot@example.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Utilities
Requires-Dist: rich>=13.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: openai>=1.0.0
Requires-Dist: pydantic-ai>=0.0.13
Requires-Dist: pydantic>=2.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: sounddevice>=0.4.6
Requires-Dist: scipy>=1.11.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: pyperclip>=1.8.2
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: typer>=0.20.0
Requires-Dist: ipython>=9.8.0
Requires-Dist: pytest>=8.0.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0 ; extra == 'dev'
Requires-Dist: pytest-mock>=3.12.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0 ; extra == 'dev'
Requires-Dist: mypy>=1.8.0 ; extra == 'dev'
Requires-Dist: ruff>=0.2.0 ; extra == 'dev'
Requires-Dist: poethepoet>=0.24.0 ; extra == 'dev'
Requires-Dist: scipy-stubs>=1.11.0 ; extra == 'dev'
Requires-Dist: mkdocs-material>=9.5.0 ; extra == 'dev'
Requires-Dist: mkdocstrings[python]>=0.24.0 ; extra == 'dev'
Requires-Python: >=3.11
Project-URL: Homepage, https://mariuspruvot.github.io/shh/
Project-URL: Repository, https://github.com/mariuspruvot/shh
Project-URL: Documentation, https://mariuspruvot.github.io/shh/
Project-URL: Issues, https://github.com/mariuspruvot/shh/issues
Provides-Extra: dev
Description-Content-Type: text/markdown

# shh

<p align="center">
  <a href="https://pypi.org/project/shh-cli/"><img src="https://img.shields.io/pypi/v/shh-cli.svg" alt="PyPI version"></a>
  <a href="https://pypi.org/project/shh-cli/"><img src="https://img.shields.io/pypi/pyversions/shh-cli.svg" alt="Python versions"></a>
  <a href="https://github.com/mariuspruvot/shh/actions/workflows/ci.yml"><img src="https://github.com/mariuspruvot/shh/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  <a href="https://github.com/mariuspruvot/shh/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
  <a href="https://mariuspruvot.github.io/shh/"><img src="https://img.shields.io/badge/docs-mkdocs-blue" alt="Documentation"></a>
</p>

Voice transcription CLI using OpenAI Whisper.

---

## Features

- Record from microphone (press Enter to stop)
- Format with AI (casual, business, neutral)
- Translate to any language
- Auto-copy to clipboard
- Async architecture
- Live progress display

## Quick Start

```bash
# Install with pipx (recommended)
pipx install shh-cli

# Setup API key
shh setup

# Start recording (press Enter to stop)
shh
```

## Installation

### Using pipx (recommended)

```bash
pipx install shh-cli
```

### Using pip

```bash
pip install shh-cli
```

### Development Setup

```bash
git clone https://github.com/mariuspruvot/shh.git
cd shh
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
```

## Usage

### Basic Recording

```bash
# Quick record - press Enter to stop
shh

# Minimal output (just result + "Done")
shh --quiet
shh -q
```

### Formatting Styles

```bash
# Casual style (removes filler words, conversational)
shh --style casual

# Business style (professional, formal)
shh --style business

# Neutral style (no formatting, Whisper output as-is)
shh --style neutral
```

### Translation

```bash
# Transcribe and translate to English
shh --translate English

# Combine formatting and translation
shh --style business --translate French

# Set default translation language
shh config set default_translation_language English

# Now recordings auto-translate without --translate flag
shh
```

### Output Modes

```bash
# Rich UI (default) - colors, panels, live progress
shh

# Quiet mode - minimal output for scripting
shh --quiet

# Set quiet mode as default
shh config set quiet_mode true

# Override quiet mode with verbose flag
shh --verbose

# Combine with other options
shh --quiet --style casual --translate English
```

### Configuration

```bash
# Show current configuration
shh config show

# Set default style
shh config set default_style casual

# Set default translation language
shh config set default_translation_language English

# Get specific setting
shh config get default_style

# Reset to defaults (preserves API key)
shh config reset

# Edit config file directly in $EDITOR
shh config edit
```

## Configuration File

Configuration is stored in a platform-specific location:

- **macOS**: `~/Library/Application Support/shh/config.json`
- **Linux**: `~/.config/shh/config.json`
- **Windows**: `%APPDATA%\shh\config.json`

You can also use environment variables with the `SHH_` prefix:

```bash
export SHH_OPENAI_API_KEY="sk-..."
export SHH_DEFAULT_STYLE="casual"
export SHH_DEFAULT_TRANSLATION_LANGUAGE="English"
```

## Tech Stack

- Python 3.11+ (async/await)
- OpenAI Whisper (transcription)
- PydanticAI (formatting)
- Typer (CLI)
- Rich (terminal UI)
- sounddevice (audio recording)

## Development

```bash
# Run tests
uv run poe test

# Type checking
uv run poe type

# Linting
uv run poe lint

# Formatting
uv run poe format

# All checks (type + lint + test)
uv run poe check
```

## Architecture

Pragmatic layered architecture: CLI → Core → Adapters

```
CLI        → Commands, orchestration
Core       → Domain models (TranscriptionStyle)
Adapters   → APIs, audio, clipboard
```

See [docs/architecture/overview.md](docs/architecture/overview.md) for details.

## License

MIT

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).
