foundry github

Manage GitHub integration for cross-repository discovery.

Subcommands

foundry github auth

foundry github auth [--token TOKEN] [--save/--no-save]

Configure or verify a GitHub personal access token.

Token resolution order:

  1. --token flag
  2. FOUNDRY_GITHUB_TOKEN environment variable
  3. GITHUB_TOKEN environment variable
  4. gh auth token (GitHub CLI)
  5. .foundry/config.ymlgithub.token
FlagDescription
--token, -tGitHub personal access token
--saveSave the token to .foundry/config.yml (gitignored)

foundry github discover

foundry github discover [--org ORG] [--prefix PREFIX]

Discover platform repositories in a GitHub organization.

When run inside a project with foundry.json, reads the organization (from the github block), prefix, and repository name from the manifest automatically.

The primary platform repo is matched by its full name (derived from the platform name as a slug). Satellite repos are matched by {prefix}-*.

Naming Convention

Platform name:  "An Average Platform"
Repository:     an-average-platform      (primary, ★)
Prefix:         aap
Satellites:     aap-api-lib, aap-billing-service, ...

Token Security

Tokens are never stored in committed files. The .foundry/config.yml file is excluded by the nested .foundry/.gitignore.