Cline Core
A python library to run cline core
Installation
Install Cline CLI which includes Cline Core. For more info visit: https://cline.bot/cline-cli
RUN npm install -g cline@1.0.8
Install this library
pip install cline_core
Usage
Basic Cline Instance Management
from cline_core import ClineInstance
with ClineInstance.with_available_ports() as instance:
print(f"Instance started: {instance.address}")
# Use the instance
Examples
See examples/example.py for a complete example of creating and monitoring tasks.
API Reference
ClineInstance
ClineInstance class for managing Cline Core processes.
Methods
- start(): Launches cline-host and cline-core.js processes, waits for instance lock
- stop(): Terminates the processes
- wait_for_instance(timeout=30): Waits for instance lock in database
- is_running(): Checks if processes are still running
- with_available_ports(cwd, config_path=None): Factory method for automatic port allocation
Supports context manager protocol for automatic cleanup.
Protocol Buffer Files
The library includes gRPC protocol buffer definitions and generated Python files for communicating with Cline's gRPC services. These files are located in src/cline/proto/ and include:
- Task management (
task_pb2.py) - State management (
state_pb2.py) - Common types (
common_pb2.py) - And more...
Protocol buffer files are automatically generated during the build process using uv build. The generated files are included in the package distribution but ignored in version control.
To manually regenerate these files during development:
uv run build.py
Development
This project uses uv for package management and development.
# Install dependencies
uv sync --dev
# Run tests
uv run pytest
# Semantic release (handled by CI)
- Automatic versioning with python-semantic-release
- CI/CD with GitHub Actions
Metadata
Release files for cline-core 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cline_core-0.1.10.tar.gz | 66.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cline_core-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 159.7 kB
Release files / cline_core-0.1.10.tar.gz
| Download URL | cline_core-0.1.10.tar.gz |
|---|---|
| Size | 66.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e036300ce12da17fa96963d35788dfefd53a47a8c299a809d384911b952bec2
|
|
BLAKE2b-256 checksum How to use checksums |
ad2a527bfd8c629061c9cf0198a48dbb698aee2c23c5fd0a20f0c3c47a03b4be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 27, 2025.
Transparency logRelease files / cline_core-0.1.10-py3-none-any.whl
| Download URL | cline_core-0.1.10-py3-none-any.whl |
|---|---|
| Size | 93.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ecce57f94dae7ee35abf05ed4068468d904abfbf67e5d1e4ba93a216f03e5cd
|
|
BLAKE2b-256 checksum How to use checksums |
bb26474b89965e9bbb258d2575a1ebc16fae6a3ddc8d5aa36f5baf0aa11fcb23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 27, 2025.
Transparency log