{"id":21971305,"url":"https://github.com/iamakulov/echo-cli","last_synced_at":"2025-04-28T11:46:23.743Z","repository":{"id":46568027,"uuid":"56384906","full_name":"iamakulov/echo-cli","owner":"iamakulov","description":"A cross-platform CLI for outputting text to terminal. Supports escape sequences","archived":false,"fork":false,"pushed_at":"2021-12-01T23:32:39.000Z","size":13217,"stargazers_count":6,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T10:05:32.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/iamakulov.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":"2016-04-16T13:26:29.000Z","updated_at":"2022-04-20T08:51:45.000Z","dependencies_parsed_at":"2022-09-04T11:42:27.367Z","dependency_job_id":null,"html_url":"https://github.com/iamakulov/echo-cli","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamakulov%2Fecho-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamakulov%2Fecho-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamakulov%2Fecho-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamakulov%2Fecho-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamakulov","download_url":"https://codeload.github.com/iamakulov/echo-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251309180,"owners_count":21568763,"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":[],"created_at":"2024-11-29T14:50:01.155Z","updated_at":"2025-04-28T11:46:23.722Z","avatar_url":"https://github.com/iamakulov.png","language":"JavaScript","funding_links":[],"categories":["Cross-platform Utilities"],"sub_categories":[],"readme":"# echo-cli\n\n[![npm](https://img.shields.io/npm/v/echo-cli.svg?maxAge=2592000\u0026style=flat-square\u0026reset-cache-2)](https://www.npmjs.com/package/echo-cli) [![Travis](https://img.shields.io/travis/iamakulov/echo-cli.svg?maxAge=2592000\u0026style=flat-square\u0026reset-cache-2)](https://travis-ci.org/iamakulov/echo-cli) [![Coveralls](https://img.shields.io/coveralls/iamakulov/echo-cli.svg?maxAge=2592000\u0026style=flat-square\u0026reset-cache-2)](https://coveralls.io/github/iamakulov/echo-cli)\n\n\u003e A cross-platform CLI for outputting text to the command line (with escape sequences)\n\nWhy? Because Windows’ CMD doesn’t support escape sequences, and even [a new line is printed differently from Bash](http://stackoverflow.com/a/132804/1192426). This makes outputting something from npm scripts much more challenging.\n\n## Install\n\nTo use in your package:\n\n```\nnpm install --save-dev echo-cli\n```\n\nTo use from the command line:\n\n```\nnpm install --global echo-cli\n```\n\n## Usage\n\n`echo-cli` supports all JavaScript escape sequences described [on the according MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Using_special_characters_in_strings). Feel free to open an issue if you need the Bash escape sequences too.\n\nWhen passing an escape sequence, wrap the passed text into quotes to prevent Bash from interpreting the sequence on its own.\n\n```js\n// In package.json\n{\n    \"scripts\": {\n        \"build\": \"echo-cli Building the project... \u0026\u0026 babel src -d dist\",\n        \"test\": \"echo-cli 'Running the tests...\\\\nThis usually takes a couple of minutes.' \u0026\u0026 ava\",\n    }\n}\n\n// Or in Webpack config\n{\n    plugins: [\n        new WebpackShellPlugin({\n            onBuildEnd: ['copyfiles dist ../archive/dist \u0026\u0026 echo-cli \"\\\\nCopied the build results\"']\n        })\n    ]\n}\n```\n\n```sh\n# Or in a shell\n$ echo-cli \"Hello,\\nworld!\"\nHello,\nworld\n```\n\n\n## License\n\nMIT © [Ivan Akulov](http://iamakulov.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamakulov%2Fecho-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamakulov%2Fecho-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamakulov%2Fecho-cli/lists"}