Overview
Thecloneit CLI supports several environment variables to customize its behavior, including authentication, output formatting, and logging.
Available Environment Variables
GITHUB_TOKEN
GitHub personal access token for API authentication. Increases rate limits from 60 to 5,000 requests per hour and enables access to private repositories.
- Optional for public repositories
- Required for private repositories
- Used in API requests (src/requests.rs:65-67) and file downloads (src/requests.rs:188-190)
- See Authentication for more details
FORCE_COLOR
Force colored output even when output is not a TTY (e.g., when piping to a file or CI/CD environment).
- Set to any value to enable (src/main.rs:34-35)
- Overrides automatic color detection
- Useful for CI/CD pipelines that support ANSI colors
- Takes precedence over
NO_COLOR
NO_COLOR
Disable colored output. Follows the NO_COLOR standard.
- Set to any value to disable colors (src/main.rs:36-37)
- Useful for log files or environments without color support
- Ignored if
FORCE_COLORis set - Follows the NO_COLOR convention
RUST_LOG
Control logging verbosity. Standard Rust logging environment variable used by the
env_logger crate.error- Only errorswarn- Warnings and errorsinfo- Default level (informational messages)debug- Detailed debugging informationtrace- Very verbose output
--quiet flag overrides this and sets the level to warn (src/main.rs:25-29).
Color Output Behavior
The color output logic is implemented in src/main.rs:33-41:FORCE_COLOR- If set, colors are enabledNO_COLOR- If set (andFORCE_COLORis not), colors are disabled- Default - Colors are enabled by default
Configuration Examples
Development Environment
CI/CD Environment
Minimal Output (Scripts)
Debug Mode
Environment Variable Priority
Some settings can be controlled by both environment variables and command-line flags:| Setting | Environment Variable | Command-line Flag | Priority |
|---|---|---|---|
| Quiet mode | RUST_LOG=warn | --quiet | Flag overrides variable |
| Colors | FORCE_COLOR / NO_COLOR | N/A | Variable only |
| Authentication | GITHUB_TOKEN | N/A | Variable only |