{"id":14982057,"url":"https://github.com/gulpjs/gulp-cli","last_synced_at":"2025-05-14T19:06:56.818Z","repository":{"id":24652800,"uuid":"28062827","full_name":"gulpjs/gulp-cli","owner":"gulpjs","description":"Command Line Interface for gulp.","archived":false,"fork":false,"pushed_at":"2024-03-24T20:09:05.000Z","size":365,"stargazers_count":407,"open_issues_count":24,"forks_count":110,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-10T02:21:47.473Z","etag":null,"topics":["cli","command-line","gulp","javascript"],"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/gulpjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["gulpjs","phated","yocontra"],"tidelift":"npm/gulp","open_collective":"gulpjs"}},"created_at":"2014-12-16T00:25:41.000Z","updated_at":"2025-04-08T15:37:48.000Z","dependencies_parsed_at":"2023-11-23T06:38:17.075Z","dependency_job_id":"dd2d3eff-0429-4527-ae7c-7e7e258347cd","html_url":"https://github.com/gulpjs/gulp-cli","commit_stats":{"total_commits":179,"total_committers":37,"mean_commits":4.837837837837838,"dds":"0.45251396648044695","last_synced_commit":"e422eb17a6c2dc84f61ec7a116725aa58445da57"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Fgulp-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gulpjs","download_url":"https://codeload.github.com/gulpjs/gulp-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710372,"owners_count":21149185,"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":["cli","command-line","gulp","javascript"],"created_at":"2024-09-24T14:04:42.490Z","updated_at":"2025-04-13T11:45:16.585Z","avatar_url":"https://github.com/gulpjs.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gulpjs.com\"\u003e\n    \u003cimg height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# gulp-cli\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nCommand Line Utility for Gulp\n\n## Install\n\n```bash\nnpm install --global gulp-cli\n```\n\n## Usage\n\n```bash\n\u003e gulp [flags] \u003ctask\u003e \u003ctask\u003e...\n```\n\n## Custom Metadata\n\nWhen listing tasks with the `gulp -T` command, gulp-cli displays some custom metadata as defined upon task functions. Currently supported properties:\n\n* `task.description` - String of the description to display.\n\n```js\nfunction clean() { ... }\nclean.description = 'Cleans up generated files.';\n```\n\n* `task.flags` - Object with key/value pairs being flag/description to display.\n\n```js\nfunction build() { ... }\nbuild.flags = {\n  '--prod': 'Builds in production mode.'\n};\n```\n\nExample Usage:\n\n```js\nfunction build() { ... }\nbuild.description = 'Build entire project.';\nbuild.flags = {\n  '--prod': 'Builds in production mode (minification, etc).'\n};\n// gulp 3.x\ngulp.task('build', build);\n// gulp 4.x\ngulp.task(build);\n```\n\n## Tasks\n\nThe task(s) listed on the command line will be executed.\nIf more than one task is listed, Gulp will execute all of them\nconcurrently, that is, as if they had all been listed as dependencies of\na single task.\n\nBy default, Gulp does not serialize tasks listed on the command line. If you would like to execute tasks serially, you must specify the `--series` flag. e.g. `gulp clean build --series`\n\nJust running `gulp` will execute the task `default`. If there is no\n`default` task, gulp will error.\n\n## Completion\n\u003e Thanks to the grunt team, specifically Tyler Kellen\n\nTo enable tasks auto-completion in shell you should add `eval \"$(gulp --completion=shell)\"` in your `.shellrc` file.\n\n###### Bash:\n\nAdd `eval \"$(gulp --completion=bash)\"` to `~/.bashrc`.\n\n###### Zsh:\n\nAdd `eval \"$(gulp --completion=zsh)\"` to `~/.zshrc`.\n\n###### Powershell:\n\nAdd `Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)` to `$PROFILE`.\n\n###### Fish:\n\nAdd `gulp --completion=fish | source` to `~/.config/fish/config.fish`.\n\n## Compilers\n\nYou can find a list of supported JavaScript variant languages in [Interpret][interpret-js-variants]. If you would like to add support for a new language, send pull requests/open issues on that project.\n\n## Environment\n\nThe CLI adds `process.env.INIT_CWD` which is the original cwd it was launched from.\n\n## Configuration\n\nConfiguration is supported through the use of a `.gulp.*` file (e.g. `.gulp.js`, `.gulp.ts`). You can find a list of supported JavaScript variant languages in [Interpret][interpret-js-variants].\n\nA configuration file from the current working directory (`cwd`) or above are selected before a configuration file from the home directory (`~`).\n\nSupported configurations properties:\n\n| Property           | Description |\n|--------------------|-------------|\n| description        | Top-level description of the project/gulpfile (Replaces \"Tasks for ~/path/of/gulpfile.js\") |\n| gulpfile           | Set a default gulpfile |\n| preload            | An array of modules to preload before running the gulpfile. Any relative paths will be resolved against the `--cwd` directory (if you don't want that behavior, use absolute paths) |\n| nodeFlags          | An array of flags used to forcibly respawn the process upon startup. For example, if you always want your gulpfiles to run in node's harmony mode, you can set `--harmony` here |\n| flags.continue     | Continue execution of tasks upon failure by default. |\n| flags.compactTasks | Reduce the output of task dependency tree by default. |\n| flags.tasksDepth   | Set default depth of task dependency tree. |\n| flags.silent       | Silence logging by default |\n| flags.series       | Run tasks given on the CLI in series (the default is parallel) |\n| message(data)      | A function used to translate messages that pass through gulp-cli. Can receive an object like `{ tag: Symbol(), ...props }` where the `tag` is a symbol from `@gulpjs/messages`. The string returned from this function will be logged. If `false` is explicitly returned, no message will be logged. |\n| timestamp(data)    | A function used to provide timestamps for gulp-cli. Can receive an object like `{ tag: Symbol(), ...props }` where the `tag` is a symbol from `@gulpjs/messages`. The string returned from this function will be output before any messages. If `false` is explicitly returned, no timestamp will be output. |\n\n## Flags\n\ngulp has very few flags to know about. All other flags are for tasks to use if needed.\n\n__Some flags only work with gulp 4 and will be ignored when invoked against gulp 3.__\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth width=\"25%\"\u003eFlag\u003c/th\u003e\n      \u003cth width=\"15%\"\u003eShort Flag\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--help\u003c/td\u003e\n      \u003ctd\u003e-h\u003c/td\u003e\n      \u003ctd\u003eShow this help.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--version\u003c/td\u003e\n      \u003ctd\u003e-v\u003c/td\u003e\n      \u003ctd\u003ePrint the global and local gulp versions.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--preload [path]\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eWill preload a module before running the gulpfile. This is useful for transpilers but also has other applications.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--gulpfile [path]\u003c/td\u003e\n      \u003ctd\u003e-f\u003c/td\u003e\n      \u003ctd\u003eManually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--cwd [path]\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eManually set the CWD. The search for the gulpfile, as well as the relativity of all preloads (with the `--preload` flag) will be from here.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--tasks\u003c/td\u003e\n      \u003ctd\u003e-T\u003c/td\u003e\n      \u003ctd\u003ePrint the task dependency tree for the loaded gulpfile.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--tasks-simple\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003ePrint a plaintext list of tasks for the loaded gulpfile.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--tasks-json [path]\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003ePrint the task dependency tree, in JSON format, for the loaded gulpfile. The [path] argument is optional, and if given writes the JSON to the path.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--tasks-depth [number]\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eSpecify the depth of the task dependency tree to print. This flag can be used with --tasks or --tasks-json. (This flag was named --depth before but is deprecated.)\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--compact-tasks\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eReduce the output of task dependency tree by printing only top tasks and their child tasks. This flag can be used with --tasks or --tasks-json.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--sort-tasks\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eWill sort top tasks of task dependency tree. This flag can be used with --tasks.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--color\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eWill force gulp and gulp plugins to display colors, even when no color support is detected.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--no-color\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eWill force gulp and gulp plugins to not display colors, even when color support is detected.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--silent\u003c/td\u003e\n      \u003ctd\u003e-S\u003c/td\u003e\n      \u003ctd\u003eSuppress all gulp logging.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--continue\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eContinue execution of tasks upon failure.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--series\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eRun tasks given on the CLI in series (the default is parallel).\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e--log-level\u003c/td\u003e\n      \u003ctd\u003e-L\u003c/td\u003e\n      \u003ctd\u003eSet the loglevel. -L for least verbose and -LLLL for most verbose. -LLL is default.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## License\n\nMIT\n\n\u003c!-- prettier-ignore-start --\u003e\n[interpret-js-variants]: https://github.com/gulpjs/interpret#jsvariants\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n[downloads-image]: https://img.shields.io/npm/dm/gulp-cli.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/gulp-cli\n[npm-image]: https://img.shields.io/npm/v/gulp-cli.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/gulp-cli/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/gulp-cli/dev.yml?branch=master\u0026style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-cli\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-cli.svg?style=flat-square\n\u003c!-- prettier-ignore-end --\u003e\n","funding_links":["https://github.com/sponsors/gulpjs","https://github.com/sponsors/phated","https://github.com/sponsors/yocontra","https://tidelift.com/funding/github/npm/gulp","https://opencollective.com/gulpjs"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Fgulp-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgulpjs%2Fgulp-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Fgulp-cli/lists"}