{"id":15622185,"url":"https://github.com/alkhe/synthesizer","last_synced_at":"2025-10-13T05:11:33.026Z","repository":{"id":65513546,"uuid":"80491839","full_name":"alkhe/synthesizer","owner":"alkhe","description":"Lightweight, practical task runner.","archived":false,"fork":false,"pushed_at":"2017-02-01T01:15:40.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T01:25:58.562Z","etag":null,"topics":["build-automation","deployments","task","tool"],"latest_commit_sha":null,"homepage":"","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/alkhe.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}},"created_at":"2017-01-31T04:44:08.000Z","updated_at":"2020-05-02T04:55:20.000Z","dependencies_parsed_at":"2023-01-26T20:45:14.660Z","dependency_job_id":null,"html_url":"https://github.com/alkhe/synthesizer","commit_stats":null,"previous_names":["edge/synthesizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alkhe/synthesizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkhe%2Fsynthesizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkhe%2Fsynthesizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkhe%2Fsynthesizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkhe%2Fsynthesizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alkhe","download_url":"https://codeload.github.com/alkhe/synthesizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkhe%2Fsynthesizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013696,"owners_count":26085390,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["build-automation","deployments","task","tool"],"created_at":"2024-10-03T09:53:10.675Z","updated_at":"2025-10-13T05:11:33.000Z","avatar_url":"https://github.com/alkhe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# synthesizer\n\nA lightweight, practical task runner. Great for build systems, testing, and deployments!\n\n`synthesizer` has the speed of a Makefile and the power of Gulp.\n\n## Install\n\nInstall `synthesizer` globally:\n```sh\n# yarn global add synthesizer\n```\n\nAdd `synthesizer` to your project:\n```sh\n$ yarn add synthesizer\n```\n\n## Getting Started\n\nAfter `synthesizer` has been installed globally and in your project, add a synfile (`syn.js`) to your project:  \n**`syn.js`**\n```js\nconst { register } = require('synthesizer')\n\nregister('hello', () =\u003e {\n\tconsole.log('hello, world!')\n})\n```\n\nNow you can run the `hello` task by typing: (note: try using autocomplete!)\n```sh\n$ syn hello\n  {#syn} starting in ~/Documents/projects/use-syn\n  {#syn} using ~/Documents/projects/use-syn/syn.js\n  {:hello} init\n  hello, world!\n  {:hello} done\n  {#syn} ok\n```\n\n\nYou can also run multiple tasks in a single command. Not only is this good for batching work, it is a useful way to configure your tasks!\n\n```js\nlet env = 'prod'\n\nregister('dev', () =\u003e {\n\tenv = 'dev'\n})\n\nregister('start', () =\u003e {\n\tconsole.log('running in', env, 'mode')\n})\n```\n\n```sh\n$ syn start\n  ...\n  running in prod mode\n  ...\n$ syn dev start\n  ...\n  running in dev mode\n  ...\n```\n\n## API\n\n### `register(name : string, ...tasks : function | string)`\n`register` will add a new task that is identified by `name`. When run, the `register`ed task will sequentially run each of its component tasks. In addition to providing functions, other `register`ed tasks can also be sourced. This is great for composing tasks and building workflows.\n\n```js\nregister('a', 'x', some_function, 'y', 'z')\n```\n\nRunning `syn a` will execute `'x'`, `some_function`, `'y'`, and `'z'` in order.\n\n### `run(name : string, ?args : [string], ?options : {})`\n`run` is based off of [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), providing some convenient defaults and error handling.\n\n```js\nregister('shello', () =\u003e {\n\trun('echo', ['hello, world!'])\n})\n```\n\n```sh\n$ syn shello\n  ...\n  hello, world!\n  ...\n```\n\n### `shell(command : string, ?options : {})`\n`shell` is based off of [`child_process.execSync`](https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options). Use this instead of `run` if you have a command string and want to spawn it in a subshell.\n\n```js\nregister('shello', () =\u003e {\n\tshell('echo \\'hello, world!\\'')\n})\n```\n\n```sh\n$ syn shello\n  ...\n  hello, world!\n  ...\n```\n\n\n### `ask(?prompt : string, ?options : {}) : string`\n`ask` provides a simple readline interface for input. You can optionally provide a prompt, and [options](https://github.com/anseki/readline-sync#basic_options) to `readline-sync.prompt`.\n\n```js\nregister('login', () =\u003e {\n\tconst username = ask('user: ')\n\tconst password = ask('pass: ', { hideEchoBack: true, mask: '' })\n\n\trun('echo', [`do something with ${ username }:${ password }`])\n})\n```\n\n```sh\n$ syn login\n  ...\n  user: your_manager\n  pass: \n  do something with your_manager:Password1\n  ...\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkhe%2Fsynthesizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falkhe%2Fsynthesizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkhe%2Fsynthesizer/lists"}