redux is an implementation of the redo top down software build tools
Branch: master
Clone or download
Latest commit 02aa62a Oct 10, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/hello-world-0 Change redo link to md, not html for better reading experience Feb 5, 2014
.gitignore ignore .redo dir Oct 10, 2018 Add rename and alias do scripts Jan 27, 2014 Add rename and alias do scripts Jan 27, 2014 Add rename and alias do scripts Jan 27, 2014
AUTHORS wip Jan 17, 2014
LICENSE wip Jan 17, 2014
LINKS switched to single multicall binary Jan 21, 2014
NOTES separate documentation for each tool, along with general notes Jan 18, 2014 fixed formatting Feb 2, 2014 rewrite Jan 22, 2014
TODO The work continues Oct 10, 2018
all Run .do script in own directory and make paths relative. Feb 3, 2014
build Run .do script in own directory and make paths relative. Feb 3, 2014
clean Add rename and alias do scripts Jan 27, 2014
common.go Make task prefix optional Oct 10, 2018
config.go gofmt Jan 22, 2014
db.go gofmt Jan 22, 2014
db_test.go moving to multicall binary Jan 20, 2014
dependent.go gofmt Jan 22, 2014
doc.go New file for better godoc documentation Jan 27, 2014
dofile.go Refactor dofile execution Oct 10, 2018
doinfo.go Generate extension dependent arg2 for default Oct 9, 2018
encoding.go Simplify code to make the compiler happy. Jan 23, 2014
error.go gofmt Jan 22, 2014
event.go moving to multicall binary Jan 20, 2014
file.go Refactor dofile execution Oct 10, 2018
init.go fmt Jan 22, 2014
install Add rename and alias do scripts Jan 27, 2014
metadata.go BUG FIX - NewMetadata MUST return nil on missing files. Jan 27, 2014
nulldb.go fmt Jan 22, 2014
op.go go fmt and improve err msg Oct 10, 2018
options.go reverted to single var block. No need for init Feb 2, 2014
output.go Refactor dofile execution Oct 10, 2018
prerequisite.go Added prequisite -> file -> currency test for ifchange Feb 2, 2014
redo_test.go go fmt Oct 10, 2018
relpath.go Run .do script in own directory and make paths relative. Feb 3, 2014
stat.go separate syscall to avoid breaking the windows build Feb 6, 2014
stat_windows.go Updated to install links. Feb 2, 2014
tree_test.go whitespace change Feb 2, 2014
z_test.go Rebuild binary for every test to ensure that the tests use the curren… Feb 2, 2014


redux is top down software build tool similar to make but simpler and more reliable.

It implements and extends the redo concept somewhat sparsely described by DJ Bernstein.

I implemented a minimal set of redo tools some years ago and used them enough to become convinced that the idea was worthwhile. However, they needed to be better, sharper, and faster before they could replace Make in my toolbox, thus, this tool.


redux is written in Go and requires the Go compiler to be installed. Go can be fetched from the Go site or your favorite distribution channel.

Assuming Go is installed, the command:

$ go get

will fetch, build and install redux into a $GOBIN directory. To complete the installation, run the command:

$ redux install 

which installs the associated links to the binary and the man pages in a related directory. By default, the links are created in the same directory as the executable, but this can be changed with the environment variable: $BINDIR.

The redux man page documentation can be installed separately with the command

$ redux install man

There are several options for where to install the manual pages. Please see 'redux help install' for details.

redux supports the following commands:

  •  init -- Creates or reinitializes one or more redo root directories.
  • ifchange -- Creates dependency on targets and ensure that targets are up to date.
  • ifcreate -- Creates dependency on non-existence of targets.
  •  redo -- Builds files atomically.
  • install -- Installs links and manual pages

The install links command creates links for each of these commands so they can be invoked as:


A redo based system must have a directory named .redo at the top level project directory.

It is created with the redo-init command, whose effects are idempotent.

The database contains file status and metadata. Its format is not specified, but it must be capable of supporting multiple readers and multiple writers (though not necessarily writing to the same sections). Redux implements a file based database and a null database. The current file based database is probably about the slowest. Fortunately, new databases can be easily plugged in.

In the redo system, there are three kinds of files.

  • do files are scripts that build targets. In addition, they establish file dependencies by calling redo-ifcreate and redo-ifchange. do files are invoked by the redo commands directly and indirectly by redo-ifchange.

  • target files are generated or otherwise composed, likely from other files, by do scripts

  • static or source files are manually created/edited. They are tracked for changes, but are not generated. As such, they have no do files.

There are two kinds of dependencies

  • ifchange denotes a relationship where a change in one file marks the other as out of date. A ifchange B implies that a change in B invalidates A. Change includes creation, modification or deletion.

  • ifcreate denotes a dependency on the creation or deletion of a file. A ifcreate B implies that when B comes into existence or ceases to exist, A will be outdated.

Please see the individual command documentation for further details.


redux is written by Gyepi Sam

The redo concept is DJ Bernstein's and is described here.

Thanks to Szabolcs Szasz, Mateusz Czapliński, and dontdieych for their requests, feedback, suggestions, ideas, and bug reports.

I am interested in any and all feedback on this software.