# Configuration
## Quick Setup
Use a preset to get started fast:
```bash
# CorvidLabs preset - sets author, org, license, template repo
fledge config init --preset corvidlabs
# Default config
fledge config init
```
## Config File
Lives at:
```
~/.config/fledge/config.toml
```
## Sections
### [defaults]
Default values for new projects:
```toml
[defaults]
author = "Your Name"
github_org = "YourOrg"
license = "MIT"
```
| `author` | Default author name | `git config user.name` |
| `github_org` | Default GitHub org | Prompted |
| `license` | Default license | `MIT` |
### [templates]
Where to find templates:
```toml
[templates]
paths = ["~/my-templates", "~/work/templates"]
repos = ["CorvidLabs/fledge-templates", "myorg/templates"]
```
| `paths` | Local directories with templates |
| `repos` | GitHub repos to pull templates from (`owner/repo`) |
### [ai]
AI provider and model settings. Written by `fledge ai use` or `fledge config set`/`edit`:
```toml
[ai]
provider = "ollama" # "claude" or "ollama"
[ai.claude]
model = "opus-4.7" # model name passed to claude CLI
[ai.ollama]
host = "http://localhost:11434" # Ollama API endpoint (always normalized to include scheme)
model = "qwen3-coder:480b-cloud"
api_key = "sk-..." # for Ollama Cloud / authenticated endpoints
timeout_seconds = 600 # request timeout (default: 600)
```
| `ai.provider` | Active LLM backend | `claude` |
| `ai.claude.model` | Model name for Claude CLI | Claude CLI default |
| `ai.ollama.host` | Ollama API endpoint URL | `http://localhost:11434` |
| `ai.ollama.model` | Ollama model name | `llama3.2:latest` |
| `ai.ollama.api_key` | Bearer token for authenticated endpoints | (none) |
| `ai.ollama.timeout_seconds` | Request timeout in seconds | `600` |
### [github]
```toml
[github]
token = "ghp_..."
```
Token priority:
1. `FLEDGE_GITHUB_TOKEN` env var
2. `GITHUB_TOKEN` env var
3. Config file
4. `gh auth token` (GitHub CLI fallback)
**Required token scopes:**
| Issues, PRs, CI checks | `repo` (or `public_repo` for public repos only) |
| Create PRs, push branches | `repo` |
| Search templates/plugins | `public_repo` |
| Publish templates | `repo`, `delete_repo` (if republishing) |
A classic token with `repo` covers everything. For fine-grained tokens, grant Read/Write on Contents, Pull Requests, and Issues for each repo you work with.
## Full Example
```toml
[defaults]
author = "Leif"
github_org = "CorvidLabs"
license = "MIT"
[templates]
paths = ["~/.fledge/templates", "~/projects/templates"]
repos = ["CorvidLabs/fledge-templates", "my-org/my-templates"]
[github]
token = "ghp_1234567890abcdefghijklmnopqrstuvwxyz"
[ai]
provider = "ollama"
[ai.claude]
model = "opus-4.7"
[ai.ollama]
host = "https://ollama.com"
model = "qwen3-coder:480b-cloud"
api_key = "sk-your-key"
timeout_seconds = 600
```
## Environment Variables
| `FLEDGE_GITHUB_TOKEN` | GitHub token (highest priority) |
| `GITHUB_TOKEN` | GitHub token (fallback after FLEDGE_GITHUB_TOKEN) |
| `FLEDGE_AI_PROVIDER` | AI provider override (`claude` or `ollama`) |
| `FLEDGE_AI_MODEL` | AI model override |
| `FLEDGE_AI_TIMEOUT` | Ollama request timeout in seconds |
| `OLLAMA_HOST` | Ollama API endpoint URL |
| `OLLAMA_API_KEY` | Ollama Bearer token |
If neither env var nor config is set, fledge falls back to `gh auth token` (GitHub CLI) automatically for GitHub operations.
## Project Configuration (fledge.toml)
Per-project settings live in `fledge.toml` in your project root. This file defines tasks, lanes, and project metadata. It's created by `fledge run --init` or `fledge templates init`.
For task and lane configuration, see:
- [Lanes & Pipelines](./lanes.md), defining lanes, step types, parallel groups, importing community lanes
- [Plugins](./plugins.md), extending fledge with community plugins
## Priority Order
When creating a project, values come from (highest to lowest):
1. Command-line arguments
2. Config file
3. Git config (author only)
4. Built-in defaults