Configuration Setup
ghqc configuration setup clones the configuration repository that ghqc uses for shared checklists, options, and record assets.
Unlike the issue and milestone commands, setup is always non-interactive: it reads a Git URL, resolves the target config directory, and clones the repository there.
ghqc configuration setup [git]URL Sources
Section titled “URL Sources”ghqc configuration setup accepts the repository URL from one of two places:
- the optional positional
gitargument - the
GHQC_CONFIG_REPOenvironment variable
If both are absent, setup fails immediately.
ghqc configuration setup https://github.com/org/ghqc-config.gitexport GHQC_CONFIG_REPO=https://github.com/org/ghqc-config.gitghqc configuration setupDirectory Resolution
Section titled “Directory Resolution”Setup uses the same configuration-directory resolution order as the rest of the CLI:
--config-dirGHQC_CONFIG_REPOGHQC_CONFIG_DIR- default XDG path
That means:
--config-diralways wins if you provide it- if
GHQC_CONFIG_REPOis set, it determines the local directory name even when you also pass a positionalgitURL GHQC_CONFIG_DIRis only used when--config-diris absent andGHQC_CONFIG_REPOis not set- otherwise, the fallback path is
$XDG_DATA_HOME/ghqc/config
When GHQC_CONFIG_REPO drives directory resolution, ghqc clones into:
$XDG_DATA_HOME/ghqc/<repo-name>Options
Section titled “Options”| Argument / Flag | Description |
|---|---|
[git] | Git repository URL for the configuration repo. |
--config-dir | Override the target configuration directory directly. |
Validation and Defaults
Section titled “Validation and Defaults”- The selected Git URL must parse as a valid Git remote URL
- If the target directory does not exist,
ghqccreates parent directories as needed and clones the repo - If the target directory already exists as a Git repository with the same remote URL, setup succeeds as a no-op
- If the target directory already exists with a different remote, setup fails instead of overwriting it
- If the target directory already exists but is not a Git repository, setup also fails
Output
Section titled “Output”On success, setup prints the resolved configuration directory.
✅ Configuration successfully setup at /Users/you/.local/share/ghqc/ghqc-config.git Configuration Concepts See how ghqc resolves configuration directories and loads config contents