The style file for your project should be configured in the [tool.nitpick] section of the configuration file.

Possible configuration files (in order of precedence):

  1. .nitpick.toml

  2. pyproject.toml

The first file found will be used; the other files will be ignored.

Run the nipick init CLI command to create a config file (init: Initialise a configuration file).

To configure your own style:

style = "/path/to/your-style-file.toml"

You can set style with any local file or URL.

Remote style

Use the URL of the remote file. If it’s hosted on GitHub, use the raw GitHub URL:

style = ""

You can also use the raw URL of a GitHub Gist:

style = ""


Remote styles can be cached to avoid unnecessary HTTP requests. The cache can be configured with the cache key; see the examples below.

By default, remote styles will be cached for one hour. This default will also be used if the cache key has an invalid value.

Expiring after a predefined time

The cache can be set to expire after a defined time unit. Use the format cache = "<integer> <time unit>". Time unit can be one of these (plural or singular, it doesn’t matter):

  • minutes / minute

  • hours / hour

  • days / day

  • weeks / week

To cache for 15 minutes:

style = ""
cache = "15 minutes"

To cache for 1 day:

style = ""
cache = "1 day"


With this option, once the style(s) are cached, they never expire.

style = ""
cache = "forever"


With this option, the cache is never used. The remote style file(s) are always looked-up and a HTTP request is always executed.

style = ""
cache = "never"


The cache files live in a subdirectory of your project: /path/to/your/project/.cache/nitpick/. To clear the cache, simply remove this directory.

Local style

Using a file in your home directory:

style = "~/some/path/to/another-style.toml"

Using a relative path from another project in your hard drive:

style = "../another-project/another-style.toml"

Multiple styles

You can also use multiple styles and mix local files and URLs:

style = [


The order is important: each style will override any keys that might be set by the previous .toml file.

If a key is defined in more than one file, the value from the last file will prevail.

Override a remote style

You can use a remote style as a starting point, and override settings on your local style file.

Use ./ to indicate the local style:

style = [