Configuration

All AutoRalph configuration lives under ~/.autoralph/.

~/.autoralph/
  credentials.yaml          # API keys (Linear + GitHub)
  autoralph.db              # SQLite database (auto-created)
  projects/
    my-project.yaml         # One file per project
    another-project.yaml

Credentials

Create ~/.autoralph/credentials.yaml:

default_profile: personal

profiles:
  # Option A: Personal access token (simpler)
  personal:
    linear_api_key: lin_api_xxxxxxxxxxxxx
    github_token: ghp_xxxxxxxxxxxxx
    github_user_id: 12345678              # optional: restrict to your reviews
    git_author_name: autoralph-personal
    git_author_email: autoralph-personal@example.com

  # Option B: GitHub App (recommended for organizations)
  work:
    linear_api_key: lin_api_yyyyyyyyyyyyy
    github_app_client_id: "Iv23liXXXXXX"
    github_app_installation_id: 12345678
    github_app_private_key_path: ~/.autoralph/my-app.pem
    github_user_id: 87654321              # optional: restrict to your reviews
    git_author_name: autoralph-work
    git_author_email: autoralph@myorg.com

Resolution Order

Credentials are resolved in this order (highest precedence first):

  1. Environment variables LINEAR_API_KEY / GITHUB_TOKEN
  2. Named profile (from project config's credentials_profile)
  3. default_profile from credentials file

If no credentials file exists and both environment variables are set, they are used directly.

Note: When the GITHUB_TOKEN environment variable is set, it takes precedence over GitHub App credentials. This is useful for temporarily overriding app auth during development.

Trusted Reviewer

Set github_user_id to restrict which reviewer's feedback AutoRalph acts on. When set, only reviews from that GitHub user (or reviewers they explicitly requested) trigger the feedback cycle. See Security for details.

Find your GitHub user ID with:

gh api /user --jq .id

Git Identity

AutoRalph can use a dedicated git identity for commits, making it easy to distinguish AutoRalph-authored changes from human ones.

FieldDefaultDescription
git_author_nameautoralphName used for git author and committer
git_author_emailautoralph@noreplyEmail used for git author and committer

Each profile can specify its own git identity so different projects can commit under different names.

Environment variable overrides:

VariableOverrides
AUTORALPH_GIT_AUTHOR_NAMEgit_author_name from the active profile
AUTORALPH_GIT_AUTHOR_EMAILgit_author_email from the active profile

Projects

Create one YAML file per project in ~/.autoralph/projects/:

# ~/.autoralph/projects/my-project.yaml

name: my-project
local_path: ~/code/my-project
credentials_profile: personal

github:
  owner: myorg
  repo: my-project

linear:
  team_id: "abc-123-def"
  assignee_id: "user-456-ghi"
  # project_id: "proj-789-jkl"  # Optional: omit to poll all projects
  # label: "autoralph"          # Optional: only pick up issues with this label

# Optional (shown with defaults)
ralph_config_path: .ralph/ralph.yaml
max_iterations: 20
branch_prefix: "autoralph/"

Project Fields

FieldRequiredDefaultDescription
nameyesHuman-readable project name (must be unique)
local_pathyesAbsolute path to the local git clone
credentials_profilenodefault_profileWhich credentials profile to use
github.owneryesGitHub org or user
github.repoyesGitHub repository name
linear.team_idyesLinear team UUID
linear.assignee_idyesLinear user UUID to watch for assigned issues
linear.project_idno(all projects)Linear project UUID
linear.labelno(none)Label name to filter issue ingestion (case-insensitive)
ralph_config_pathno.ralph/ralph.yamlPath to Ralph config (relative to local_path)
max_iterationsno20Max Ralph loop iterations per build
branch_prefixnoautoralph/Branch name prefix

Finding your Linear IDs: In Linear, go to Settings > Account > API to find your API key. Team and user UUIDs can be found via the Linear GraphQL API explorer or by inspecting URLs.

Running

Start the Server

autoralph serve

This starts the HTTP server on 127.0.0.1:7749 with the web dashboard, REST API, and all background workers (Linear poller, GitHub poller, orchestrator, build workers).

Flags

FlagEnv VarDefaultDescription
--addr127.0.0.1:7749Address to listen on
--devProxy non-API requests to Vite dev server
--linear-urlAUTORALPH_LINEAR_URLOverride Linear API (for testing)
--github-urlAUTORALPH_GITHUB_URLOverride GitHub API (for testing)

Subcommands

autoralph serve [flags]   # Start the server
autoralph version         # Print version
autoralph help            # Show usage

What Happens on Startup

  1. Opens (or creates) the SQLite database at ~/.autoralph/autoralph.db
  2. Loads and validates all project configs from ~/.autoralph/projects/*.yaml
  3. Syncs project configs to the database
  4. Resolves credentials for each project
  5. Starts the Linear poller (polls every 30s for new assigned issues)
  6. Starts the GitHub poller (polls every 30s for PR reviews, check runs, and merges)
  7. Starts the orchestrator loop (evaluates state transitions)
  8. Starts the build worker pool
  9. Recovers any BUILDING issues from a previous run
  10. Serves the web dashboard and API on the configured address