# Configuration The recommended way to configure spr is to run `spr init`, rather than setting config values manually. You can rerun `spr init` to update config at any time. spr uses the following Git configuration values: | config key | CLI flag | description | default[^default] | default in `spr init`[^initdefault] | | -------------------- | --------------------------------- | ----------------------------------------------------------------------------------- | ----------------- | --------------------------------------------- | | `githubAuthToken` | `--github-auth-token`[^cli-token] | The GitHub PAT (personal authentication token) to use for accessing the GitHub API. | | `githubRemoteName` | | Name of the git remote in this local repository that corresponds to GitHub | `origin` | `origin` | | `githubRepository` | `--github-repository` | Name of repository on github.com in `owner/repo` format | | extracted from the URL of the GitHub remote | | `githubMasterBranch` | | The name of the centrally shared branch into which the pull requests are merged | `master` | taken from repository configuration on GitHub | | `branchPrefix` | `--branch-prefix` | String used to prefix autogenerated names of pull request branches | | `spr/GITHUB_USERNAME/` | | `requireApproval` | | If true, `spr land` will refuse to land a pull request that is not accepted | false | | `requireTestPlan` | | If true, `spr diff` will refuse to process a commit without a test plan | true | - The config keys are all in the `spr` section; for example, `spr.githubAuthToken`. - Values passed on the command line take precedence over values set in Git configuration. - Values are read from Git configuration as if by `git config --get`, and thus follow its order of precedence in reading from local and global config files. See the [git-config docs](https://git-scm.com/docs/git-config) for dteails. - `spr init` writes configured values into `.git/config` in the local repo. (It must be run inside a Git repo.) [^default]: Value used by `spr` if not set in configuration. [^initdefault]: Value suggested by `spr init` if not previously configured. [^cli-token]: Be careful using this: your auth token will be in your shell history.