OS Manuals

/usr/bin/lake

Lean 4 theorem prover and functional programming language toolchain

From lean4 4.35.0-r1 (enterprise-packages), captured 2026-11-08 by running lake --help (exit 0). permalink

Lake version 5.0.0-src+eb6cafb (Lean version 4.35.0)

USAGE:
  lake [OPTIONS] <COMMAND>

COMMANDS:
  new <name> <temp>     create a Lean package in a new directory
  init <name> <temp>    create a Lean package in the current directory
  build <targets>...    build targets
  query <targets>...    build targets and output results
  exe <exe> <args>...   build an exe and run it in Lake's environment
  check-build           check if any default build targets are configured
  test                  test the package using the configured test driver
  check-test            check if there is a properly configured test driver
  lint                  lint the package
  check-lint            check if there is a properly configured lint driver
  clean                 remove build outputs
  shake                 minimize imports in source files
  comparator            judge a solution against a challenge
  check                 check this project against external checker(s)
  env <cmd> <args>...   execute a command in Lake's environment
  lean <file>           elaborate a Lean file in Lake's context
  update                update dependencies and save them to the manifest
  pack                  pack build artifacts into an archive for distribution
  unpack                unpack build artifacts from an distributed archive
  upload <tag>          upload build artifacts to a GitHub release
  cache                 manage the Lake cache
  script                manage and run workspace scripts
  scripts               shorthand for `lake script list`
  run <script>          shorthand for `lake script run`
  translate-config      change language of the package configuration
  serve                 start the Lean language server

BASIC OPTIONS:
  --version             print version and exit
  --help, -h            print help of the program or a command and exit
  --dir, -d=file        use the package configuration in a specific directory
  --file, -f=file       use a specific file for the package configuration
  -K key[=value]        set the configuration file option named key
  --old                 only rebuild modified modules (ignore transitive deps)
  --rehash, -H          hash all files for traces (do not trust `.hash` files)
  --update              update dependencies on load (e.g., before a build)
  --packages=file       JSON file of package entries that override the manifest
  --reconfigure, -R     elaborate configuration files instead of using OLeans
  --keep-toolchain      do not update toolchain on workspace update
  --allow-empty         accept bare builds with no default targets configured
  --no-build            exit immediately if a build target is not up-to-date
  --fail-fast           stop scheduling new build jobs after the first required failure
  --no-cache            build packages locally; do not download build caches
  --try-cache           attempt to download build caches for supported packages
  --json, -J            output JSON-formatted results (in `lake query`)
  --text                output results as plain text (in `lake query`)

OUTPUT OPTIONS:
  --quiet, -q           hide informational logs and the progress indicator
  --verbose, -v         show trace logs (command invocations) and built targets
  --ansi, --no-ansi     toggle the use of ANSI escape codes to prettify output
  --log-level=lv        minimum log level to output on success
                        (levels: trace, info, warning, error)
  --fail-level=lv       minimum log level to fail a build (default: error)
  --iofail              fail build if any I/O or other info is logged
                        (same as --fail-level=info)
  --wfail               fail build if warnings are logged
                        (same as --fail-level=warning)


See `lake help <command>` for more information on a specific command.
Options (25)
OptionDescriptionSource
--versionprint version and exithelp
--help, -hprint help of the program or a command and exithelp
--dir, -d fileuse the package configuration in a specific directoryhelp
--file, -f fileuse a specific file for the package configurationhelp
-K key[=valueset the configuration file option named keyhelp
--oldonly rebuild modified modules (ignore transitive deps)help
--rehash, -Hhash all files for traces (do not trust `.hash` files)help
--updateupdate dependencies on load (e.g., before a build)help
--packages fileJSON file of package entries that override the manifesthelp
--reconfigure, -Relaborate configuration files instead of using OLeanshelp
--keep-toolchaindo not update toolchain on workspace updatehelp
--allow-emptyaccept bare builds with no default targets configuredhelp
--no-buildexit immediately if a build target is not up-to-datehelp
--fail-faststop scheduling new build jobs after the first required failurehelp
--no-cachebuild packages locally;help
--try-cacheattempt to download build caches for supported packageshelp
--json, -Joutput JSON-formatted results (in `lake query`)help
--textoutput results as plain text (in `lake query`)help
--quiet, -qhide informational logs and the progress indicatorhelp
--verbose, -vshow trace logs (command invocations) and built targetshelp
--ansi, --no-ansitoggle the use of ANSI escape codes to prettify outputhelp
--log-level lvminimum log level to output on success (levels: trace, info, warning, error)help
--fail-level lvminimum log level to fail a build (default: error)help
--iofailfail build if any I/O or other info is logged (same as --fail-level=info)help
--wfailfail build if warnings are logged (same as --fail-level=warning)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.