How-to guides
Enable GitHub search
Configure the token required by the GitHub Code Search provider.
GitHub Code Search requires authentication. Moji does not register the GitHub provider until a token or custom endpoint is available.
Use an environment variable
export GITHUB_TOKEN=github_pat_your_token
moji "Inter" --provider githubThe environment variable takes precedence over github_token in the config
file.
Read a token from standard input
Use --token-stdin when a secret manager or another process supplies the token:
printf '%s' "$TOKEN_FROM_SECRET_MANAGER" |
moji "Inter" --provider github --token-stdin --jsonMoji intentionally has no inline --token flag because command-line arguments
can be recorded in shell history and process listings.
Store a token in the config file
Open the config:
moji configSet:
github_token: github_pat_your_tokenMoji creates the config with mode 0600. moji config show always redacts the
stored value.
Recover from authentication failures
If Moji reports that GitHub search is not configured:
- confirm that
GITHUB_TOKENis exported in the same shell; - run
moji config showand confirm thatGitHubTokenis[redacted]; - confirm that the token can read public repositories; and
- retry with
--provider getfontsto keep working without GitHub.