Configuration
Sketch supports yaml
, json
and toml
formats for its configuration file.
The configuration file can be manually specified with the -c
or --config
flag. If none is provided, the cli will automatically look for a file named sketch.{yaml, json, toml}
in the cwd. If none is found, then it will look in the XDG_CONFIG_HOME
directory. If no config is found there, it will use default values.
You can also use the --ignore-config-file
flag to temporarily ignore configuration files and only use cli-set values.
Top Level Configuration
These are the defaults for the top level configuration values:
# yaml-language-server: $schema=../schemas/latest.json
# The root path for the generated files.
# All output paths will start from this directory.
root_dir: .
# Enables debugging mode
debug: false
# Extends other configuration files
extends: []
# Settings for the .gitignore file generated via the `init` command.
# This can be:
# - A list of directives (to add to the defaults)
# - A literal string (to replace defaults)
gitignore: []
# Variables for templates
vars: {}
# Do not overwrite existing files
no_overwrite: false
# The pre-commit settings, used for the .pre-commit-config file
# generated with the `init` command.
# Can be:
# - A boolean, to use defaults or disable it altogether
# - A list of repos to populate the config with
# The default setting includes just the gitleaks repo.
pre_commit: true
# The shell to use for the `exec` command. Defaults to `cmd.exe` on windows and `sh` elsewhere.
shell: null
# A map of template definitions.
templates: {}
# A map of templating presets.
templating_presets: {}
# The relative path from the config file (or from the cwd, if set via the cli flag)
# to the directory containing templates.
templates_dir: null
# The configuration for typescript-related commands.
typescript: null