Installation
How to install and set up the cloudcode SDK
Getting started with the cloudcode SDK is straightforward. Follow these steps to install and set up the SDK in your environment.
Prerequisites
- Python 3.10 or higher
- Pip package manager
- Access to cloudcode API key (or provider API keys)
Installation Steps
1. Install via pip
The simplest way to install the cloudcode SDK is via pip:
This will install both the Local SDK and the Sandbox SDK components.
2. Verify Installation
You can verify the installation by importing the SDK in a Python script:
Setting Up API Keys
Option 1: Using cloudcode API Key (Recommended)
Using the cloudcode API key is recommended as it automatically handles provider keys and enables credit tracking.
Option 2: Using Provider API Keys Directly
Note that this legacy method only supports OpenAI and Anthropic keys.
Next Steps
Once you’ve installed the SDK and set up your API keys, you can:
- Learn about configuration options
- Start modifying code with AI
- Explore file management capabilities
For more advanced usage, check out the Advanced Usage guide.
Quick Start Example
After installing and setting up your API key, try the included Quick Start script:
This script will:
- Create
src/calculator.py
- Add
multiply
anddivide
functions with zero-division handling - Print the diff and updated file content