Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Describe your Nim builds as tasks

Subscribe to updates I use nake

Statistics on nake

Number of watchers on Github 76
Number of open issues 5
Average time to close an issue 22 days
Main language Nimrod
Average time to merge a PR 12 days
Open pull requests 0+
Closed pull requests 5+
Last commit about 2 years ago
Repo Created almost 7 years ago
Repo Last Updated about 2 years ago
Size 233 KB
Organization / Authorfowlmouth
Latest Release1.9.1
Page Updated
Do you use nake? Leave a review!
View open issues (5)
View nake activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating nake for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Nake readme

Describe your Nim <>_ builds as tasks. Example nakefile.nim:

.. code:: nim

import nake

  ExeName = "my_app"
  BleedingEdgeFeatures = "-d:testFeature1 -d:testFeature2"

task "debug-build", "Build with unproven features":
  if shell(nimExe, "c", BleedingEdgeFeatures, "-d:debug", ExeName):
    ## zip up files or do something useful here?

task "run-tests":
  # ...

Now you can run tasks from the nakefile.nim:

.. code:: bash

$ nake debug-build


MIT license <LICENSE.rst>_.


Stable version

Use Nim's Nimble package manager <>_ to install the package and nake binary:

.. code:: bash

$ nimble update
$ nimble install nake

If a new version of nake is released you can update to it running again those commands. You can figure out the version you have installed by running nimble path nake.

Development version

Use Nim's Nimble package manager <>_ to install locally the github checkout:

.. code:: bash

$ git clone
$ cd nake
$ nimble install

If you don't mind downloading the git repository every time, you can also tell Nimble <>_ to install the latest development version directly from git:

.. code:: bash

$ nimble update
$ nimble install -y nake@#head


Nake has its own nakefile, it will build nake as a binary. The nake binary is just a shortcut for nim c -r nakefile $ARGS:

.. code:: bash

$ cd ~/.nimble/libs/nake
$ nim c -r nakefile install
## boring ^
$ cd ~/my-project
$ nake debug-build
## wow look at the convenience (!!)

Once the nakefile is built you can run it manually with ./nakefile, but you can also run nake again. If nake detects that the source file is newer than the binary, the nakefile will be rebuilt again, otherwise it just runs the nakefile binary directly. Running nake in such case has an advantage of the nakefile being looked up in parent directories recirsively. You can always remove the nakefile and the nimcache directories if you need to force a rebuild.

Most nakefiles will involve running some commands in a shell. To verify what the shell invocations do you can pass the -c or --careful switch to a nake binary and then it will ask you to confirm each command being run:

.. code:: bash

$ nake --careful install
Run? `nim c nake` [N/y]

Note that this parameter only applies to nake's convenience shell() <>_ and direShell() <>_ procs, malicious nakefile authors will likely implement their own shell spawning process.

If you run the nakefile without parameters or with the -t or --tasks switch it will report the available tasks. But if you run a nakefile with a specific task and this task doesn't exist, nake will report an error, list the available tasks and exit with a non zero status.

In your nakefiles you can define the defaultTask <>_ task. This is a task which will be executed if the user runs nake without specifying a task. Example:

.. code:: nim

task defaultTask, "Compiles binary":
  if binaryRequiresRebuilding():
    echo "Binary is fresh, anything else?"


The documentation of nake can be found online at <>, but you can run the docs task of the included nakefile.nim <nakefile.nim> to generate the user API HTML documentation into a nake.html file <>. This documentation explains what symbols you can use other than the obvious task() template <> to define tasks. If you installed using Nimble <>_ you first need to go to your local Nimble <>_ directory. Unix example:

.. code:: bash

$ cd `nimble path nake`
$ nim c -r nake docs
$ open nake.html

The docs task will also generate HTML versions of all local rst files, which are indexed from the generated theindex.html <>_.


The changes are listed on the releases page<>_

nake open issues Ask a question     (View All Issues)
  • about 4 years Mind for a new release?
  • about 5 years Fix rebuild logic binary checks for windows
  • about 5 years Add `()` alias for shell or direShell
nake questions on Stackoverflow (View All Questions)
  • Nake number of synchronous ajax calls in the same time
  • Set a list item in listview to auto web link and nake the rest of the text view clickable
nake list of languages used
  • Nim
nake latest release notes
1.9.1 1.9.1
  • Fixed compilation error with latest Nim
  • Don't complain about unknown arguments as those may be handled by default task
1.9 1.9
  • Nake will no longer warn about unknown arguments, because a task may handle custom arguments. #43
  • If nakefile.nim is not found in current dir it will be searched for by going upwards. 7fd6deae278c5ba93f9711d0473b0ece76edc8f0
More projects by fowlmouth View all
Other projects in Nimrod