Skip to content

CLI Commands

Complete reference for all FSH Lint commands.

Lint FSH files and report diagnostics.

Terminal window
fsh-lint lint [OPTIONS] <FILES>...
  • --fix - Automatically fix issues when possible
  • --severity <LEVEL> - Only show diagnostics at or above this level
  • --format <FORMAT> - Output format: human, json, sarif, github
  • --config <PATH> - Path to configuration file
  • --no-config - Don’t load configuration files
  • --max-diagnostics <N> - Limit number of diagnostics shown
Terminal window
# Lint all FSH files
fsh-lint lint **/*.fsh
# Lint with automatic fixes
fsh-lint lint --fix input/fsh/*.fsh
# Show only errors
fsh-lint lint --severity error **/*.fsh
# Output JSON format
fsh-lint lint --format json **/*.fsh > diagnostics.json

Format FSH files.

Terminal window
fsh-lint format [OPTIONS] <FILES>...
  • --check - Check if files are formatted (don’t modify)
  • --diff - Show formatting differences
  • --config <PATH> - Path to configuration file
Terminal window
# Format all FSH files
fsh-lint format **/*.fsh
# Check formatting without modifying
fsh-lint format --check **/*.fsh

Initialize configuration file.

Terminal window
fsh-lint init [OPTIONS]
  • --full - Generate full example configuration
  • --output <PATH> - Output path (default: fsh-lint.json)
Terminal window
# Create default config
fsh-lint init
# Create full example
fsh-lint init --full

List available rules.

Terminal window
fsh-lint rules [OPTIONS]
  • --detailed - Show detailed information
  • --category <CATEGORY> - Filter by category
  • --search <QUERY> - Search rules
Terminal window
# List all rules
fsh-lint rules
# Show detailed info for a category
fsh-lint rules --detailed --category style
# Search for specific rules
fsh-lint rules --search naming

Check configuration validity.

Terminal window
fsh-lint check [OPTIONS]
  • --config <PATH> - Path to configuration file
Terminal window
# Check default config
fsh-lint check
# Check specific config
fsh-lint check --config custom-config.json

Available for all commands:

  • -h, --help - Print help information
  • -V, --version - Print version information
  • -v, --verbose - Enable verbose output
  • --color <WHEN> - Colorize output: auto, always, never

See Exit Codes for details.