wizard
Wizard
A wizard is a Bash script that guides a human through a manual procedure. It opens each URL, explains what to click and copy, captures values, writes them to the intended destinations, and shows progress. It might configure third-party services, run a one-off migration, or move the project from one state to another.
template.sh provides stage-by-stage progress, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent .env upserts, gh secret/gh variable writes, and a closing summary. Scope the procedure and author its stages without hand-editing the shared library above the STAGES marker.
A wizard is ephemeral by default: save it to a scratch path for the requested run. When the user wants a repeatable setup path in the repository, retain it under the project's script conventions and document how to run it. Repeatability does not authorize a commit; commit only when the user has authorized that action.
Process
1. Scope the procedure
Identify the steps and values needed for the requested setup, migration, or transition. Read relevant repository context before asking for information:
- For setup: relevant environment examples, README instructions, service and framework configuration, and CI workflows. Use
secrets.*/vars.*references to identify consumers of the requested setup's values; unrelated references do not expand the wizard's scope. Reuse existing configuration where appropriate instead of collecting credentials again. Inspect secret-bearing files only as needed, without exposing their values. - For a migration or transition: the current state, the target state, and the irreversible actions between them.
Reuse the procedure and decisions already established in the conversation. A stage outline can be a progress update; it does not require another approval round. Ask only about unresolved choices that materially affect the procedure, target, or captured values, and continue preparing independent stages while those choices remain open. The human runs the finished script, so its confirm gates are where consequential actions get approved; do not run it yourself.