Environment Variables
Environment variables override .sley.yaml settings but are overridden by command-line flags.
Available Variables
| Variable | Default | Description | Example |
|---|---|---|---|
SLEY_PATH | .version | Path to the .version file | ./src/.version |
SLEY_THEME | sley | TUI theme for interactive prompts | catppuccin |
NO_COLOR | - | Set to any value to disable colored output | 1 |
SLEY_PATH
Specify a custom path to the .version file:
export SLEY_PATH=./my-folder/.version
sley showEquivalent to --path ./my-folder/.version.
Security
The path must not contain ... sley rejects paths with path traversal sequences.
SLEY_THEME
Set the TUI theme for interactive prompts:
export SLEY_THEME=catppuccin
sley bumpEquivalent to --theme catppuccin. This variable is ignored when --theme is explicitly passed on the command line.
Available themes: sley (default), base, base16, catppuccin, charm, dracula
NO_COLOR
Disable colored output:
NO_COLOR=1 sley showEquivalent to --no-color. Any non-empty value disables color.
CI Detection
sley automatically enables non-interactive mode when it detects any of these environment variables:
GITHUB_ACTIONS=trueGITLAB_CI=trueCIRCLECI=trueTRAVIS=trueJENKINS_URL(any value)CI=true
In CI mode, interactive prompts are disabled and multi-module operations default to --all.
You can trigger CI mode explicitly:
CI=true sley bump patchUsage Examples
CI/CD Pipeline
# GitHub Actions
- name: Bump version
run: sley bump patch --strict
# GitLab CI
version:bump:
script:
- export SLEY_PATH=./src/.version
- sley bump patchLocal Development
# Set default path and theme for the session
export SLEY_PATH=./packages/core/.version
export SLEY_THEME=dracula
sley show
# Or use direnv
echo 'export SLEY_PATH=./packages/core/.version' >> .envrc
echo 'export SLEY_THEME=catppuccin' >> .envrc
direnv allowScripting
#!/bin/bash
export NO_COLOR=1
export SLEY_PATH="./app/.version"
CURRENT=$(sley show)
echo "Current version: $CURRENT"
sley bump patch
echo "New version: $(sley show)"See Also
- Configuration - Configuration methods and precedence
- .sley.yaml Reference - Configuration file reference
- CLI Reference - Command-line flags
- CI/CD Integration - Environment variable usage in pipelines