{"id":22295228,"url":"https://github.com/ejholmes/walk","last_synced_at":"2025-10-20T08:14:03.261Z","repository":{"id":43309005,"uuid":"76938736","full_name":"ejholmes/walk","owner":"ejholmes","description":"A fast, general purpose, graph based build and task execution utility.","archived":false,"fork":false,"pushed_at":"2019-09-11T02:55:23.000Z","size":2319,"stargazers_count":137,"open_issues_count":10,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-13T09:08:24.988Z","etag":null,"topics":["build-automation","build-system","build-tool","build-tools","graph","infrastructure","make","unix"],"latest_commit_sha":null,"homepage":"http://ejholmes.github.io/walk/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ejholmes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-20T08:37:19.000Z","updated_at":"2025-04-22T08:39:45.000Z","dependencies_parsed_at":"2022-09-18T05:35:43.990Z","dependency_job_id":null,"html_url":"https://github.com/ejholmes/walk","commit_stats":null,"previous_names":["ejholmes/redo"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ejholmes/walk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejholmes%2Fwalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejholmes%2Fwalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejholmes%2Fwalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejholmes%2Fwalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejholmes","download_url":"https://codeload.github.com/ejholmes/walk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejholmes%2Fwalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280051901,"owners_count":26264077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-automation","build-system","build-tool","build-tools","graph","infrastructure","make","unix"],"created_at":"2024-12-03T17:41:17.275Z","updated_at":"2025-10-20T08:14:03.207Z","avatar_url":"https://github.com/ejholmes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Walk](http://ejholmes.github.io/walk/)\n\n[![Build Status](https://travis-ci.org/ejholmes/walk.svg?branch=master)](https://travis-ci.org/ejholmes/walk)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ejholmes/walk)](https://goreportcard.com/report/github.com/ejholmes/walk)\n[![Latest Version](https://img.shields.io/github/release/ejholmes/walk.svg?style=flat?maxAge=86400)](https://github.com/ejholmes/walk/releases)\n\n`walk` is a fast, general purpose, graph based build and task execution utility.\n\nHeavily inspired by [make](https://www.gnu.org/software/make/) and [redo](https://github.com/apenwarr/redo).\n\n![](./docs/walk.gif)\n\n## Features\n\n* Fast parallel execution.\n* Graph based dependency management.\n* Maximum composability with existing UNIX tooling.\n* Describe targets and their dependencies as simple executables.\n* Universal execution; execute `walk` from any directory.\n\n## Installation\n\nUsing Go 1.7+:\n\n```console\n$ go get -u github.com/ejholmes/walk\n```\n\nOr grab the latest release from https://github.com/ejholmes/walk/releases.\n\n## Usage\n\n`walk` is built on top of a very simple concept; when you want to build a target, `walk` executes a file called `Walkfile` to determine:\n\n1. What other targets the given target depends on.\n2. How to build the target.\n\nFor example, if you wanted to build a program called `prog` from [main.c](./test/113-readme/main.c) and [parse.c](./test/113-readme/parse.c), you might write a `Walkfile` like this:\n\n```bash\n#!/bin/bash\n\n# The first argument is the \"phase\", which will either be `deps` or `exec`. In\n# the `deps` phase, the Walkfile should print the name of the targets that this\n# target depends on.\nphase=$1\n\n# The second argument is the name of the target, like `prog`, `parse.o`, etc.\ntarget=$2\n\ncase $target in\n  prog)\n    case $phase in\n      # Prog depends on the object files we'll build from source. We simply\n      # print each dependency on a single line.\n      deps)\n        echo main.o\n        echo parse.o\n        ;;\n      exec) exec gcc -Wall -o $target $($0 deps $target) ;;\n    esac ;;\n\n  # A generic recipe for building a .o file from a corresponding .c file.\n  *.o)\n    case $phase in\n      deps) echo ${target//.o/.c} ;;\n      exec) exec gcc -Wall -o $target -c $($0 deps $target) ;;\n    esac ;;\n\n  # When invoking walk(1) without any arguments, it defaults to a target called\n  # `all`.\n  all)\n    case $phase in\n      deps) echo prog ;;\n    esac ;;\n\n  # In general, it's good practice to include a fallback rule like this, in\n  # case someone tries to build a target that we don't know how to build (or\n  # someone makes a typo).\n  *.c|*.h) ;; # static files\n  *) \u003e\u00262 echo \"No rule for target \\\"$target\\\"\" \u0026\u0026 exit 1 ;;\nesac\n```\n\nWhen you execute `walk all`, the following happens internally:\n\n1. `walk` resolves all of the dependencies, and builds a graph:\n\n    ```console\n    $ Walkfile deps all\n    prog\n    $ Walkfile deps prog\n    parse.o\n    main.o\n    $ Walkfile deps parse.o\n    parse.c\n    $ Walkfile deps main.o\n    main.c\n    $ Walkfile deps parse.c\n    $ Walkfile deps main.c\n    ```\n\n2. `walk` executes all of the targets, starting with dependencies:\n\n    ```console\n    $ Walkfile exec parse.c\n    $ Walkfile exec main.c\n    $ Walkfile exec main.o\n    $ Walkfile exec parse.o\n    $ Walkfile exec prog\n    $ Walkfile exec all\n    ```\n\nUltimately, all of our targets end up getting invoked, and `prog` is built:\n\n```console\n$ walk\nok\tmain.c\nok\tparse.c\nok\tparse.o\nok\tmain.o\nok\tprog\nok\tall\n```\n\nWe can print the dependency graph to verify that our dependency chain is what we expect:\n\n```console\n$ walk -p dot\ndigraph {\n  \"(root)\" -\u003e \"all\"\n  \"all\" -\u003e \"prog\"\n  \"prog\" -\u003e \"main.o\"\n  \"prog\" -\u003e \"parse.o\"\n  \"parse.o\" -\u003e \"parse.c\"\n  \"main.o\" -\u003e \"main.c\"\n}\n```\n\nAnd that's it. Wait, that's it? That's it. `walk` is quite simply, just syntactic sugar over executing a binary as a graph.\n\nSee also [`man walk`](http://ejholmes.github.io/walk/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejholmes%2Fwalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejholmes%2Fwalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejholmes%2Fwalk/lists"}