> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudcoding.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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:

```bash theme={null}
pip install cloudcode
```

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:

```python theme={null}
from cloudcode import Local

# Check available models
models = Local.list_models()
print(models)  # This should print a list of available AI models
```

## Setting Up API Keys

### Option 1: Using cloudcode API Key (Recommended)

```python theme={null}
import os
from cloudcode import Local

# Set environment variable (recommended for security)
os.environ["CLOUDCODE_API_KEY"] = "your_cloudcode_api_key"

# Or pass directly to the SDK
sdk = Local(
    working_dir="/path/to/your/project",
    api_key="your_cloudcode_api_key"
)
```

Using the cloudcode API key is recommended as it automatically handles provider keys and enables credit tracking.

### Option 2: Using Provider API Keys Directly

```python theme={null}
from cloudcode import Local

sdk = Local(
    working_dir="/path/to/your/project",
    api_key=os.getenv("CLOUD_CODE_API_KEY")
)
```

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](/local-sdk/configuration)
* Start [modifying code with AI](/local-sdk/code)
* Explore [file management capabilities](/local-sdk/files)

For more advanced usage, check out the [Advanced Usage](/advanced-usage) guide.

## Quick Start Example

After installing and setting up your API key, try the included Quick Start script:

```bash theme={null}
python cloud-coding/examples/quick-start.py
```

This script will:

* Create `src/calculator.py`
* Add `multiply` and `divide` functions with zero-division handling
* Print the diff and updated file content
