gtl env setup
Parent command: gtl env.
Create .envrc with GitHub auth configured for this repository, validate the selected account, and set local Git commit identity when account details are available. Existing accounts in the machine gh config use GH_TOKEN; pass --config-dir to use a separate GitHub CLI config directory. If a GitHub account name has a unique local match, interactive runs ask before using the matched account. Matched GitHub profiles record the canonical API login while keeping the local profile directory or token selector needed by gh. Also adds .envrc to local git exclude.
Aliases
set, s
Usage
bash
gtl env setup <account> [flags]Examples
bash
gtl env setup work-gh
gtl env setup personal --config-dir '$HOME/.config/gh-personal'
gtl env setup new-work --allow-new-account
gtl env setup work-gh --tokenFull Help
text
Create .envrc with GitHub auth configured for this repository, validate the selected account, and set local Git commit identity when account details are available. Existing accounts in the machine gh config use GH_TOKEN; pass --config-dir to use a separate GitHub CLI config directory. If a GitHub account name has a unique local match, interactive runs ask before using the matched account. Matched GitHub profiles record the canonical API login while keeping the local profile directory or token selector needed by gh. Also adds .envrc to local git exclude.
Usage:
gtl env setup <account> [flags]
Aliases:
setup, set, s
Examples:
gtl env setup work-gh
gtl env setup personal --config-dir '$HOME/.config/gh-personal'
gtl env setup new-work --allow-new-account
gtl env setup work-gh --token
Flags:
--allow-new-account Skip logged-in account validation for a new GitHub account
--config-dir string GitHub CLI config directory to set as GH_CONFIG_DIR
--git-email string Git user.email to set locally (defaults to GitHub public email when available)
--git-name string Git user.name to set locally (defaults to GitHub name/login)
-h, --help help for setup
--host string GitHub host (default: github.com) (default "github.com")
--no-git-identity Do not set local Git commit identity
--token Use GH_TOKEN from 'gh auth token --user <account>' instead of GH_CONFIG_DIR