claude-code-acp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+ permissions:
12
+ id-token: write # Required for trusted publishing
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.11"
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v4
24
+
25
+ - name: Build package
26
+ run: uv build
27
+
28
+ - name: Publish to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,43 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+ # Virtual environments
24
+ .venv/
25
+ venv/
26
+ ENV/
27
+
28
+ # IDE
29
+ .idea/
30
+ .vscode/
31
+ *.swp
32
+ *.swo
33
+
34
+ # Testing
35
+ .tox/
36
+ .coverage
37
+ .coverage.*
38
+ htmlcov/
39
+ .pytest_cache/
40
+
41
+ # Misc
42
+ *.log
43
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 yazelin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: claude-code-acp
3
+ Version: 0.1.0
4
+ Summary: ACP-compatible agent for Claude Code (Python version)
5
+ Project-URL: Homepage, https://github.com/yazelin/claude-code-acp-py
6
+ Project-URL: Repository, https://github.com/yazelin/claude-code-acp-py
7
+ Project-URL: Issues, https://github.com/yazelin/claude-code-acp-py/issues
8
+ Author: yazelin
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: acp,agent,anthropic,claude,claude-code,python
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: agent-client-protocol>=0.7.0
21
+ Requires-Dist: claude-agent-sdk>=0.1.29
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Claude Code ACP (Python)
25
+
26
+ [![PyPI](https://img.shields.io/pypi/v/claude-code-acp)](https://pypi.org/project/claude-code-acp/)
27
+ [![Python](https://img.shields.io/pypi/pyversions/claude-code-acp)](https://pypi.org/project/claude-code-acp/)
28
+ [![License](https://img.shields.io/github/license/yazelin/claude-code-acp-py)](https://github.com/yazelin/claude-code-acp-py/blob/main/LICENSE)
29
+
30
+ ACP-compatible agent for Claude Code using the Python SDK.
31
+
32
+ This package bridges the [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) with the [Agent Client Protocol (ACP)](https://agentclientprotocol.com/), allowing Claude Code to work with any ACP-compatible client like [Zed](https://zed.dev), Neovim, JetBrains IDEs, etc.
33
+
34
+ ## Features
35
+
36
+ - Full ACP protocol support
37
+ - Bidirectional communication (permission requests, tool calls)
38
+ - Uses your Claude CLI subscription (no API key needed)
39
+ - Session management (create, fork, resume, list)
40
+ - Multiple permission modes (default, acceptEdits, plan, bypassPermissions)
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ pip install claude-code-acp
46
+ ```
47
+
48
+ Or with uv:
49
+
50
+ ```bash
51
+ uv add claude-code-acp
52
+ ```
53
+
54
+ ## Requirements
55
+
56
+ - Python 3.10+
57
+ - Claude CLI installed and authenticated (`claude /login`)
58
+
59
+ ## Usage
60
+
61
+ ### As a standalone ACP server
62
+
63
+ ```bash
64
+ claude-code-acp
65
+ ```
66
+
67
+ ### With Zed Editor
68
+
69
+ Add to your Zed `settings.json`:
70
+
71
+ ```json
72
+ {
73
+ "agent_servers": {
74
+ "Claude Code Python": {
75
+ "type": "custom",
76
+ "command": "claude-code-acp",
77
+ "args": [],
78
+ "env": {}
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ Then open the Agent Panel (`Ctrl+?`) and select "Claude Code Python" from the `+` menu.
85
+
86
+ ### As a library
87
+
88
+ ```python
89
+ import asyncio
90
+ from claude_code_acp import ClaudeAcpAgent
91
+ from acp import run_agent
92
+
93
+ async def main():
94
+ agent = ClaudeAcpAgent()
95
+ await run_agent(agent)
96
+
97
+ asyncio.run(main())
98
+ ```
99
+
100
+ ## How it works
101
+
102
+ ```
103
+ ┌─────────────┐ ACP ┌──────────────────┐ SDK ┌─────────────┐
104
+ │ Zed/IDE │ ◄──────────► │ claude-code-acp │ ◄────────► │ Claude CLI │
105
+ │ (ACP Client)│ (stdio) │ (This package) │ │(Subscription)│
106
+ └─────────────┘ └──────────────────┘ └─────────────┘
107
+ ```
108
+
109
+ ## License
110
+
111
+ MIT
@@ -0,0 +1,88 @@
1
+ # Claude Code ACP (Python)
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/claude-code-acp)](https://pypi.org/project/claude-code-acp/)
4
+ [![Python](https://img.shields.io/pypi/pyversions/claude-code-acp)](https://pypi.org/project/claude-code-acp/)
5
+ [![License](https://img.shields.io/github/license/yazelin/claude-code-acp-py)](https://github.com/yazelin/claude-code-acp-py/blob/main/LICENSE)
6
+
7
+ ACP-compatible agent for Claude Code using the Python SDK.
8
+
9
+ This package bridges the [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) with the [Agent Client Protocol (ACP)](https://agentclientprotocol.com/), allowing Claude Code to work with any ACP-compatible client like [Zed](https://zed.dev), Neovim, JetBrains IDEs, etc.
10
+
11
+ ## Features
12
+
13
+ - Full ACP protocol support
14
+ - Bidirectional communication (permission requests, tool calls)
15
+ - Uses your Claude CLI subscription (no API key needed)
16
+ - Session management (create, fork, resume, list)
17
+ - Multiple permission modes (default, acceptEdits, plan, bypassPermissions)
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install claude-code-acp
23
+ ```
24
+
25
+ Or with uv:
26
+
27
+ ```bash
28
+ uv add claude-code-acp
29
+ ```
30
+
31
+ ## Requirements
32
+
33
+ - Python 3.10+
34
+ - Claude CLI installed and authenticated (`claude /login`)
35
+
36
+ ## Usage
37
+
38
+ ### As a standalone ACP server
39
+
40
+ ```bash
41
+ claude-code-acp
42
+ ```
43
+
44
+ ### With Zed Editor
45
+
46
+ Add to your Zed `settings.json`:
47
+
48
+ ```json
49
+ {
50
+ "agent_servers": {
51
+ "Claude Code Python": {
52
+ "type": "custom",
53
+ "command": "claude-code-acp",
54
+ "args": [],
55
+ "env": {}
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ Then open the Agent Panel (`Ctrl+?`) and select "Claude Code Python" from the `+` menu.
62
+
63
+ ### As a library
64
+
65
+ ```python
66
+ import asyncio
67
+ from claude_code_acp import ClaudeAcpAgent
68
+ from acp import run_agent
69
+
70
+ async def main():
71
+ agent = ClaudeAcpAgent()
72
+ await run_agent(agent)
73
+
74
+ asyncio.run(main())
75
+ ```
76
+
77
+ ## How it works
78
+
79
+ ```
80
+ ┌─────────────┐ ACP ┌──────────────────┐ SDK ┌─────────────┐
81
+ │ Zed/IDE │ ◄──────────► │ claude-code-acp │ ◄────────► │ Claude CLI │
82
+ │ (ACP Client)│ (stdio) │ (This package) │ │(Subscription)│
83
+ └─────────────┘ └──────────────────┘ └─────────────┘
84
+ ```
85
+
86
+ ## License
87
+
88
+ MIT
@@ -0,0 +1,46 @@
1
+ [project]
2
+ name = "claude-code-acp"
3
+ version = "0.1.0"
4
+ description = "ACP-compatible agent for Claude Code (Python version)"
5
+ authors = [
6
+ { name = "yazelin" },
7
+ ]
8
+ readme = "README.md"
9
+ license = "MIT"
10
+ requires-python = ">=3.10"
11
+ keywords = ["claude", "acp", "agent", "anthropic", "python", "claude-code"]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Developers",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ ]
21
+ dependencies = [
22
+ "agent-client-protocol>=0.7.0",
23
+ "claude-agent-sdk>=0.1.29",
24
+ ]
25
+
26
+ [project.scripts]
27
+ claude-code-acp = "claude_code_acp:main"
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/yazelin/claude-code-acp-py"
31
+ Repository = "https://github.com/yazelin/claude-code-acp-py"
32
+ Issues = "https://github.com/yazelin/claude-code-acp-py/issues"
33
+
34
+ [build-system]
35
+ requires = ["hatchling"]
36
+ build-backend = "hatchling.build"
37
+
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/claude_code_acp"]
40
+
41
+ [tool.ruff]
42
+ target-version = "py310"
43
+ line-length = 100
44
+
45
+ [tool.ruff.lint]
46
+ select = ["E", "F", "I", "UP"]
@@ -0,0 +1,29 @@
1
+ """
2
+ Claude Code ACP - ACP-compatible agent for Claude Code (Python version).
3
+
4
+ This package bridges the Claude Agent SDK with the Agent Client Protocol (ACP),
5
+ allowing Claude Code to work with any ACP-compatible client like Zed, Neovim, etc.
6
+ """
7
+
8
+ import asyncio
9
+
10
+ from .agent import ClaudeAcpAgent
11
+
12
+ __version__ = "0.1.0"
13
+
14
+ __all__ = ["ClaudeAcpAgent", "main", "run"]
15
+
16
+
17
+ async def run() -> None:
18
+ """Run the Claude ACP agent."""
19
+ from acp import run_agent
20
+ await run_agent(ClaudeAcpAgent())
21
+
22
+
23
+ def main() -> None:
24
+ """Entry point for the claude-code-acp command."""
25
+ asyncio.run(run())
26
+
27
+
28
+ if __name__ == "__main__":
29
+ main()
@@ -0,0 +1,6 @@
1
+ """Entry point for running claude-code-acp as a module."""
2
+
3
+ from . import main
4
+
5
+ if __name__ == "__main__":
6
+ main()