Metadata-Version: 2.1
Name: blocks-sdk
Version: 0.1.85rc1
Summary: Write custom AI-enabled codebase automations in Python. Leverage a full codebase-aware API. Automatically trigger automations from Github, Slack, and other providers.
Home-page: https://github.com/BlocksOrg/sdk
Author: BlocksOrg
Author-email: dev@blocksorg.com
License: AGPL
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Bug Tracking
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# Blocks SDK

Write custom AI-enabled codebase automations in Python. Leverage a full codebase-aware API. Automatically trigger automations from Github, Slack, and other providers.

> We're currently in private alpha, we recommend consistently updating your SDK to the latest version to get the latest features and fixes.

## Getting Started

### 1. Install SDK

```bash
pip install blocks-sdk
```

### 2. Create a new Blocks project

```bash
mkdir -p .blocks/myautomation
cd .blocks/myautomation
```

### 3. Create a new automation

```python
# automation.py
from blocks import task, on

@task(name="my_automation")
@on("github.pull_request", repos=["MyOrg/MyRepo"])
def my_automation(event):
    print(event)
```

### 5. Upload your automation

```bash
blocks init --api-key <your-api-key>
blocks push automation.py
```


