An open-source entry in TopGit's GitHub warehouse: egoist/maid, 2.0k stars, JavaScript. Markdown driven task runner.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
# For npm users
npm i -g maid
# For Yarn users
yarn global add maid
Or if you want to ensure that your teammates are using the same version as you, it's recommended to install Maid locally:
# For npm users
npm i -D maid
# For Yarn users
yarn add maid --dev
PRO TIP: you can use npx or yarn command to run any locally installed executable that is inside node_modules/.bin/, e.g. use yarn maid to run the locally installed maid command.
What is a maidfile?
A maidfile is where you define tasks, in Markdown!
📝 maidfile.md:
## lint
It uses ESLint to ensure code quality.
```bash
eslint --fix
```
## build
Build our main app
<!-- Following line is a maid command for running task -->
Run task `build:demo` after this
```bash
# note that you can directly call binaries inside node_modules/.bin
# just like how `npm scripts` works
babel src -d lib
```
## build:demo
You can use JavaScript to write to task script too!
```js
const webpack = require('webpack')
// Async task should return a Promise
module.exports = () =>
new Promise((resolve, reject) => {
const compiler = webpack(require('./webpack.config'))
compiler.run((err, stats) => {
if (err) return reject(err)
console.log(stats.toString('minimal'))
resolve()
})
})
```
Each task is defined using h2 header and its child contents, the value of h2 header will be used as task name, its following paragraphs (optional) will be used as task description, and following code block (optional) will be used as task script.
Currently the code block languages are shbashjsjavascript and more!.
Now run maid help to display the help for this maidfile:
❯ maid help
lint It uses ESLint to ensure code quality.
build Build our main app
build:demo You can use JavaScript to write to task script too!
❯ maid help "build*"
build Build our main app
build:demo You can use JavaScript to write to task script too!
To run a task, you can directly run maid <task_name>
❯ maid build
[13:46:38] Starting 'build'...
🎉 Successfully compiled 3 files with Babel.
[13:46:38] Finished 'build' after 363 ms...
[13:46:38] Starting 'build:demo'...
webpack compiled in 734ms.
[13:46:38] Finished 'build:demo' after 734 ms...
# to get minimal logs
❯ maid build --quiet
🎉 Successfully compiled 3 files with Babel.
webpack compiled in 734ms.
Run tasks before/after a task
You can run tasks before or after a task:
## build
Run task `deploy` after this
```bash
webpack --config config/webpack.config.js
```
## deploy
```bash
gh-pages -d dist
```
Expressions that start with Run(s)? task(s)? are treated specially. In this case if you run maid build it will also run the deploy task after build has finished.
The syntax is simple: Runs? tasks? <taskNames> (before|after) this (in parallel)? where each task name is surrounded by a pair of backticks: `.
By default a task will run before the current task. So Run task `build` would run build before the task it was described in. The presence of after anywhere in the sentence (after Run task) will cause it to be ran after. Commands run synchronously by default. The presence of in parallel in the sentence will cause it to be run in parallel.
Examples:
Run task `build`.
Run task `build` after this.
Run tasks `clean`, `build`, and `lint`.
Run tasks `build:app` `start:server` before this.
Run tasks `build:server` `build:client` before this in parallel.
Task hooks
Like npm scripts, when you run a command called build, when it's finished we will also run postbuild task.
Hook syntax:
pre<taskName>: Run before a specific task.
post<taskName>: Run after a specific task.
afterAll: Run after all tasks.
beforeAll: Run before all tasks.
Advanced
Code block languages
bash/sh
Read command line arguments
The CLI arguments are passed to executed script, so you can access it like this:
## log
```bash
echo $1
```
Then run maid log nice and it will print nice in the console.
js/javascript
The JS script will also be evaluated.
## log
```js
console.log(process.argv)
```
Asynchronous task
For asynchonous tasks, you can export a function which returns Promise:
By default, Maid would use maidfile.md, CONTRIBUTING.md or README.md (case-insensitive) in current working directory, when you're using README.md you need to manually specify the section of the markdown you wanna use as Maid tasks like below:
## My Project
## How to use
Let me explain..
## Development
<!-- maid-tasks -->
### test
```bash
# some test scripts...
```
Unlike a maidfile.md which uses all h2 headers as tasks, in README.md only h3 headers under the specified h2 header will be used as tasks. You can add a <!-- maid-tasks --> comment right below the desired h2 header.
Alternatively, if you're not using maidfile.md, you can also use --section h2_header and --path foo.md flags to customize it.
The most recent commit recorded on egoist/maid was 4.4 years ago, based on the GitHub push timestamp. The repository has 36 forks — one of the better signals of community interest.
How many stars does egoist/maid have?
egoist/maid has 2.0k GitHub stars — refresh the page for the live number, or check github.com/egoist/maid. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is egoist/maid written in?
egoist/maid is written primarily in JavaScript. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is egoist/maid associated with?
GitHub's repository topics for egoist/maid: "gulp", "js", "makefile", "markdown", "runner", "task". TopGit's editorial category is open-source.
Where do I read more about egoist/maid?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/egoist/maid is the definitive source.
Read full README in the tab above.
Is maid worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of maid.