{"id":24396917,"url":"https://github.com/samcrosoft/bakefile","last_synced_at":"2026-04-13T07:37:01.935Z","repository":{"id":272588486,"uuid":"917072750","full_name":"samcrosoft/Bakefile","owner":"samcrosoft","description":"This small tool will help you manage cli tasks in a simple manner, something like a bash only outlook to makefile","archived":false,"fork":false,"pushed_at":"2025-01-15T11:22:04.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T02:34:57.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/samcrosoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-15T09:55:46.000Z","updated_at":"2025-01-15T11:22:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"678d4e94-6624-4dc3-8480-70d658528ad7","html_url":"https://github.com/samcrosoft/Bakefile","commit_stats":null,"previous_names":["samcrosoft/bakefile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samcrosoft/Bakefile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrosoft%2FBakefile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrosoft%2FBakefile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrosoft%2FBakefile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrosoft%2FBakefile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samcrosoft","download_url":"https://codeload.github.com/samcrosoft/Bakefile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrosoft%2FBakefile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31744404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-01-19T21:59:57.176Z","updated_at":"2026-04-13T07:37:01.915Z","avatar_url":"https://github.com/samcrosoft.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bakefile\nThis small tool will help you manage cli recipes in a simple manner, something like a bash only outlook to makefile. This is a tool I use personally in my projects but I also drew inspiration from *Taskfile* and decided to package it and share it with the rest of the world.\n\nThe engine of the project is a file called `Bakefile`, it is a bash script, just clone it at the root of your project and you are good to go. An example of a simple `Bakefile` is shown below\n\n```sh\n#!/bin/bash\n_nodeModulesBin=\"./node_modules/.bin\"\n_composerVendorBin=\"./vendor/bin\"\n_VERSION=\"1.0\"\nPATH=\"$_nodeModulesBin:$_composerVendorBin:$PATH\"\n\nfunction _banner(){\n    cat \u003c\u003c \"EOF\"\n\n   / /_  ____ _/ /_____  / __(_) /__  \n  / __ \\/ __ `/ //_/ _ \\/ /_/ / / _ \\\n / /_/ / /_/ / ,\u003c /  __/ __/ / /  __/\n/_.___/\\__,_/_/|_|\\___/_/ /_/_/\\___/ \nEOF\n    cat \u003c\u003c EOF\nVersion: $_VERSION\nUser: $(whoami)\nPWD: $PWD\n\nEOF\n}\n\nfunction _default {\n    start\n}\n\nfunction install {\n    echo \"install recipe not implemented\"\n}\n\nfunction build {\n    echo \"build recipe not implemented\"\n}\n\nfunction start {\n    echo \"start recipe not implemented\"\n}\n\n\n\nfunction help {\n    echo \"$0 \u003crecipe\u003e \u003cargs\u003e\"\n    echo \"Recipes:\"\n    compgen -A function | grep -v '^_' | cat -n\n}\n\nTIMEFORMAT=$'\\nRecipes completed in %3lR'\n_banner\ntime ${@:-_default}\n```\n\nAnd to run a recipe, do the following:\n\n```sh\n$ bake start\n\n   / /_  ____ _/ /_____  / __(_) /__  \n  / __ \\/ __ `/ //_/ _ \\/ /_/ / / _ \\\n / /_/ / /_/ / ,\u003c /  __/ __/ / /  __/\n/_.___/\\__,_/_/|_|\\___/_/ /_/_/\\___/ \nVersion: 1.0\nUser: someone\nPWD: /var/www/html/Bakefile\n\nstart recipe not implemented\n\nRecipe completed in 0m0.005s\n```    \n\n## Install\nTo \"install\", add the following to your `.bashrc` or `.zshrc` (or `.whateverrc`):\n\n    # Quick start with downloading the default Bakefile to your project\n    alias bake-init=\"curl -s https://raw.githubusercontent.com/samcrosoft/Bakefile/main/Bakefile \u0026\u0026 chmod +x Bakefile\"\n    \n    # Run your recipes like: bake \u003crecipe\u003e\n    alias bake=./Bakefile\n\n## Usage\nOpen your directory and run `bake-init` to add the default Bakefile template to your project directory:\n\n    $ cd my-project\n    $ bake-init\n\nOpen the `Bakefile` and add your recipes (functions). To run recipes, use `bake`:\n\n```sh\n$ bake help \n\n   / /_  ____ _/ /_____  / __(_) /__  \n  / __ \\/ __ `/ //_/ _ \\/ /_/ / / _ \\\n / /_/ / /_/ / ,\u003c /  __/ __/ / /  __/\n/_.___/\\__,_/_/|_|\\___/_/ /_/_/\\___/ \nVersion: 1.0\nUser: adebolaolowofela\nPWD: /private/var/www/html/personal/github-projects/Bakefile\n\n./Bakefile \u003crecipe\u003e \u003cargs\u003e\n\nRecipes:\n     1  build\n     2  help\n     3  install\n     4  start\n\nRecipe completed in 0m0.012s\n```    \n\n## Techniques\n\n### Private Recipes\nPrivate recipes are recipes(functions) that are not listed when the `help` recipe is baked. A private recipe starts with an underscore `_` e.g\n\n```sh\n\nfunction _generate_cert {\n    ...\n}\n\nfunction start {\n    ...\n}\n\nfunction build {\n\n}\n\n```\nNow, lets view all recipes\n\n```sh\n$ bake help \n\n   / /_  ____ _/ /_____  / __(_) /__  \n  / __ \\/ __ `/ //_/ _ \\/ /_/ / / _ \\\n / /_/ / /_/ / ,\u003c /  __/ __/ / /  __/\n/_.___/\\__,_/_/|_|\\___/_/ /_/_/\\___/ \nVersion: 1.0\nUser: someone\nPWD: /var/www/html/Bakefile\n\n./Bakefile \u003crecipe\u003e \u003cargs\u003e\n\nRecipes:\n     1  build\n     2  start\n```\n\nNote: The `_generate_cert` recipe is missing, this is because it is a private recipe.\n\n\n### Arguments\nLet’s pass some arguments to a recipe. Arguments are accessible to the recipes via the `$1, $2, $n..` variables. Let’s allow us to specify the port of the HTTP server:\n\n```sh\n#!/bin/bash\n\nfunction local-server {\n  port=\"${1:-8000}\"\n  symfony local:server:start --port=$port\n}\n\n...\n```\n\nAnd if we run the `local-server` recipe with a new port:\n\n```sh\n$ bake local-server 7070\n\n   / /_  ____ _/ /_____  / __(_) /__  \n  / __ \\/ __ `/ //_/ _ \\/ /_/ / / _ \\\n / /_/ / /_/ / ,\u003c /  __/ __/ / /  __/\n/_.___/\\__,_/_/|_|\\___/_/ /_/_/\\___/ \nVersion: 1.0\nUser: someone\nPWD: /var/www/html/symfony-project\n                                                                                                                   \n [WARNING] The local web server is optimized for local development and MUST never be used in a production setup.                                                                                                                         \n [WARNING] Please note that the Symfony CLI only listens on 127.0.0.1 by default since version 5.10.3.                  \n           You can use the --allow-all-ip or --listen-ip flags to change this behavior.                                 \n[OK] Web server Listening    \n    The Web server is using PHP CLI 8.*\n    http://127.0.0.1:7070       \n\n[Web Server ] Jan 15 11:05:38 |DEBUG  | PHP    Reloading PHP versions \n[Web Server ] Jan 15 11:05:39 |DEBUG  | PHP    Using PHP version 8.4.2 (from default version in $PATH) \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamcrosoft%2Fbakefile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamcrosoft%2Fbakefile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamcrosoft%2Fbakefile/lists"}