How to initialize an existing repository
Add agore.yaml to a repository that already has code, history, or an existing config.
You have a repository that already exists and you want a valid agore.yaml
without disturbing anything else in it.
Basic case
From the repository root:
agore-skill init --yesinit writes agore.yaml next to your existing files. It detects:
- project name — the current directory's base name
- repository URL — the output of
git remote get-url origin, if anoriginremote exists (left empty otherwise) - base branch — always defaults to
mainunless you say otherwise - skill layout — a root
SKILL.mdbecomesskill.paths: ["."], askills/directory becomes["skills/*"]; with neither, the default[".", "skills/*"]stays
Besides agore.yaml, init sets up the rest of the lifecycle:
.gitignore— created withdist/and.DS_Storewhen missing; an existing file gets adist/line appended when it does not already have one..github/workflows/agore-skill.yml— a GitHub Actions workflow: theverifyjob runsinspect --changed,lint --changed --strictandevalon pull requests and pushes tomain; thereleasejob runsagore-skill release --clean --tag "${GITHUB_REF_NAME}"onv*tag pushes. An existing workflow file is preserved unless you pass--force; pass--no-cito skip the workflow entirely.
The full generated file is documented in the init reference.
Without --yes, and when stdin is a terminal, init shows an interactive
form with the detected values pre-filled, so you can adjust the project name,
repository URL and base branch before anything is written. In scripts or
pipelines (no TTY), pass --yes; running the interactive form without a TTY
cancels with an error and exit code 1.
If agore.yaml already exists
init refuses to run and exits with code 1:
ERROR
Agore.yaml already exists (use --force to overwrite).
Decide which you want:
- Keep the current config — do nothing;
initwas a no-op. - Regenerate it — pass
--force:
agore-skill init --yes --force--force overwrites the file with fresh defaults plus the newly detected
project name, repository and base branch, and also regenerates the GitHub
Actions workflow if one exists. Every customization you made by
hand (budgets, exclude globs, publisher list) is lost, so copy anything you
care about out of the old file first.
To use a different base branch
If your trunk is not main, name it in the config after init — or set it in
the interactive form. The value lands in workspace.base:
workspace:
base: trunkworkspace.base is what inspect --changed and lint --changed diff against;
see How to operate a monorepo.
Related
- Every field in the file, with types and defaults: agore.yaml reference
- What the file is used for at runtime: Zero-config single-repo vs monorepo discovery