Terminal Settings
Atmos provides configurable terminal settings that allow you to customize the output appearance, including syntax highlighting for YAML and JSON outputs. These settings can be configured in your atmos.yaml
configuration file.
You will learn
- Configure syntax highlighting for terminal output
- Customize color schemes and formatting options
- Control output pagination and line wrapping
- Set display preferences for different output formats
General Terminal Settings​
Configure general terminal behavior. These are also the default settings if not specified in your atmos.yaml
:
settings:
terminal:
max_width: 120 # Maximum width for terminal output
pager: false # Pager disabled by default (set to true, or pager name like 'less' to enable)
color: true # Enable colored output (default: true)
unicode: true # Use Unicode characters in output
tab_width: 2 # Number of spaces for YAML indentation (default: 2)
Configuration Precedence​
Atmos follows a clear precedence order for terminal settings, with command-line flags having the highest priority:
Pager Configuration Precedence​
- CLI Flags (highest priority):
--pager=false
,--pager=less
- NO_PAGER Environment Variable:
NO_PAGER=1
(standard CLI convention) - ATMOS_PAGER Environment Variable:
ATMOS_PAGER=less
- PAGER Environment Variable:
PAGER=more
(system default) - Configuration File (lowest priority):
settings.terminal.pager: true
Color Configuration Precedence​
- CLI Flags (highest priority):
--no-color
- NO_COLOR Environment Variable:
NO_COLOR=1
(standard CLI convention) - ATMOS_NO_COLOR Environment Variable:
ATMOS_NO_COLOR=true
- ATMOS_COLOR Environment Variable:
ATMOS_COLOR=false
- COLOR Environment Variable:
COLOR=false
- Configuration File (lowest priority):
settings.terminal.color: false
Syntax Highlighting​
You can customize the syntax highlighting behavior for terminal output using the following settings:
settings:
terminal:
# Main terminal settings
pager: true # Enable pager for all terminal output
max_width: 120 # Maximum width for terminal output
color: true # Enable colored output
# Syntax highlighting specific settings
syntax_highlighting:
enabled: true # Enable/disable syntax highlighting
formatter: terminal # Output formatter
theme: dracula # Color scheme to use
line_numbers: false # Show line numbers
wrap: false # Wrap long lines
Terminal Configuration Options​
max_width
- Maximum width for terminal output (default:
120
) pager
Configure pager behavior for output display.
false
or empty: Pager disabled (default)true
oron
: Enable pager with system default- Pager command (e.g.,
less
,more
): Use specific pager program - Environment variables:
NO_PAGER
(disable),ATMOS_PAGER
,PAGER
(system default) - CLI control:
--pager
global flag
color
Enable colored terminal output (default:
true
).- Environment variables:
NO_COLOR
(standard),ATMOS_NO_COLOR
,ATMOS_COLOR
,COLOR
- CLI control:
--no-color
global flag
- Environment variables:
unicode
- Use Unicode characters in output (default:
true
) tab_width
- Number of spaces for YAML indentation (default:
2
)
Syntax Highlighting Configuration Options​
enabled
- Enable or disable syntax highlighting (default:
true
) formatter
- Output formatter (default:
terminal
) theme
Color scheme for syntax highlighting. Available options include:
vim
monokai
github
dracula
- ...and many other standard themes
You can find the full list of supported themes here.
line_numbers
- Show line numbers in output (default:
false
) wrap
- Wrap long lines (default:
false
)
Example Usage​
The syntax highlighting is automatically applied when using commands that output YAML or JSON, such as:
# Display config in YAML format with syntax highlighting
atmos describe config -f yaml
# Display config in JSON format with syntax highlighting
atmos describe config
When the output is piped to another command, syntax highlighting is automatically disabled to ensure compatibility:
# Syntax highlighting is disabled when piping
atmos describe config | grep base_path
Supported Themes​
Atmos supports a wide range of themes for syntax highlighting. You can find the full list of supported themes here.