{"id":16440693,"url":"https://github.com/danilosampaio/runit-on-cli","last_synced_at":"2026-04-20T03:32:02.265Z","repository":{"id":48452842,"uuid":"388510533","full_name":"danilosampaio/runit-on-cli","owner":"danilosampaio","description":"Run node modules directly on CLI","archived":false,"fork":false,"pushed_at":"2021-07-25T16:30:33.000Z","size":310,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T15:55:23.118Z","etag":null,"topics":["cli","node","shell"],"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/danilosampaio.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":"2021-07-22T15:28:31.000Z","updated_at":"2021-07-25T16:31:09.000Z","dependencies_parsed_at":"2022-09-08T03:11:39.204Z","dependency_job_id":null,"html_url":"https://github.com/danilosampaio/runit-on-cli","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/danilosampaio/runit-on-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Frunit-on-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Frunit-on-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Frunit-on-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Frunit-on-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danilosampaio","download_url":"https://codeload.github.com/danilosampaio/runit-on-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Frunit-on-cli/sbom","scorecard":{"id":320842,"data":{"date":"2025-08-11","repo":{"name":"github.com/danilosampaio/runit-on-cli","commit":"619a688d2f106d40b661dfd94e9040a2e793e94d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T01:19:43.539Z","repository_id":48452842,"created_at":"2025-08-18T01:19:43.539Z","updated_at":"2025-08-18T01:19:43.539Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32031549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["cli","node","shell"],"created_at":"2024-10-11T09:12:47.192Z","updated_at":"2026-04-20T03:32:02.226Z","avatar_url":"https://github.com/danilosampaio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# runit-on-cli\n\u003e Run node modules directly on CLI\n\n[![CircleCI](https://circleci.com/gh/danilosampaio/runit-on-cli.svg?style=svg)](https://circleci.com/gh/danilosampaio/runit-on-cli)\n\n## Install\n\n```\nnpm install -g runit-on-cli\n```\n\n### API\n\n```\n$ runit-on-cli \u003cmodule-name\u003e \u003cnamed-export\u003e [-c] [-f [functionName]] [-n [version]] [-p [parameters...]] [-s] [-t [transformFunction]] [-u [subModule]]\n```\n\n- `-c, --call-module-as-function`: call the exported module as a function intead of object\n- `-f, --function-name [functionName]`: call a specific function from exported module\n- `-n, --npm-module-version [version]`: run a specific version of the npm module\n- `-p, --params [parameters...]`: list of params that will be passed to the module/function call\n- `-s, --silent`: print only the module output, without progress or logs\n- `-t, --transform-output [transformFunction]`: define a function to modify module/function return\n- `-u, --sub-module [subModule]`: import a submodule, such as 'crypto-js/sha256'\n\n## Examples\n\n__Running a module with default export, passing one string parameter:__\n\n```sh\n$ runit-on-cli jwt-decode -p \\\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\\\"\n```\n\n![Image](assets/example1.png)\n\n*The above example using silent mode (-s option) will output only the return content:*\n\n```js\n{ sub: '1234567890', name: 'John Doe', iat: 1516239022 }\n```\n\n__Running a module with a named export, passing two parameters, an object and an array:__\n\n```sh\n$ runit-on-cli -s lodash orderBy -p '[{name:\"banana\"},{name:\"apple\"}]' '[\"name\"]'\n```\n```js\n[ { name: 'apple' }, { name: 'banana' } ]\n```\n\n__Passing a parameter from a file content:__\n\n```sh\n$ runit-on-cli -s lodash orderBy -p \"$(cat ./users.json)\" '[\"first\"]'\n```\n```js\n[\n  { first: 'ane', last: 'mcfly' },\n  { first: 'john', last: 'mayer' },\n  { first: 'mary', last: 'jane' }\n]\n```\n\n__A more complex example using lodash map:__\n\n```sh\n$ runit-on-cli -s lodash map -p \"$(cat ./users.json)\" 'e =\u003e {e.full = e.first + \" \" + e.last; return e;}'\n```\n```js\n[\n  { first: 'mary', last: 'jane', full: 'mary jane' },\n  { first: 'john', last: 'mayer', full: 'john mayer' },\n  { first: 'ane', last: 'mcfly', full: 'ane mcfly' }\n]\n```\n\n__Running async functions and transform the output to return a specific property:__\n\n```sh\n$ runit-on-cli -s axios get -p \\'http://universities.hipolabs.com\\' -t 'output.data'\n```\n```js\n{\n    data: {\n        author: { name: 'hipo', website: 'http://hipolabs.com' },\n        github: 'https://github.com/Hipo/university-domains-list',\n        example: 'http://universities.hipolabs.com/search?name=middle\u0026country=Turkey'\n    }\n}\n```\n\n__A more complex example of using -t option:__\n\n```sh\n$ runit-on-cli -s moment -t 'moment().add(7, \"days\").format(\"YYYY/MM/DD\")'\n```\n```\n2021/08/01\n```\n*Using the `-t` option is possible to use the node environment, actually.*\n\n\n__Using the node environment by -t option:__\n\n```sh\n$ runit-on-cli -s axios get -p \\'http://universities.hipolabs.com\\' -t 'Object.keys(output.data)'\n```\n```js\n[ 'author', 'github', 'example' ]\n```\n\n\n__Call a specific function from exported module:__\n\n```sh\n$ runit-on-cli chalk -f blue -p \\\"Hello World\\\"\n```\n\n![Image](assets/example2.png)\n\n*The same result is got by using `-t` option: `runit-on-cli chalk -p \\\"Hello World\\\" -t 'chalk.blue(output)'`*\n\n\n__Another example of calling a specific function from exported module:__\n\n```sh\n$ runit-on-cli -s faker -f phone.phoneNumber\n```\n```\n550-681-2495\n```\n\n__Running a module with a named export, without parameters:__\n\n```sh\n$ runit-on-cli -s uuid v4\n```\n```sh\n2a7bb8f8-ac20-46ea-a0eb-ea58df26d48e\n```\n\n__Running the exported module as a function intead of object, and call a specific function:__\n\n```sh\n$ runit-on-cli moment -c -f add -p 7 \\'days\\'\n```\n\n![Image](assets/example3.png)\n\n*The `-c` options is necessary for this case because `moment` export is a function: `moment().add(7,'days')`*\n\n__Running a submodule:__\n\n```sh\n$ runit-on-cli crypto-js -u sha256 -p \\'test\\'\n```\n\n![Image](assets/example4.png)\n\n\n## License\n\nMIT © [Danilo Sampaio](http://github.org/danilosampaio)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanilosampaio%2Frunit-on-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanilosampaio%2Frunit-on-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanilosampaio%2Frunit-on-cli/lists"}