Metadata-Version: 2.4
Name: pathcrumb
Version: 0.2.0
Summary: Keep Python file headers aligned with their relative paths
Project-URL: Homepage, https://github.com/cwahyu/pathcrumb
Project-URL: Repository, https://github.com/cwahyu/pathcrumb
Project-URL: Issues, https://github.com/cwahyu/pathcrumb/issues
Author: Catur Wahyu
License: MIT
License-File: LICENSE
Keywords: cli,code-quality,headers,lint,python
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Requires-Dist: tomli-w>=1.2.0
Requires-Dist: typer>=0.24.1
Description-Content-Type: text/markdown

# pathcrumb

Keep Python file headers aligned with their relative file paths.

## Installation

```bash
pipx install pathcrumb
```

## Usage

```bash
pathcrumb fix
pathcrumb check
```

## Examples

Add or update headers:

```bash
pathcrumb fix
pathcrumb fix src
```

Check for missing headers:

```bash
pathcrumb check
pathcrumb check --fail-on-missing
```

Preview changes:

```bash
pathcrumb fix --dry-run
```

CI mode:

```bash
pathcrumb fix --check
```

## Configuration

Configure via `pyproject.toml`:

```toml
[tool.pathcrumb]
target = ["src"]
ignore = ["tests"]
```

## Behavior

Each Python file should begin with:

```python
# path/to/file.py
```

Structure:

```text
shebang (optional)
path header
comment block (optional)

code
```

## Pre-commit

```yaml
repos:
  - repo: https://github.com/cwahyu/pathcrumb
    rev: v0.2.0
    hooks:
      - id: pathcrumb-fix
      - id: pathcrumb-check
```

## Development

```bash
uv run pytest
```

## License

MIT
