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

# sb0 config

> Manage sb0 platform configuration

## Commands

```bash theme={null}
sb0 config set <key> <value>
sb0 config get [key]
```

## Description

Manage configuration for the sb0 CLI, including platform API endpoints and registry settings.

## Set Configuration

Set a configuration value:

```bash theme={null}
sb0 config set <key> <value>
```

### Available Keys

* **`platformApiBase`** - Platform API endpoint URL
* **`registryBase`** - Container registry base URL
* **`gatewayBase`** - Gateway API base URL

### Examples

```bash theme={null}
# Set platform API endpoint
sb0 config set platformApiBase https://api.sb0.io

# Set registry base
sb0 config set registryBase https://registry.sb0.io

# Set gateway base
sb0 config set gatewayBase https://gateway.sb0.io
```

## Get Configuration

View configuration values:

```bash theme={null}
# Get all configuration
sb0 config get

# Get specific value
sb0 config get platformApiBase
```

### Example Output

```bash theme={null}
$ sb0 config get
platformApiBase: https://api.sb0.io
registryBase: https://registry.sb0.io
gatewayBase: https://gateway.sb0.io
```

## Configuration Storage

Configuration is stored locally in:

```
~/.sb0/config.json
```

## Default Values

If not explicitly set, the CLI uses default platform endpoints:

```json theme={null}
{
  "platformApiBase": "https://api.sb0.io",
  "registryBase": "https://registry.sb0.io",
  "gatewayBase": "https://gateway.sb0.io"
}
```

## When to Use Config

You typically don't need to modify configuration unless:

* **Using a custom deployment** - Self-hosted platform
* **Testing against staging** - Non-production environment
* **Enterprise setup** - Custom endpoints
* **Troubleshooting** - Debugging connection issues

## Reset to Defaults

To reset configuration to defaults, remove the config file:

```bash theme={null}
rm ~/.sb0/config.json
```

The CLI will recreate it with defaults on next use.

## Common Use Cases

### Switch to Staging Environment

```bash theme={null}
sb0 config set platformApiBase https://staging.sb0.io
sb0 config set registryBase https://staging-registry.sb0.io
sb0 config set gatewayBase https://staging-gateway.sb0.io
```

### Switch Back to Production

```bash theme={null}
sb0 config set platformApiBase https://api.sb0.io
sb0 config set registryBase https://registry.sb0.io
sb0 config set gatewayBase https://gateway.sb0.io
```

### View Current Environment

```bash theme={null}
sb0 config get platformApiBase
```

## Configuration Priority

Configuration sources (highest to lowest priority):

1. **Explicitly set values** - Via `sb0 config set`
2. **Environment variables** - If supported
3. **Default values** - Built into CLI

## Common Issues

### Invalid URL

```
Error: Invalid URL format
```

**Solution:** Ensure the URL includes the protocol:

```bash theme={null}
# Correct
sb0 config set platformApiBase https://api.example.com

# Incorrect
sb0 config set platformApiBase api.example.com
```

### Permission Denied

```
Error: Could not write config
```

**Solution:** Ensure you have write permissions:

```bash theme={null}
mkdir -p ~/.sb0
chmod 700 ~/.sb0
```

## Next Steps

* [Login to platform](/v0-docs/cli/login)
* [Deploy agents](/v0-docs/cli/push)
* [Query agents](/v0-docs/cli/query)

## Related

* [Platform login](/v0-docs/cli/login)
* [Publishing workflow](/v0-docs/quickstart/publishing)
