Syntax Highlighting
Atmos provides syntax highlighting for YAML and JSON output in the terminal. You can customize the color scheme, enable line numbers, and control line wrapping behavior.
Configuration
atmos.yaml
Configuration Reference
enabledEnable or disable syntax highlighting for terminal output.
Default:
trueformatterOutput formatter to use for rendering highlighted code.
Default:
terminalthemeColor scheme for syntax highlighting. Atmos supports a wide range of themes.
Default:
draculaPopular themes:
dracula- Dark theme with vibrant colorsmonokai- Classic dark themegithub- Light theme matching GitHub's stylevim- Vim's default color schemesolarized-dark- Solarized dark variantsolarized-light- Solarized light variantnord- Arctic, bluish color palette
See the full list of supported themes.
line_numbersShow line numbers in syntax-highlighted output.
Default:
falsewrapWrap long lines to fit terminal width.
Default:
false
Example Usage
Syntax highlighting is automatically applied when using commands that output YAML or JSON:
# Display config in YAML format with syntax highlighting
atmos describe config -f yaml
# Display config in JSON format with syntax highlighting
atmos describe config
# View stack configuration
atmos describe stacks -s plat-ue2-prod
When 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
Automatic Behavior
Syntax highlighting behavior adapts to the environment:
- Interactive terminal: Full syntax highlighting with configured theme
- Piped output: Highlighting automatically disabled
- Redirected to file: Highlighting automatically disabled
- With
--force-color: Highlighting preserved even when piping