Skip to main content

claude-code-botman

A Python wrapper library for the Claude Code CLI that enables programmatic interaction with Claude's coding assistant.

Overview

claude-code-botman provides a simple Python interface to execute Claude Code commands from your scripts with full subprocess management, configuration handling, and response parsing.

Installation

pip install -e .

For development:

pip install -e ".[dev]"

Quick Start

from claude_code_botman import ClaudeCode

# Basic usage
claude = ClaudeCode()
response = claude("Write a hello world function in Python")

# With configuration
claude = ClaudeCode(model="sonnet", timeout=60)
response = claude("Refactor this code for better performance")

# With rules from CLAUDE.md
claude = ClaudeCode(rules="./CLAUDE.md")
response = claude("Follow the project guidelines and add tests")

Features

  • Simple API: Single method call to execute Claude Code commands
  • Configuration Management: Flexible config system with environment variable support
  • Response Parsing: Structured parsing of Claude's responses including file changes and errors
  • Session Management: Support for conversation continuity
  • Batch Operations: Process multiple commands efficiently
  • Error Handling: Comprehensive exception handling with specific error types

Requirements

  • Python 3.7+
  • Claude Code CLI installed and configured

Development

# Run tests
pytest

# Format code
black claude_code_botman/ tests/ examples/

# Type checking
mypy claude_code_botman/

License

MIT

Metadata

Release files for claude-code-botman 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-code-botman 1.3.0
File Size Uploaded
claude_code_botman-1.3.0.tar.gz 20.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-code-botman 1.3.0
File Interpreter ABI Platform
claude_code_botman-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.4 kB

Release files / claude_code_botman-1.3.0.tar.gz

Download URL claude_code_botman-1.3.0.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
020541f8f05772581ce0a79d4670f0cd9f235e6d360ac7802650532c7d9025a0
BLAKE2b-256 checksum
How to use checksums
26bff1e467d73aa9d172538335b1d2a574eceb2fbe8b975ea43885b16e3a5307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2025.

Transparency log

Release files / claude_code_botman-1.3.0-py3-none-any.whl

Download URL claude_code_botman-1.3.0-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21da020a9e1e36927899d9a442969b5cd4a2ac5a13640fa7739bf5b4c6b83673
BLAKE2b-256 checksum
How to use checksums
47b273c6ecd0de0889789916baa7213cd728ad5422e428a569d5180f0adceb2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page