Skip to content

Environment Variables Reference

This document describes all environment variables that Nagare recognizes and their effects on behavior.

Nagare uses environment variables for configuration that should not be committed to version control, such as API tokens, or for runtime behavior modification.

Type: string
Default: None
Required: Yes (for GitHub releases)

GitHub Personal Access Token or GitHub Actions token for API access.

Permissions required:

  • contents: write (for creating releases)
  • metadata: read (for repository access)

Example:

Terminal window
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

GitHub Actions:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

NAGARE_SKIP_CONFIRMATION {#nagare-skip-confirmation}

Section titled “NAGARE_SKIP_CONFIRMATION {#nagare-skip-confirmation}”

Type: boolean
Default: false
Environment variable: NAGARE_SKIP_CONFIRMATION

Skip interactive confirmation prompts. Useful for CI/CD environments.

Example:

Terminal window
export NAGARE_SKIP_CONFIRMATION=true
deno task nagare # No confirmation prompts

Valid values: true, false, 1, 0

Type: string
Default: en
Environment variable: NAGARE_LANG

Set the display language for Nagare messages and output.

Example:

Terminal window
export NAGARE_LANG=ja
deno task nagare --help # Shows help in Japanese

Valid values: en, ja

Type: boolean
Default: false
Environment variable: NAGARE_DEBUG

Enable debug mode for detailed logging and troubleshooting.

Example:

Terminal window
export NAGARE_DEBUG=true
deno task nagare # Shows detailed debug information

Valid values: true, false, 1, 0

Type: boolean
Default: false
Environment variable: NO_COLOR

Disable colored output. Follows the NO_COLOR standard.

Example:

Terminal window
export NO_COLOR=1
deno task nagare # No colored output

Valid values: Any non-empty value disables colors

Type: string
Default: System default
Environment variable: TERM

Terminal type identifier. Affects ANSI escape sequence support detection.

Example:

Terminal window
export TERM=xterm-256color

Common values: xterm, xterm-256color, screen, dumb

Type: boolean
Default: false
Environment variable: CI

Indicates running in a CI environment. Affects progress indicator display.

Example:

Terminal window
export CI=true
deno task nagare # Uses CI-friendly output

Valid values: true, false, 1, 0

Type: string
Default: Git global config
Environment variable: GIT_AUTHOR_NAME

Override git author name for release commits.

Example:

Terminal window
export GIT_AUTHOR_NAME="Release Bot"

Type: string
Default: Git global config
Environment variable: GIT_AUTHOR_EMAIL

Override git author email for release commits.

Example:

Terminal window
export GIT_AUTHOR_EMAIL="releases@example.com"

Type: string
Default: Git global config
Environment variable: GIT_COMMITTER_NAME

Override git committer name for release commits.

Example:

Terminal window
export GIT_COMMITTER_NAME="CI System"

GIT_COMMITTER_EMAIL {#git-committer-email}

Section titled “GIT_COMMITTER_EMAIL {#git-committer-email}”

Type: string
Default: Git global config
Environment variable: GIT_COMMITTER_EMAIL

Override git committer email for release commits.

Example:

Terminal window
export GIT_COMMITTER_EMAIL="ci@example.com"

NAGARE_TEMPLATE_SANDBOX {#nagare-template-sandbox}

Section titled “NAGARE_TEMPLATE_SANDBOX {#nagare-template-sandbox}”

Type: string
Default: strict
Environment variable: NAGARE_TEMPLATE_SANDBOX

Set template processing security level.

Example:

Terminal window
export NAGARE_TEMPLATE_SANDBOX=moderate

Valid values: strict, moderate, disabled

Type: boolean
Default: false
Environment variable: NAGARE_AUDIT_LOG

Enable security audit logging for file operations.

Example:

Terminal window
export NAGARE_AUDIT_LOG=true

Valid values: true, false, 1, 0

Type: string
Default: ./nagare.config.ts
Environment variable: NAGARE_CONFIG_PATH

Override default configuration file path.

Example:

Terminal window
export NAGARE_CONFIG_PATH="./configs/release.config.ts"

Type: string
Default: OS-specific cache directory
Environment variable: NAGARE_CACHE_DIR

Override cache directory for temporary files.

Example:

Terminal window
export NAGARE_CACHE_DIR="/tmp/nagare-cache"

Type: string
Default: None
Environment variable: NAGARE_AI_PROVIDER

Override AI provider for auto-fix functionality.

Example:

Terminal window
export NAGARE_AI_PROVIDER="claude-code"

Valid values: claude-code, github-copilot, custom

NAGARE_AI_THINKING_LEVEL {#nagare-ai-thinking-level}

Section titled “NAGARE_AI_THINKING_LEVEL {#nagare-ai-thinking-level}”

Type: string
Default: think
Environment variable: NAGARE_AI_THINKING_LEVEL

Set AI thinking level for auto-fix analysis.

Example:

Terminal window
export NAGARE_AI_THINKING_LEVEL="megathink"

Valid values: think, megathink, ultrathink

Type: boolean
Default: false
Environment variable: GITHUB_ACTIONS

Automatically set by GitHub Actions. Affects output formatting.

Example:

Terminal window
# Automatically set in GitHub Actions
echo "GITHUB_ACTIONS=true"

Type: boolean
Default: false
Environment variable: GITLAB_CI

Automatically set by GitLab CI. Affects output formatting.

Example:

Terminal window
# Automatically set in GitLab CI
echo "GITLAB_CI=true"

Type: string
Default: None
Environment variable: JENKINS_URL

Automatically set by Jenkins. Affects CI detection.

Example:

Terminal window
# Automatically set in Jenkins
echo "JENKINS_URL=http://jenkins.example.com"
Terminal window
# .env file for local development
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export NAGARE_LANG="en"
export NAGARE_DEBUG="false"
Terminal window
# CI environment variables
export GITHUB_TOKEN="$GITHUB_TOKEN_SECRET"
export NAGARE_SKIP_CONFIRMATION="true"
export CI="true"
export NO_COLOR="1"
export GIT_AUTHOR_NAME="CI Bot"
export GIT_AUTHOR_EMAIL="ci@example.com"
Terminal window
# Dockerfile ENV directives
ENV NAGARE_SKIP_CONFIRMATION=true
ENV NO_COLOR=1
ENV NAGARE_TEMPLATE_SANDBOX=strict

When the same configuration is available through multiple sources, Nagare uses this priority order:

  1. Command-line flags (highest priority)
  2. Environment variables
  3. Configuration file (nagare.config.ts)
  4. Default values (lowest priority)

Example:

Terminal window
# Config file: lang: "ja"
# Environment: NAGARE_LANG="en"
# Command line: --lang=es
# Result: Spanish (es) - command line wins

All environment variables are validated on startup:

  • Boolean values: true, false, 1, 0
  • String values: Must be non-empty when required
  • Enum values: Must match allowed values exactly
  • Path values: Must be valid file system paths

Invalid values result in clear error messages with suggestions.

  • Never commit tokens to version control
  • Use CI secrets for sensitive environment variables
  • Validate inputs - Nagare validates all environment variables
  • Audit logging - Enable NAGARE_AUDIT_LOG for security compliance