{"id":22156169,"url":"https://github.com/leothorp/mk","last_synced_at":"2025-03-24T14:33:10.684Z","repository":{"id":102384827,"uuid":"389217393","full_name":"leothorp/mk","owner":"leothorp","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-28T02:09:50.000Z","size":236445,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T19:24:52.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leothorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-24T23:03:49.000Z","updated_at":"2023-03-10T08:03:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa85c057-6400-4d58-960e-32910943ab79","html_url":"https://github.com/leothorp/mk","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fmk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fmk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fmk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fmk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leothorp","download_url":"https://codeload.github.com/leothorp/mk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289578,"owners_count":20591098,"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":[],"created_at":"2024-12-02T02:37:34.514Z","updated_at":"2025-03-24T14:33:10.657Z","avatar_url":"https://github.com/leothorp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mk\n\nProject-level task automation with less typing.\n\n### What is this?\n\nEssentially this is a more terse version of npm scripts or Make tasks-\na quick way to define arbitrary commands, shortcuts, and script aliases\nthat are useful in the current directory/project. Like with Make, there's no assumption about what language is being used. an mk.yml file in the project root is the only requirement.\n\n### Installation\n\nvia npm (recommended):\n\n```\n  npm i -g @leothorp/mk\n```\n\nOr for a binary installation that doesn't require Node/npm to already be installed:\n\n```\nbash \u003c(curl -sSL https://raw.githubusercontent.com/leothorp/mk/main/scripts/path-install.sh)\n```\n\nthat runs the `scripts/path-install.sh` script and adds `mk` under `/usr/local/bin`, which\nis likely already in your PATH.\n\n### Basic Tasks\n\nAdd a file called `mk.yml` at the project root.\n\nThis should contain, at minimum, a `tasks` object, a mapping of task names to shell commands.\n\n_Example:_\n\n```\ntasks:\n  dinner: echo \"tomato\"\n  cra: npx create-react-app new-one\n  save-work: git add . \u0026\u0026 git commit -m\n```\n\nNow in the terminal, I can type\n`mk dinner`\n\nand see the output `tomato`- as if I'd manually typed `echo \"tomato\"`.\n\nAny additional arguments are forwarded along to the end of the command.\nIf I do\n`mk save-work \"typo\"`\n\nIt'll be as if I'd typed\n`git add . \u0026\u0026 git commit -m \"typo\"`\nThese \"partial command\" tasks can be useful for repetitive tasks that still have a small manual/unpredictable component.\n\n### External Scripts\n\nSometimes you have a script that is more involved than a\nshell one-liner, so you put it in its own file in in the project. `mk` will automatically detect any .py, .js, or .sh files in a `scripts` directory at the porject root and make those available as tasks, without anything needing to be added to `mk.yml`.\n(this script directory path is configurable- see the \"Configuration\" section below.)\n\n_Example:_\nIf I create the file `scripts/build.sh`, I can run that script by typing `mk build`.\n\nIt's equivalent to if I had added something like this the following to mk.yml. The same goes\nfor .py and .js scripts.\n\n```\ntasks:\n  build: bash ./scripts/build.sh\n```\n\n### Configuration\n\n`mk.yml` can optionally include a `settings` object, with the\nfollowing possible keys.\n\n-`scripts_dir:` Default: `./scripts`\nPath to a directory in the project containing script files that should be automatically defined as mk tasks.\n\n-`auto_scripts_enabled:` Default: `true`\nThis is used to enable/disable the scripts_dir/automatic task functionality.\n\n_Example:_\n\n```\nsettings:\n  auto_scripts_enabled: true\n  scripts_dir: \"./tools/my-scripts\"\n```\n\n### CLI commands\n\n-`mk \u003ctask\u003e \u003c...args\u003e` Run the given mk task, optionally forwarding\none or more arguments.\n\n-`mk -v, --version` Print version number.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleothorp%2Fmk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleothorp%2Fmk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleothorp%2Fmk/lists"}