{"id":21658469,"url":"https://github.com/omio-labs/myke","last_synced_at":"2025-12-26T12:46:51.810Z","repository":{"id":54484703,"uuid":"73693089","full_name":"omio-labs/myke","owner":"omio-labs","description":"make with yaml: development tasks made simple with golang, yaml and many ingredients","archived":false,"fork":false,"pushed_at":"2021-02-16T08:51:49.000Z","size":347,"stargazers_count":70,"open_issues_count":16,"forks_count":16,"subscribers_count":108,"default_branch":"master","last_synced_at":"2024-06-18T22:59:52.836Z","etag":null,"topics":["developer-tools","development","devtools","go","golang","shell","task-runner"],"latest_commit_sha":null,"homepage":"https://omio-labs.github.io/myke","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/omio-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-14T10:22:14.000Z","updated_at":"2024-01-13T03:20:06.000Z","dependencies_parsed_at":"2022-08-13T17:20:50.083Z","dependency_job_id":null,"html_url":"https://github.com/omio-labs/myke","commit_stats":null,"previous_names":["goeuro/myke"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omio-labs%2Fmyke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omio-labs%2Fmyke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omio-labs%2Fmyke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omio-labs%2Fmyke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omio-labs","download_url":"https://codeload.github.com/omio-labs/myke/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226304713,"owners_count":17603654,"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","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":["developer-tools","development","devtools","go","golang","shell","task-runner"],"created_at":"2024-11-25T09:29:17.906Z","updated_at":"2025-12-26T12:46:51.762Z","avatar_url":"https://github.com/omio-labs.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# myke [![Latest Release](https://img.shields.io/github/release/omio-labs/myke.svg)](https://github.com/omio-labs/myke/releases/latest) [![Build Status](https://travis-ci.org/omio-labs/myke.svg?branch=travis-ci)](https://travis-ci.org/omio-labs/myke) [![Go Report Card](https://goreportcard.com/badge/github.com/omio-labs/myke)](https://goreportcard.com/report/github.com/omio-labs/myke) [![codecov](https://codecov.io/gh/omio-labs/myke/branch/master/graph/badge.svg)](https://codecov.io/gh/omio-labs/myke)\n\n\u003e myke makes it easy to write development tasks\n\nDevelopment scripts usually begin as a simple shell wrapper with switch cases (`service.sh start|stop|etc`), and then aggregate multiple scripts, add arguments, discovery/listing, environment variable handling, then easy overriding and defaults, and soon manipulating files based on these variables, `sed|awk|envsubst`, then proceed to python/ruby/etc with some real templating, then start adding dependencies, then become projects themselves with a checkout/setup process :trollface:\n\nmyke solves all these problems in a single tiny binary, to avoid reinventing the same stuff over and over again.\n\n## Features\n\n* Define tasks in simple `.yml` files\n* Tasks execute in a predictable environment irrespective of which folder they are invoked from\n* Nice aggregation and discovery with tag-based grouping, suitable for few and many tasks, organizing into subfolders/submodules/repos/projects\n* Robust environment handling - Can be defined as keys in the YML or as dotenv files, overridden by dotenv.local files, `PATH` is always prepended, shell always takes precedence\n* Built-in templating using golang text/template and 50+ functions provided by [sprig](https://github.com/Masterminds/sprig)\n* Mixin ymls to share tasks, envvars, etc\n* Runtime arguments like `myke task1 --key1=val1 task2 --key2=val2 ...`\n* `before/after/error` hooks to perform cleanups, chains with mixins, etc\n* `retry` support with max and delay for failing tasks\n* Tiny, cross-platform binaries\n* and a lot of small utilities packed in\n\n## Usage\n\nCreate `myke.yml` with tasks. For example, running `myke` on this folder prints:\n\n```\n  PROJECT  |    TAGS    |             TASKS\n+----------+------------+-------------------------------------+\n  myke     |            | test\n  example  |            | build\n  env      |            | env\n  tags1    | tagA, tagB | tag\n  tags2    | tagB, tagC | tag\n  depends  |            | after, before, before_after, itself\n  template |            | args, file\n  mixin    |            | task2, task3, task1\n```\n\nUsing the above myke.yml, you can invoke tasks like:\n\n* `myke build` runs build in all projects\n* `myke \u003cproject\u003e/build` runs build in that specific `\u003cproject\u003e`\n* `myke \u003ctag\u003e/build` runs build in all projects tagged `\u003ctag\u003e`\n* `myke \u003ctagA\u003e/\u003ctagB\u003e/.../build` can match tasks by many tags (AND)\n* `myke task1 --key1=val1 task2 --key2=val2 ...` passes arguments to individual tasks\n\n## Installation\n\n* [Grab the latest release](https://github.com/omio-labs/myke/releases/latest)\n\n## Examples\n\nExplore the self documenting `examples` folder.\n\n## Task Execution Environment\n\n* tasks always run with `cwd` set to the folder where the task is defined\n* `cwd/bin` is always added to `PATH`\n* environment variables are loaded from:\n  * `env` property in yml\n  * dotenv files from `env_files`\n  * for every dotenv file, the corresponding dotenv `.local` file is also loaded if present\n* same is done for every mixin that the yml uses\n  * So, if you mixin `\u003csome-other-folder\u003e/myke.yml`, then that yml's `cwd/bin` is also added to the PATH, that yml's env/env_files/env_files.local are also loaded, and so on\n* shell exported environment variables take precedence\n* additional variables: `$MYKE_PROJECT`, `$MYKE_TASK`, `$MYKE_CWD` are always set\n  * `$myke` is set to full path of myke itself to easily nest myke calls (e.g. `$myke do_something` will become `myke.exe do_something` in windows)\n* command is templated using golang text/template and sprig\n  * environment and task arguments are passed in as variables\n* command is run using `sh -exc`\n\n## FAQs\n\n### How do I share common logic in tasks?\n\nThere are multiple ways including:\n\n* Place shared scripts in `bin` folder (remember that `CWD/bin` is always added to the `PATH`). If the scripts are complex, you can write them in any scripting language of your choice\n* If multiple projects need to share the same scripts, then use a common mixin folder (remember that for mixin ymls - the same `CWD/bin` is added to PATH, same env files are loaded, etc, refer Task Execution Environment above)\n\nFor example,\n\n* `java-mixin`\n  * `myke.yml` - project template with tasks\n  * `myke.env` - environment vars, can be overridden by extending projects\n  * `bin` - gets added to the PATH of extending projects\n    * any shared scripts that you want\n* `kubernetes-mixin`\n  * ...\n  * ...\n\n### Why use myke?\n\nDeferring higher order build logic (like reading scm history for changelogs, updating scm tags/branches, generating version numbers, etc) to a meta-build tool (like a task runner or aggregator), restricting build tools to do only simple source builds, and having a shared build vocabulary across projects is a generally good idea. There are millions of such meta-build tools or task aggregators out there, we just wanted something fast, zero-dependency and language-agnostic while still helping us manage multiple components across repositories with ease.\n\nIn that sense, `myke` is never a build or deployment tool, its just a task aggregator. Its not designed to be an alternative for source build tools, rather it just augments them. The comparison below is on that same perspective.\n\n* `maven` is a lifecycle reactor and/or project management tool that does a lot of things (compilation/scm/release/lifecycle/build/etc), except its hard to use it as a simple task runner. myke focuses only on the latter\n* `bazel` `buck` `pants` `gradle` `...` replace your current buildchain by giving you a totally new DSL to compile your programs (`java_binary`, etc). myke simply acts as a yml-based interface to your existing tools and workflows, thereby not needing to change your project and IDE setup\n* `grunt` `gulp` `pyinvoke` `rake` `sake` `thor` `...` myke is zero-dependency, language agnostic, uses simple yml and allows aggregation of tasks through hierarchies, templates and tags\n* `make` `scons` `ninja` `...` they are low-level build tools with a crux of file-based dependencies. Most buildchains today are already intelligent enough to process only changed files, so myke completely bypasses file tracking and only focuses on task aggregation and discoverability\n* `capistrano` `fabric` `...` myke is not a deployment tool for remote machines, and does not do anything over SSH\n* `ansible` `salt` `...` myke is not a configuration management tool, its a task runner\n* [`robo`](https://github.com/tj/robo) is the closest relative to myke, you should check it out as well\n\n## Development\n\nUse docker/docker-compose to develop. You don't need to have golang installed.\n\n* `docker-compose build` Builds and runs tests\n* `docker-compose up` Produces `bin` folder with executables\n* `docker-compose run --rm default /bin/bash` Gives you a terminal inside the container, from where you can run go commands like:\n  * `go test ./...` Runs all tests\n  * `go run main.go` Compiles and runs main\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomio-labs%2Fmyke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomio-labs%2Fmyke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomio-labs%2Fmyke/lists"}