Skip to main content

Python orchestrator for autonomous Claude Code agents in Docker

Project description

pycastle

pycastle is a Python orchestrator for autonomous Claude Code agents running inside Docker containers. It is inspired by sandcastle — Matt Pocock's original project — and brings the same multi-agent, worktree-based workflow to a pip-installable Python package with configurable prompts, Dockerfile, and environment.

Installation

pip install pycastle

Prerequisites

  • Python 3.11.3 or later
  • Docker (daemon must be running)
  • A valid ANTHROPIC_API_KEY environment variable (or a .env file in your project root)

CLI Commands

pycastle init

Copies the default pycastle/ configuration directory into your project root. This directory contains the Dockerfile, config.py, and prompt templates (plan-prompt.md, implement-prompt.md, review-prompt.md, merge-prompt.md, CODING_STANDARDS.md) that drive the agents. Run this once per repository, then customise the files to suit your project.

pycastle init

pycastle build

Builds the Docker image defined in pycastle/Dockerfile. Pass --no-cache to force a clean build. You must rebuild whenever you change the Dockerfile or install new dependencies.

pycastle build [--no-cache]

pycastle run

Reads a GitHub issue number and orchestrates a full agent pipeline inside Docker: a planner drafts an implementation plan, one or more implementer agents write the code on isolated git worktrees, a reviewer checks each implementation, and a merger integrates the approved changes. Progress is streamed to your terminal in real time.

pycastle run

Configuration

All runtime configuration lives in pycastle/config.py. Key settings include the GitHub repository, the Docker image name, agent model selection, and flags such as skip_preflight. Edit this file after running pycastle init to tailor the pipeline to your project.

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

pycastle-0.1.0.tar.gz (91.5 kB view details)

Uploaded Source

Built Distribution

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

pycastle-0.1.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file pycastle-0.1.0.tar.gz.

File metadata

  • Download URL: pycastle-0.1.0.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycastle-0.1.0.tar.gz
Algorithm Hash digest
SHA256 418a6d8e9b2ff032962f5eac4530c3a0a78389107a18c6ec9641487c650c8485
MD5 5af0cd7355ffa8535a553b54483bbffc
BLAKE2b-256 7408d3de03379eaf14b083046181a6b708adc3ba77de3027325d9ff6a6c3a258

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycastle-0.1.0.tar.gz:

Publisher: publish.yml on Johannes-Kutsch/pycastle

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

File details

Details for the file pycastle-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycastle-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycastle-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acc8a442e67ef3e62afdbe4025afef298f56a235d0da8fdd961c859d6eb42743
MD5 328f5739756370ea3ffe29e92223582b
BLAKE2b-256 572dd8e7b118bb64b8eb7153ecf225d51c8fe35e26e7cff2393ac5adac04ba86

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycastle-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Johannes-Kutsch/pycastle

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