Run prompts sequentially to tidy large code bases using Claude Code
Project description
Prompter
A Python tool for running prompts sequentially to tidy large code bases using Claude Code SDK.
Requirements
- Python 3.11 or higher
- Claude Code SDK
Installation
Install from PyPI:
pip install claude-code-prompter
Or install from source:
# Install the package
pip install -e .
# Install with development dependencies
pip install -e ".[dev]"
Usage
# Run all tasks from a configuration file
prompter config.toml
# Dry run to see what would be executed
prompter config.toml --dry-run
# Run a specific task
prompter config.toml --task task_name
# Check current status
prompter --status
# Clear saved state
prompter --clear-state
Development
Running Tests
# Run all tests
make test
# Run unit tests only
make test-unit
# Run integration tests only
make test-integration
# Run tests with coverage
make coverage
# Generate and open HTML coverage report
make coverage-html
# Show coverage report in terminal with missing lines
make coverage-report
Test Coverage
This project uses pytest-cov for test coverage reporting. Coverage configuration is in pyproject.toml.
# Run tests with coverage using pytest directly
pytest --cov=src/prompter --cov-report=term-missing
# Generate multiple coverage formats
pytest --cov=src/prompter --cov-report=term --cov-report=html --cov-report=xml
Using Tox for Multi-Version Testing
# Test across all Python versions
tox
# Test specific Python version
tox -e py311
# Run linting
tox -e lint
# Run type checking
tox -e type
# Generate coverage report
tox -e coverage
Code Quality
# Run linting
make lint
# Run type checking
make type-check
# Format code
make format
# Run all checks
make all
CI/CD
The project uses GitHub Actions for continuous integration. The workflow:
- Tests on Python 3.11 and 3.12
- Runs linting and type checking
- Generates coverage reports
- Uploads coverage to Codecov (if configured)
- Builds and validates the package
Configuration
Create a TOML configuration file with your tasks:
[settings]
check_interval = 30
max_retries = 3
working_directory = "/path/to/project"
[[tasks]]
name = "fix_warnings"
prompt = "Fix all compiler warnings in the codebase"
verify_command = "make test"
verify_success_code = 0
on_success = "next"
on_failure = "retry"
max_attempts = 3
timeout = 300
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_code_prompter-0.1.4.tar.gz.
File metadata
- Download URL: claude_code_prompter-0.1.4.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee9dc46ce01dc40214d133c20eb4377f32fcf420fba1151a968bf91792a9510d
|
|
| MD5 |
5eb4b281f55cff84b60339c2b6ce86d3
|
|
| BLAKE2b-256 |
bb24e1990577bba78579557234f41ff45c005bff23351010da88eec1369a8bca
|
Provenance
The following attestation bundles were made for claude_code_prompter-0.1.4.tar.gz:
Publisher:
publish.yml on baijum/prompter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_prompter-0.1.4.tar.gz -
Subject digest:
ee9dc46ce01dc40214d133c20eb4377f32fcf420fba1151a968bf91792a9510d - Sigstore transparency entry: 249930168
- Sigstore integration time:
-
Permalink:
baijum/prompter@280574c5617d7ee1ec74657010e3bc775c4234a7 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/baijum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@280574c5617d7ee1ec74657010e3bc775c4234a7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_code_prompter-0.1.4-py3-none-any.whl.
File metadata
- Download URL: claude_code_prompter-0.1.4-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
895b9bb03f8535555a1fdc9792aaf3af4685cebaa359c865bb256c1f346f020e
|
|
| MD5 |
fededb29a29d91bb3e506fec5fa62491
|
|
| BLAKE2b-256 |
ec860f75af043b5e5cf868da2d30a33459bc5b08d2b94d7cbc2595041103d25d
|
Provenance
The following attestation bundles were made for claude_code_prompter-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on baijum/prompter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_prompter-0.1.4-py3-none-any.whl -
Subject digest:
895b9bb03f8535555a1fdc9792aaf3af4685cebaa359c865bb256c1f346f020e - Sigstore transparency entry: 249930174
- Sigstore integration time:
-
Permalink:
baijum/prompter@280574c5617d7ee1ec74657010e3bc775c4234a7 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/baijum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@280574c5617d7ee1ec74657010e3bc775c4234a7 -
Trigger Event:
release
-
Statement type: