Skip to main content

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.

PyPI version Python 3.11+ License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_code_prompter-0.1.4.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_code_prompter-0.1.4-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

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

Hashes for claude_code_prompter-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ee9dc46ce01dc40214d133c20eb4377f32fcf420fba1151a968bf91792a9510d
MD5 5eb4b281f55cff84b60339c2b6ce86d3
BLAKE2b-256 bb24e1990577bba78579557234f41ff45c005bff23351010da88eec1369a8bca

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_code_prompter-0.1.4.tar.gz:

Publisher: publish.yml on baijum/prompter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_code_prompter-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_code_prompter-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 895b9bb03f8535555a1fdc9792aaf3af4685cebaa359c865bb256c1f346f020e
MD5 fededb29a29d91bb3e506fec5fa62491
BLAKE2b-256 ec860f75af043b5e5cf868da2d30a33459bc5b08d2b94d7cbc2595041103d25d

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_code_prompter-0.1.4-py3-none-any.whl:

Publisher: publish.yml on baijum/prompter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page