Metadata-Version: 2.4
Name: claude-code-pretty
Version: 0.1.3
Summary: Pretty formatter for Claude Code stream-json output
Project-URL: Homepage, https://github.com/lucasvtiradentes/claude-code-pretty
Project-URL: Repository, https://github.com/lucasvtiradentes/claude-code-pretty
Project-URL: Issues, https://github.com/lucasvtiradentes/claude-code-pretty/issues
Author: lucasvtiradentes
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: pre-commit>=4; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: ruff>=0.9; extra == 'dev'
Description-Content-Type: text/markdown

# claude-code-pretty

Pretty formatter for Claude Code - stream sessions in real-time or replay saved .jsonl files.

<table align="center">
  <tr>
    <th>without claude-code-pretty</th>
    <th>with claude-code-pretty</th>
  </tr>
  <tr>
    <td><img src="https://cdn.jsdelivr.net/gh/lucasvtiradentes/claude-code-pretty@main/.github/images/without-using.png" width="400"></td>
    <td><img src="https://cdn.jsdelivr.net/gh/lucasvtiradentes/claude-code-pretty@main/.github/images/demo.png" width="400"></td>
  </tr>
</table>

## Features

- stream mode    - run claude with pretty output in real-time
- replay mode    - replay saved .jsonl session files
- tool display   - formatted output for Glob, Grep, Bash, Read, Edit, etc.
- markdown       - renders **bold** and `code` with ANSI styles
- subagent depth - visual indentation for nested Task calls
- cost tracking  - shows duration, cost, tokens per session

## Installation

```bash
pip install claude-code-pretty
```

Aliases: `claudep`, `ccp`, `claude-code-pretty`

## Usage

```bash
# stream - run claude with pretty output (all args forwarded to claude)
claudep stream -p "explain this code"
claudep stream -p "fix the bug" --model sonnet --max-turns 3
claudep stream --resume

# show - replay a saved session in terminal
claudep show ~/.claude/projects/.../session.jsonl
```

Stream mode adds these flags automatically:
```
--print --verbose --dangerously-skip-permissions --output-format stream-json --include-partial-messages
```

## Environment

| Variable                 | Default | Description                         |
|--------------------------|---------|-------------------------------------|
| CP_TOOL_RESULT_MAX_CHARS | 300     | Max chars for tool results (0=hide) |
| CP_READ_PREVIEW_LINES    | 5       | Lines to preview from Read (0=hide) |

## Development

```bash
make install      # setup venv + install
make test         # run pytest
make check        # ruff lint

# dev alias (claudepd)
ln -sf $(pwd)/.venv/bin/claudep ~/.local/bin/claudepd # install
rm ~/.local/bin/claudepd                              # remove
```

## License

MIT
