ls-dirs command displays the default directories Vale uses for configuration, styles, and native messaging, along with whether each location exists.
Usage
--output=JSON for machine-readable output.
Default Output
The command displays a table with three locations:A green checkmark (✓) indicates the path exists. A red X (✗) means it doesn’t.
Directory Locations
Default styles directoryThe global location where Vale looks for style packages when no project-specific
StylesPath is configured.Platform-specific defaults:- Linux:
~/.local/share/vale/styles - macOS:
~/Library/Application Support/vale/styles - Windows:
%LOCALAPPDATA%\vale\styles
VALE_STYLES_PATH environment variable.Global configuration fileThe default location for a user-wide Vale configuration.Platform-specific defaults:
- Linux:
~/.config/vale/.vale.ini - macOS:
~/Library/Application Support/vale/.vale.ini - Windows:
%APPDATA%\vale\.vale.ini
- A project-specific
.vale.iniexists - You use
--configto specify a different file - You use
--no-globalto skip global configuration
VALE_CONFIG_PATH environment variable.Native messaging host executableThe location of the Vale native messaging host for browser extensions.Platform-specific defaults:
- Linux:
~/.local/share/vale/vale-native - macOS:
~/Library/Application Support/vale/vale-native - Windows:
%LOCALAPPDATA%\vale\vale-native.exe
JSON Output
For programmatic access, use JSON output:JSON output includes the paths but not the existence status. You’ll need to check file existence separately.
Use Cases
Verify Installation
Check if Vale’s default directories are set up:StylesPath shows ✗, create it and sync packages:
Find Global Configuration
Locate your global.vale.ini file:
Set Up Global Configuration
Create a global configuration file:Check in Scripts
Verify Vale directories exist before running operations:Examples
Environment Variables
You can override default directory locations with environment variables:- VALE_STYLES_PATH
- VALE_CONFIG_PATH
Override the default styles directory:The
StylesPath entry will show your custom path.Platform Differences
Default paths follow platform conventions:- Linux
- macOS
- Windows
Directory Structure
A typical Vale installation with both global and project configurations:Project-specific configurations take precedence over global configuration, allowing you to customize Vale per project while maintaining global defaults.
Troubleshooting
Styles Not Found
If Vale can’t find styles:-
Check the styles directory exists:
-
Verify styles are installed:
-
Run sync if needed:
Configuration Not Loaded
If global configuration isn’t being used:-
Check if the file exists:
-
View the actual path:
-
Create it if missing: