# 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
```bash
pip install -e .
```
For development:
```bash
pip install -e ".[dev]"
```
## Quick Start
```python
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
```bash
# Run tests
pytest
# Format code
black claude_code_botman/ tests/ examples/
# Type checking
mypy claude_code_botman/
```
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "claude-code-botman",
"maintainer": "Octavio Pavon",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "octavio.pavon@botman-ai.com",
"keywords": "claude, ai, cli, wrapper, anthropic, code-generation, automation, subprocess, bot, mcp, model-context-protocol",
"author": "Octavio Pavon",
"author_email": "octavio.pavon@botman-ai.com",
"download_url": "https://files.pythonhosted.org/packages/26/bf/f1e467d73aa9d172538335b1d2a574eceb2fbe8b975ea43885b16e3a5307/claude_code_botman-1.3.0.tar.gz",
"platform": null,
"description": "# claude-code-botman\n\nA Python wrapper library for the Claude Code CLI that enables programmatic interaction with Claude's coding assistant.\n\n## Overview\n\nclaude-code-botman provides a simple Python interface to execute Claude Code commands from your scripts with full subprocess management, configuration handling, and response parsing.\n\n## Installation\n\n```bash\npip install -e .\n```\n\nFor development:\n```bash\npip install -e \".[dev]\"\n```\n\n## Quick Start\n\n```python\nfrom claude_code_botman import ClaudeCode\n\n# Basic usage\nclaude = ClaudeCode()\nresponse = claude(\"Write a hello world function in Python\")\n\n# With configuration\nclaude = ClaudeCode(model=\"sonnet\", timeout=60)\nresponse = claude(\"Refactor this code for better performance\")\n\n# With rules from CLAUDE.md\nclaude = ClaudeCode(rules=\"./CLAUDE.md\")\nresponse = claude(\"Follow the project guidelines and add tests\")\n```\n\n## Features\n\n- **Simple API**: Single method call to execute Claude Code commands\n- **Configuration Management**: Flexible config system with environment variable support\n- **Response Parsing**: Structured parsing of Claude's responses including file changes and errors\n- **Session Management**: Support for conversation continuity\n- **Batch Operations**: Process multiple commands efficiently\n- **Error Handling**: Comprehensive exception handling with specific error types\n\n## Requirements\n\n- Python 3.7+\n- Claude Code CLI installed and configured\n\n## Development\n\n```bash\n# Run tests\npytest\n\n# Format code\nblack claude_code_botman/ tests/ examples/\n\n# Type checking\nmypy claude_code_botman/\n```\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python wrapper for Claude Code CLI",
"version": "1.3.0",
"project_urls": {
"Changelog": "https://github.com/octavio-pavon/claude-code-botman/blob/main/CHANGELOG.md",
"Documentation": "https://claude-code-botman.readthedocs.io",
"Homepage": "https://github.com/octavio-pavon/claude-code-botman",
"Issues": "https://github.com/octavio-pavon/claude-code-botman/issues",
"Repository": "https://github.com/octavio-pavon/claude-code-botman"
},
"split_keywords": [
"claude",
" ai",
" cli",
" wrapper",
" anthropic",
" code-generation",
" automation",
" subprocess",
" bot",
" mcp",
" model-context-protocol"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "47b273c6ecd0de0889789916baa7213cd728ad5422e428a569d5180f0adceb2d",
"md5": "f8855dbff25ec42af71362738da74d8b",
"sha256": "21da020a9e1e36927899d9a442969b5cd4a2ac5a13640fa7739bf5b4c6b83673"
},
"downloads": -1,
"filename": "claude_code_botman-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f8855dbff25ec42af71362738da74d8b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 20796,
"upload_time": "2025-07-17T23:16:16",
"upload_time_iso_8601": "2025-07-17T23:16:16.541596Z",
"url": "https://files.pythonhosted.org/packages/47/b2/73c6ecd0de0889789916baa7213cd728ad5422e428a569d5180f0adceb2d/claude_code_botman-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "26bff1e467d73aa9d172538335b1d2a574eceb2fbe8b975ea43885b16e3a5307",
"md5": "84eb235ac6904895546a166cb38b4d94",
"sha256": "020541f8f05772581ce0a79d4670f0cd9f235e6d360ac7802650532c7d9025a0"
},
"downloads": -1,
"filename": "claude_code_botman-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "84eb235ac6904895546a166cb38b4d94",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20650,
"upload_time": "2025-07-17T23:16:17",
"upload_time_iso_8601": "2025-07-17T23:16:17.918446Z",
"url": "https://files.pythonhosted.org/packages/26/bf/f1e467d73aa9d172538335b1d2a574eceb2fbe8b975ea43885b16e3a5307/claude_code_botman-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 23:16:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "octavio-pavon",
"github_project": "claude-code-botman",
"github_not_found": true,
"lcname": "claude-code-botman"
}