All Projects → omio-labs → myke

omio-labs / myke

Licence: MIT License
make with yaml: development tasks made simple with golang, yaml and many ingredients

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to myke

Aiohttp Devtools
dev tools for aiohttp
Stars: ✭ 202 (+201.49%)
Mutual labels:  development, devtools, developer-tools
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: ✭ 2,559 (+3719.4%)
Mutual labels:  development, developer-tools
Okteto
Develop your applications directly in your Kubernetes Cluster
Stars: ✭ 1,937 (+2791.04%)
Mutual labels:  development, developer-tools
narc
Small utility to watch log files and ship to syslog service.
Stars: ✭ 18 (-73.13%)
Mutual labels:  devtools, developer-tools
Wago
Automate the actions you do after saving code.
Stars: ✭ 60 (-10.45%)
Mutual labels:  development, developer-tools
Multiwatch
Simple task runner on directory changes that doesn't produce tons of logs if everything is OK 👌
Stars: ✭ 74 (+10.45%)
Mutual labels:  development, developer-tools
Awesome Ci
List of Continuous Integration services
Stars: ✭ 2,737 (+3985.07%)
Mutual labels:  development, developer-tools
Lunar Unity Console
High-performance Unity iOS/Android logger built with native platform UI
Stars: ✭ 628 (+837.31%)
Mutual labels:  development, developer-tools
nanobox-rails
Quickly set up a Ruby on Rails app on Nanobox, the ideal platform for developers. With Nanobox, Rails app developers can set up instant, isolated development environments that can be shared among team members. Rails apps created using Nanobox can be automatically deployed to AWS, Azure, Google Cloud, and other cloud hosts without the need for de…
Stars: ✭ 19 (-71.64%)
Mutual labels:  devtools, developer-tools
android-trinity
android-trinity is tiny proactive framework with much of the scaffolding code required to start a new Android Application.
Stars: ✭ 44 (-34.33%)
Mutual labels:  development, developer-tools
portal
An api-driven, in-kernel layer 2/3 load balancer.
Stars: ✭ 101 (+50.75%)
Mutual labels:  devtools, developer-tools
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+12331.34%)
Mutual labels:  development, developer-tools
Influx Prompt
An interactive command-line InfluxDB cli with auto completion.
Stars: ✭ 42 (-37.31%)
Mutual labels:  development, developer-tools
Pric
Simple zero-config tool to create Private Certificate Authority & issue locally-trusted development server certificates with any domain names you'd like. SSL certificates for development purposes.
Stars: ✭ 87 (+29.85%)
Mutual labels:  development, developer-tools
Chromelogger
chrome extension for server side console logging
Stars: ✭ 884 (+1219.4%)
Mutual labels:  development, developer-tools
alfred
(v0.2) Even Batman needs a little help. Task runner. Automator. Build system.
Stars: ✭ 62 (-7.46%)
Mutual labels:  task-runner, developer-tools
Ram
⚛️ React Application Manager: create and run React (and other) applications – no command line or build setup required
Stars: ✭ 585 (+773.13%)
Mutual labels:  development, developer-tools
Mailcatcher
Catches mail and serves it through a dream.
Stars: ✭ 5,512 (+8126.87%)
Mutual labels:  development, devtools
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+79082.09%)
Mutual labels:  development, developer-tools
dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (-59.7%)
Mutual labels:  development, developer-tools

myke Latest Release Build Status Go Report Card codecov

myke makes it easy to write development tasks

Development 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:

myke solves all these problems in a single tiny binary, to avoid reinventing the same stuff over and over again.

Features

  • Define tasks in simple .yml files
  • Tasks execute in a predictable environment irrespective of which folder they are invoked from
  • Nice aggregation and discovery with tag-based grouping, suitable for few and many tasks, organizing into subfolders/submodules/repos/projects
  • 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
  • Built-in templating using golang text/template and 50+ functions provided by sprig
  • Mixin ymls to share tasks, envvars, etc
  • Runtime arguments like myke task1 --key1=val1 task2 --key2=val2 ...
  • before/after/error hooks to perform cleanups, chains with mixins, etc
  • retry support with max and delay for failing tasks
  • Tiny, cross-platform binaries
  • and a lot of small utilities packed in

Usage

Create myke.yml with tasks. For example, running myke on this folder prints:

  PROJECT  |    TAGS    |             TASKS
+----------+------------+-------------------------------------+
  myke     |            | test
  example  |            | build
  env      |            | env
  tags1    | tagA, tagB | tag
  tags2    | tagB, tagC | tag
  depends  |            | after, before, before_after, itself
  template |            | args, file
  mixin    |            | task2, task3, task1

Using the above myke.yml, you can invoke tasks like:

  • myke build runs build in all projects
  • myke <project>/build runs build in that specific <project>
  • myke <tag>/build runs build in all projects tagged <tag>
  • myke <tagA>/<tagB>/.../build can match tasks by many tags (AND)
  • myke task1 --key1=val1 task2 --key2=val2 ... passes arguments to individual tasks

Installation

Examples

Explore the self documenting examples folder.

Task Execution Environment

  • tasks always run with cwd set to the folder where the task is defined
  • cwd/bin is always added to PATH
  • environment variables are loaded from:
    • env property in yml
    • dotenv files from env_files
    • for every dotenv file, the corresponding dotenv .local file is also loaded if present
  • same is done for every mixin that the yml uses
    • So, if you mixin <some-other-folder>/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
  • shell exported environment variables take precedence
  • additional variables: $MYKE_PROJECT, $MYKE_TASK, $MYKE_CWD are always set
    • $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)
  • command is templated using golang text/template and sprig
    • environment and task arguments are passed in as variables
  • command is run using sh -exc

FAQs

How do I share common logic in tasks?

There are multiple ways including:

  • 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
  • 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)

For example,

  • java-mixin
    • myke.yml - project template with tasks
    • myke.env - environment vars, can be overridden by extending projects
    • bin - gets added to the PATH of extending projects
      • any shared scripts that you want
  • kubernetes-mixin
    • ...
    • ...

Why use myke?

Deferring 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.

In 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.

  • 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
  • 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
  • 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
  • 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
  • capistrano fabric ... myke is not a deployment tool for remote machines, and does not do anything over SSH
  • ansible salt ... myke is not a configuration management tool, its a task runner
  • robo is the closest relative to myke, you should check it out as well

Development

Use docker/docker-compose to develop. You don't need to have golang installed.

  • docker-compose build Builds and runs tests
  • docker-compose up Produces bin folder with executables
  • docker-compose run --rm default /bin/bash Gives you a terminal inside the container, from where you can run go commands like:
    • go test ./... Runs all tests
    • go run main.go Compiles and runs main
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].