{"id":13496081,"url":"https://github.com/rumkin/bake","last_synced_at":"2025-07-27T04:31:34.870Z","repository":{"id":152260151,"uuid":"53675932","full_name":"rumkin/bake","owner":"rumkin","description":"Bake is a bash task runner","archived":false,"fork":false,"pushed_at":"2017-03-25T18:15:27.000Z","size":32,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-31T11:36:52.345Z","etag":null,"topics":["bash","runner","task","task-runner"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/rumkin.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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}},"created_at":"2016-03-11T15:19:51.000Z","updated_at":"2024-01-31T18:12:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"752b3af5-cae8-42a9-9137-28fea9adf891","html_url":"https://github.com/rumkin/bake","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/rumkin%2Fbake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fbake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fbake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fbake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumkin","download_url":"https://codeload.github.com/rumkin/bake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227759974,"owners_count":17815626,"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":["bash","runner","task","task-runner"],"created_at":"2024-07-31T19:01:41.969Z","updated_at":"2024-12-02T16:12:43.804Z","avatar_url":"https://github.com/rumkin.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Bake\n\nBake is a modular task running tool written on pure bash.\n\n## Usage\n\nAll you need is to create `bake.sh` into root of your project. Run `bake bake:init`\ncommand. It will create empty `bake.sh` file and `bake_modules` directory.\n\nExample bakefile:\n\n```bash\n# bake.sh\n\n# Initialize new node package\ntask:hello() {\n    echo 'Hello'\n}\n\ntask:say_hello() {\n    echo 'Hello again'\n}\n```\n\nNow you can run tasks:\n\n```shell\nbake hello # -\u003e Hello\nbake say-hello # -\u003e Hello again\n```\n\n## Modules\n\nModular system is inspired by node.js and golang it uses `bake_modules` directory\nand url based package naming. Module requires with command `bake:module`.\nModule file could contain tasks and custom functions or variables.\n\nInstall module:\n```bash\nbake -i \"github.com/rumkin/test_module\"\nls bake_modules/github.com/rumkin/test_module # -\u003e module.sh\n```\n\nThis command will install module into directory\n`bake_modules/github.com/rumkin/test_module`.\n\nExample:\n```bash\n# bake_modules/github.com/rumkin/test_module/module.sh\nrumkin:test_module:print() {\n  echo \"Hello world\"\n}\n\n# bake.sh\nbake:module \"github.com/rumkin/test_module\"\n\ntask:run() {\n    rumkin:test_module:print # -\u003e Hello world\n}\n```\n\n### Git modules\n\nGit module could be started with \"http://\" or \"https://\" and one of popular\nrepository \"github.com\" or \"bitbucket.org\"\n\n```\nbake -i \"https://github.com/rumkin/test_module\"\ntree bake_modules\n```\n\nOutput:\n\n```\nbake_modules/\n`-- github.com\n    `-- rumkin\n        `-- test_module\n            `-- module.sh\n```\n\n### Local modules\n\nLocal module must starts with \".\", \"..\" or \"/\" and will be installed by it's\nbase name. Example:\n\n```\nbake -i ../some-bake-module\nls bake_modules # -\u003e some-bake-module\n```\n\n## CLI arguments\n\n* `-l` – List tasks.\n* `-e [environment]` – Specify environment located in `bake_env/${environment}.sh` or output current environment variables.\n* `-i \u003cmodule\u003e` – Install module\n* `-v` – Print bake version.\n* `-h` – Print bake help.\n\n## Lookup and $PWD\n\nBake by default looking up the directory tree and search for `.bakerc` then `bake.sh`\nfile. After that bake switch `$PWD` to the project's root. Calling directory will be stored in `$CWD` variable.\n\nExample:\n\n```bash\n# example/bake.sh\ntask:pwd() {\n    echo $PWD $CWD\n}\n\ntask:ls() {\n    ls .\n}\n```\n\n```bash\ncd example/nest\nbake pwd # -\u003e example example/nest\nbake ls # -\u003e bake.sh nest\n```\n\n## Environment\n\nEnvironments store in `bake_env` directory in shell files like `dev.sh`. Current\nenvironment lays at `.env` file. To dump current environment run `bake -e`. To\nswitch environment run `bake -e \u003cenv\u003e`. To use environment in current\ncall run `bake -e \u003cenv\u003e \u003ctask\u003e`.\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumkin%2Fbake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumkin%2Fbake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumkin%2Fbake/lists"}