{"id":15641246,"url":"https://github.com/kt3k/saku","last_synced_at":"2025-08-24T00:07:34.946Z","repository":{"id":31948310,"uuid":"130452579","full_name":"kt3k/saku","owner":"kt3k","description":":m: Markdown-based task runner","archived":false,"fork":false,"pushed_at":"2023-10-24T12:18:49.000Z","size":3456,"stargazers_count":74,"open_issues_count":2,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-08T23:01:57.710Z","etag":null,"topics":["cli","markdown","task-runner"],"latest_commit_sha":null,"homepage":null,"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/kt3k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-04-21T07:55:05.000Z","updated_at":"2025-06-03T20:07:50.000Z","dependencies_parsed_at":"2022-08-07T17:01:06.998Z","dependency_job_id":"91832159-f6b1-4a21-bc23-4384f2f11fef","html_url":"https://github.com/kt3k/saku","commit_stats":{"total_commits":144,"total_committers":3,"mean_commits":48.0,"dds":0.07638888888888884,"last_synced_commit":"316e9a919fba46aabd7b613c8e40ab49516884fc"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/kt3k/saku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fsaku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fsaku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fsaku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fsaku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/saku/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fsaku/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305577,"owners_count":24562087,"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-08-13T02:00:09.904Z","response_time":66,"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":["cli","markdown","task-runner"],"created_at":"2024-10-03T11:41:57.868Z","updated_at":"2025-08-13T20:09:27.794Z","avatar_url":"https://github.com/kt3k.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"150\" src=\"https://kt3k.github.io/saku/media/saku-logo.svg\" /\u003e\n\n# saku (作) v1.2.4\n\n[![CircleCI](https://circleci.com/gh/kt3k/saku.svg?style=svg)](https://circleci.com/gh/kt3k/saku)\n[![Build status](https://ci.appveyor.com/api/projects/status/56lo7khd1an83lh3?svg=true)](https://ci.appveyor.com/project/kt3k/saku-elt31)\n[![codecov](https://codecov.io/gh/kt3k/saku/branch/master/graph/badge.svg)](https://codecov.io/gh/kt3k/saku)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kt3k/saku)](https://goreportcard.com/report/github.com/kt3k/saku)\n\n\u003e Markdown-based task runner\n\n`saku` is a simple task runner based on markdown syntax. You can define and describe your tasks in markdown file `saku.md` and execute them with `saku` command.\n\n(You can optionally define tasks in `README.md`. See [The below](#embed-sakumd-in-readmemd) for details.)\n\n:bookmark: More background stories are explained in [an article](https://dev.to/kt3k/markdown-based-task-runner---saku-239o).\n\n# :cd: Install\n\n**Go users**\n\n    go get -u github.com/kt3k/saku\n\n**Mac OS users**\n\n    brew install kt3k/tap/saku\n\nOr download binary from the [release page][].\n\n# :leaves: Usage\n\nFirst, create a markdown file `saku.md`:\n\n````markdown\n# build\n\u003e Build the go binary.\n\n    go build -v -i main.go\n\n# test\n\u003e Run all the go tests.\n\n    go test -race ./...\n\n# js\n\n    minify -o public/script.js src/js\n\n# css\n\n    minify -o public/style.css src/css\n````\n\nThe above defines 4 tasks `build` `test` `js` `css`. (A heading (#) is a task title!)\n\nIf you hit `saku` (without arguments) it shows the list of the descriptions of the all tasks.\n\nIf you hit the command `saku build`, it invokes `build` task, `go build -v -i main.go` in the above example.\n\n**Note**: 4-space or tab indent makes code block in markdown syntax. See [here](https://daringfireball.net/projects/markdown/syntax#precode)\n\n````markdown\n    echo hello\n    echo world\n````\n\nThe above makes the code block of the 2 lines `echo hello` and `echo world`.\n\n# `saku.md` Rules\n\n- Heading (# title) starts the task definition.\n  - Different levels of headings (#, ##, ###,...) forms the groups of tasks. Tasks of the lower level headings belong to the previous task which has the upper level heading. See below for the details.\n- Code blocks are commands.\n  - Code blocks can have multiple commands. They will be executed sequentially.\n- Blockquotes are description of the task.\n- Anything else is ignored.\n- Anything before the first heading is ignored.\n\nFor example:\n\n````markdown\n# build\n\u003e Build the go binary.\n\n    echo Starting build go binary\n    go build -v -i main.go\n````\n\nThe above defines the task `build`, which has the description `Build the go binary.`. It has two commands `echo Starting build go binary` and `go build -v -i main.go` and they run in sequence.\n\n## Parallel execution\n\nWith `-p, --parallel` option, you can run tasks in parallel like the below:\n\n```\nsaku -p watch-scripts run-server\n```\n\n## Race execution\n\nWith `-r, --race` option, you can run tasks in parallel and terminate tasks when the first task finished. This is useful for testing servers.\n\nThis option takes effect only when `-p` option is specified.\n\n```\nsaku -p -r run-server test-server\n```\n\n## Grouping tasks\n\nYou can create the group of tasks by the levels of headings.\n\nFor example:\n\n````markdown\n# foo\n\n## bar\n\n    echo bar\n\n## baz\n\n    echo baz\n````\n\nThis defines 3 task `foo`, `bar` and `baz`. `foo` becomes the parent of `bar` and `baz`. So when you invoke `saku foo`, it executes both `bar` and `baz`:\n\n```console\n$ saku foo\n[saku] Run foo\n[saku] foo \u003e Run bar, baz in sequence\n+echo bar\nbar\n+echo baz\nbaz\n[saku] foo \u003e Finish bar, baz in sequence\n[saku] ✨  Finish foo\n```\n\nThe tasks of the lower level headings belong to the upper level heading and which forms the groups of tasks.\n\n## Use parallel in task grouping\n\nIf you need to run the children tasks in parallel, you can use `\u003c!-- saku parallel --\u003e` directive in the parents' contents:\n\n````markdown\n# foo\n\n\u003c!-- saku parallel --\u003e\n\n## bar\n\n    echo bar\n\n## baz\n\n    echo baz\n````\n\nThis executes `bar` and `baz` in parallel:\n\n```console\n$ saku foo\n[saku] Run foo\n[saku] foo \u003e Run bar, baz in parallel\n+echo bar\n+echo baz\nbar\nbaz\n[saku] foo \u003e Finish bar, baz in parallel\n[saku] ✨  Finish foo\n```\n\n## Nesting tasks (Dependency of tasks)\n\nYou can use `saku` in `saku.md` like below:\n\n````markdown\n# dist\n\n    saku js minify\n\n# js\n\n    browserify src/main.js \u003e build/app.js\n\n# minify\n\n    uglify-js \u003c build/app.js \u003e build/app.min.js\n````\n\nIn this way, you can express the dependencies of tasks.\n\nIf you need to invoke tasks in parallel from another task, use `saku -p`.\n\n````markdown\n# start\n\n    saku -p serve watch\n\n# watch\n\n    my-watcher\n\n# serve\n\n    my-server\n````\n\n# CLI Usage\n\n```\nUsage: saku [options] \u003ctask, ...\u003e [-- extra-options]\n\nOptions:\n  -v, --version   - - - Shows the version number and exits.\n  -h, --help  - - - - - Shows the help message and exits.\n  -i, --info  - - - - - Shows the task information and exits.\n  -p, --parallel  - - - Runs tasks in parallel. Default false.\n  -s, --sequential  - - Runs tasks in serial. Default true.\n  -c, --config \u003cpath\u003e - Specifies the config file. Default is 'saku.md'.\n  -r, --race  - - - - - Sets the flag to kill all tasks when a task\n                        finished with zero. This option is valid only\n                        with 'parallel' option.\n  -q, --quiet   - - - - Prints less messages.\n\nThe extra options after '--' are passed to each task command.\n```\n\n# Notes\n\n## Embed `saku.md` in `README.md`\n\nYou can optionally embed `saku.md` in `README.md`. See the below for details.\n\nREADME.md\n\n````markdown\n# Development\n\nThese are the commands for development. You can invoke them with `saku` command.\n\n\u003c!-- saku start --\u003e\n\n## build\n\n    go build -v -i main.go\n\n## test\n\n    go test -race ./...\n\n\u003c!-- saku end --\u003e\n````\n\nThe contents between `\u003c!-- saku start --\u003e` and `\u003c!-- saku end --\u003e` are used as `saku.md`. You can write them as if they are the part of your `README.md`.\n\n## Example use cases\n\n- [moneybit-app](https://github.com/kt3k/moneybit-app)'s [saku.md](https://github.com/kt3k/moneybit-app/blob/master/saku.md)\n  - A project of accounting app for mobile, written in JavaScript.\n\n**Note**: Please add yours if you use saku in your OSS project!\n\n## The origin of the name\n\nSaku is the Japanese name for the Chinese character \"作\", which means \"make\". Saku is intended to be an alternative of `make` command (of a task runner use case).\n\n# Prior Art\n\n- [node-saku][]\n  - the original implementation of saku in JavaScript\n- [make][]\n- [npm-run-all][] by @mysticatea\n- yaml-based tools\n  - [robo][]\n  - [go-task][]\n  \n# Who use saku?\n\nSee [this search](https://github.com/search?q=filename%3A%22saku.md%22+-org%3Akt3k\u0026type=Code).\n\n# [CHANGELOG](https://github.com/kt3k/saku/blob/master/CHANGELOG.md)\n\n# License\n\nMIT\n\n[make]: https://en.wikipedia.org/wiki/Make_(software)\n[npm-run-all]: https://github.com/mysticatea/npm-run-all\n[robo]: https://github.com/tj/robo\n[go-task]: https://github.com/go-task/task\n[node-saku]: https://github.com/kt3k/node-saku\n[release page]: https://github.com/kt3k/saku/releases/tag/v1.2.4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fsaku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Fsaku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fsaku/lists"}