{"id":17214955,"url":"https://github.com/wilsson/kebot","last_synced_at":"2025-04-13T23:16:37.422Z","repository":{"id":17958891,"uuid":"80775240","full_name":"wilsson/kebot","owner":"wilsson","description":" Node scripts and command automaton","archived":false,"fork":false,"pushed_at":"2023-01-12T05:35:40.000Z","size":636,"stargazers_count":11,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T13:24:26.098Z","etag":null,"topics":["automation","cli","tasks","tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/wilsson.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}},"created_at":"2017-02-02T22:33:42.000Z","updated_at":"2020-01-30T19:03:52.000Z","dependencies_parsed_at":"2023-01-13T19:35:41.552Z","dependency_job_id":null,"html_url":"https://github.com/wilsson/kebot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsson%2Fkebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsson%2Fkebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsson%2Fkebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsson%2Fkebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilsson","download_url":"https://codeload.github.com/wilsson/kebot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248630961,"owners_count":21136547,"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":["automation","cli","tasks","tool"],"created_at":"2024-10-15T03:22:41.154Z","updated_at":"2025-04-13T23:16:37.392Z","avatar_url":"https://github.com/wilsson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/kebot.svg)](https://badge.fury.io/js/kebot)\n[![Build Status](https://travis-ci.org/wilsson/kebot.svg?branch=master)](https://travis-ci.org/wilsson/kebot)\n[![Coverage Status](https://coveralls.io/repos/github/wilsson/kebot/badge.svg?branch=master)](https://coveralls.io/github/wilsson/kebot?branch=master)\n\n## What is kebot?\n\nKebot is a tool that will help you manage your development scripts as well as locally installed CLI.\n\n## Documentation\n\nFor an introduction to our API and more read our [wiki](https://github.com/wilsson/kebot/wiki)!\n\n### kebot API\n\n#### kebot.task(options)\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias:\"script\",\n  entry:\"./task/script.js\"\n});\n```\n#### options\n\nType: `Object`\n\n##### options.alias\n\nType: `String`\n\n`alias` Name of the task to use by the CLI.\n\n##### options.entry\n\nType: `String`\n\n`alias` The path of your node script.\n\n##### options.command\n\nType: `String`\n\n`command` Run any installed CLI\n\n##### options.sequential\n\nType: `Array`\n\n`sequential` When you have `option.entry` task dependencies, are executed sequentially and at the end the main task is executed.\n\nWhen you not have `option.entry` they are only tasks that are executed sequentially.\n\n##### options.parallel\n\nType: `Array`\n\n`parallel` Tasks that run in sequence without dependency.\n\n##### options.local\n\ntype: `Boolean`\n`local` In `true` : Run a CLI from a locally installed package, just like npm scripts when to use command input. Default `false`\n\n\n\n#### Use cases\n\n- Run any installed CLI, using the `command` property.\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"list\",\n  command: \"ls -l\"\n});\n```\n\n```bash\nkb list\n```\n\n - Run any globally installed CLI with npm, using the `command` property.\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"build\",\n  command: \"babel -w ./source/ -d ./lib/\"\n});\n```\n\nIf you have it installed locally in your project use `local` in `true`, like npm scripts, using the `command` property.\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"build\",\n  command: \"babel -w ./source/ -d ./lib/\",\n  local: true\n});\n```\n\n```bash\nkb build\n```\n\n- Run a file `script.js`, using the `entry`\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"task\",\n  entry: \"./task/script.js\"\n});\n```\n\n```bash\nkb task\n```\n\n- To run a `script.js` file with dependent tasks, using the `sequential` property.\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"css\",\n  entry: \"./task/css.js\",\n  sequential: [\"fonts\", \"svg\"]\n});\n\nkebot.task({\n  alias: \"css\",\n  entry: \"./task/fonts.js\"\n});\n\nkebot.task({\n  alias: \"css\",\n  entry: \"./task/svg.js\"\n});\n```\n\nUse the `-a` flag to execute dependencies.\nThe order of execution is.\n\n- fonts\n- svg\n- css\n\n```bash\nkb css -a\n```\n\n- Execute any `command` or `entry` in parallel, using the `parallel` property.\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"watch\",\n  entry: \"./task/watch.js\"\n});\n\nkebot.task({\n  alias: \"css\",\n  entry: \"./task/css.js\"\n});\n\nkebot.task({\n  alias: \"all\",\n  parallel: [\"watch\", \"css\"]\n});\n```\n\n```bash\nkb all\n```\n\n- Run a task with an environment, use the flag `--env`\n\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"css\",\n  entry: \"./task/css.js\"\n});\n```\n\n#### Accept multiples arguments\n- arguments passed by cli are received through `process.env`\n\ncommand:\n```bash\n  kb mytask --param 1 --paramtwo valuetwo\n```\n\nkebotfile:\n```js\nvar kebot = require(\"kebot\");\n\nkebot.task({\n  alias: \"css\",\n  entry: \"./task/args.js\"\n});\n```\n\ntask args.js:\n```js\nconsole.log('my task args');\nconsole.log(process.env.param); // = 1\nconsole.log(process.env.paramtwo) // = valuetwo\n```\n\nUse it in your script with `process.env.production` which is equal to `true`\n\n```bash\nkb css --env production\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsson%2Fkebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilsson%2Fkebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsson%2Fkebot/lists"}