Configuration

Pijul is configured using config.toml files; users can take advantage of both global and repository-specific configuration.

Global configuration

The location of Pijul’s global configuration depends on the conventions of the user’s operating system; Pijul will first try to instantiate a global configuration in the user’s configuration directory according to this table. If pijul cannot access the conventional config location, it will fall back to the home directory, using $HOME/.config/pijul. If that fails, $HOME/.pijulconfig will be tried as a last resort.

Global configuration data

Pijul supports the following global config values:

KeyDescriptionFormat
colorsIf Pijul should display colorful outputChoice
pagerIf Pijul should use a pager (eg less) to display diff outputChoice
unrecord_changesHow many changes to show when runnning pijul unrecordNumber
authorSet the default author detailsAuthor
templateSet a default template when using pijul recordTemplate
ignore_kindsSet default ignore files when using pijul init --kind=<KIND>Ignore kinds

Here is an example of a fully-configured config.toml:

colors = "always"
pager = "always"
unrecord_changes = 1

[author]
name = "ferris"
full_name = "Ferris the Crab"
email = "ferris@example.com"
key_path = "/home/ferris/.ssh/id_ed25519.pub"

[template]
message = "/home/ferris/Documents/a_custom_message_for_me.txt"
description = "/home/ferris/Documents/a_custom_description_for_you.txt"

[ignore_kinds]
rust = [ "target" ]

Author

You can give Pijul some basic information to identify yourself using any of the following fields:

[author]
name = "<REMOTE USERNAME>"
full_name = "<DISPLAY NAME (optional)>"
email = "<EMAIL (optional)>"
key_path = "<PATH TO SSH PUBLIC KEY (optional)>"

Unlike many other version control systems, Pijul does not permanently assign these details to changes. For more information please reference the section on keys.

Template

If you have a file containing some default text, Pijul can automatically load those files into the relevant fields using the following configuration:

[template]
message = "<MESSAGE FILE PATH (optional)>"
description = "<DESCRIPTION FILE PATH (optional)>"

Ignore Kinds

Pijul can be configured to automatically set up the .ignore file when running pijul init --kind <KIND>. Here is an idea of what it might look like in practice:

[ignore_kinds]
rust = [ "target", "*.perf" ]
python = [ "dist", "build", "eggs" ]

Repository configuration

Users can take advantage of repository-specific configuration by editing the appropriate toml file: <repo>/.pijul/config. Repository-specific configuration settings have a higher precedence than global configuration settings. Pijul supports the following repository config values:

ValueDescriptionFormat
colorsIf Pijul should display colorful outputChoice
pagerIf Pijul should use a pager (eg less) to display diff outputChoice
unrecord_changesHow many changes to show when runnning pijul unrecordNumber
default_remoteThe default remote to interact withString
extra_dependenciesExtra changes that should always be depended uponList[String]
remotesNamed remotes that can be interacted withRemotes
hooksHooks to run before recording a changeHooks

Here is an example of a fully-configured .pijul/config:

colors = "always"
pager = "always"
unrecord_changes = 1
default_remote = "ferris@ssh.pijul.com:pijul/pijul"
extra_dependencies = [ "SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC" ]

[remotes]
mirror = "ferris@ssh.example.com:pijul/pijul"

[hooks]
record = [ "cargo fmt" ]

Remotes

A remote is simply a named URL of a Pijul repository. For more information please reference pijul remote.

Hooks

A hook is a script run in the default shell before a command is executed. Currently only pijul record is supported. Here is an example:

[hooks]
record = [ "cargo fmt" ]

Choice

A choice in Pijul can have 3 possible values:

  1. auto
  2. always
  3. never

When no value is supplied, this will default to auto. In that case, Pijul will automatically determine which choice to pick. For example, if your global configuration contains colors = "auto", Pijul automatically use colored output when appropriate.

Ignore

Items in a repository can be ignored by editing a repository’s .ignore file. Pijul supports standard glob syntax in .ignore files.