Skip to content

Configuration ​

Quikrun supports several levels of configuration, merged in this priority order (highest to lowest).
A key defined at a higher-priority level overrides the same key at lower levels.

PriorityFileScope
1 (highest)quikrun.toml in project directoryProject
2pyproject.toml -> [tool.quikrun]Project
3Cargo.toml -> [package.metadata.quikrun]Project
4package.json -> "quikrun" keyProject
5$XDG_CONFIG_HOME/quikrun/config.tomlUser
6/etc/quikrun/config.tomlSystem
7 (lowest)Built-in defaultsGlobal

Flow:

json5
built-in: { py: "python3 {file}", js: "node {file}", rs: (...) }
user:     { py: "pypy {file}",    nim: "nim compile --run {file}" }
project:  { py: "python3 -O {file}" }

result:
        { py: "python3 -O {file}",          ← project wins
          js: "node {file}",                ← inherited from built-in
          rs: (...),                        ← inherited from built-in
          nim: "nim compile --run {file}" } ← from user

User Config ​

Location: ~/.config/quikrun/config.toml (or $XDG_CONFIG_HOME/quikrun/config.toml if XDG_CONFIG_HOME is set)

Use this to set personal preferences that apply across all your projects.

toml
clear_terminal = true
...

[commands]
# Always run Python files with pypy instead of python3
py = "pypy {file}"
...

Project Config ​

You can configure quikrun at the project level using one of the following files:

quikrun.toml ​

Place a quikrun.toml in your project root:

toml
clear_terminal = true
...

[commands]
py = "python3 -O {file}"
..

pyproject.toml ​

Add a [tool.quikrun] section to your pyproject.toml:

toml

[tool.quikrun]
clear_terminal = true
...

[tool.quikrun.commands]
py = "python3 -O {file}"

Cargo.toml ​

Add a [package.metadata.quikrun.commands] section to your Cargo.toml:

toml
[package.metadata.quikrun]
clear_terminal = true

[package.metadata.quikrun.commands]
rs = "cargo run --bin {file_stem}"

package.json ​

Add a "quikrun" key containing a "commands" block to your package.json:

json
{
  "quikrun": {
    "clear_terminal": true,
    "commands": {
      "js": "node --harmony {file}"
    }
  }
}

Configuration Reference ​

The following root-level settings are supported in all configuration files:

SettingTypeDefaultDescription
shell"auto" / "posix" / "cmd" / "pwsh""auto"Which shell to use.
platform"auto" / "linux" / "win" / "darwin""auto"Target platform or OS override for execution.
clear_terminalbool / "scroll_up""scroll_up"Whether to clear the terminal or scroll up before running.
show_time_tookboolTrueWhether to display the execution duration at footer
show_commandboolTrueWhether to display the command in footer.
show_dividerboolTrueWhether to print the separation line before the footer
cache_dirstring / str".quikrun"Custom directory used for cache and compiled build artifacts.
cd_to_file_dirboolFalseWhether to change the working directory to the target file's folder before running/compiling.
keep_build_artifactsboolTrueWhether to retain temporary or compiled binaries after execution completes.
auto_exit"always" / "never" / "on_success""never"Controls automatic process exit behavior.