{"id":16712938,"url":"https://github.com/gabrielcsapo/shell-p","last_synced_at":"2026-04-28T20:01:53.068Z","repository":{"id":70619900,"uuid":"92137289","full_name":"gabrielcsapo/shell-p","owner":"gabrielcsapo","description":"🐚 Introspect on the most time consuming part of your shell script","archived":false,"fork":false,"pushed_at":"2017-10-20T02:52:46.000Z","size":16,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T23:41:23.290Z","etag":null,"topics":["parser","runner","shell-script","utility"],"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/gabrielcsapo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2017-05-23T06:26:25.000Z","updated_at":"2023-01-17T20:18:44.000Z","dependencies_parsed_at":"2023-06-02T05:00:29.895Z","dependency_job_id":null,"html_url":"https://github.com/gabrielcsapo/shell-p","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielcsapo%2Fshell-p","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielcsapo%2Fshell-p/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielcsapo%2Fshell-p/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielcsapo%2Fshell-p/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielcsapo","download_url":"https://codeload.github.com/gabrielcsapo/shell-p/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289398,"owners_count":20914464,"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":["parser","runner","shell-script","utility"],"created_at":"2024-10-12T20:44:47.199Z","updated_at":"2026-04-28T20:01:48.048Z","avatar_url":"https://github.com/gabrielcsapo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shell-p\n\n\u003e 🐚 Introspect on the most time consuming part of your shell script\n\n[![Npm Version](https://img.shields.io/npm/v/shell-p.svg)](https://www.npmjs.com/package/shell-p)\n[![Build Status](https://travis-ci.org/gabrielcsapo/shell-p.svg?branch=master)](https://travis-ci.org/gabrielcsapo/shell-p)\n[![Dependency Status](https://starbuck.gabrielcsapo.com/badge/github/gabrielcsapo/shell-p/status.svg)](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/shell-p)\n[![devDependency Status](https://starbuck.gabrielcsapo.com/badge/github/gabrielcsapo/shell-p/dev-status.svg)](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/shell-p#info=devDependencies)\n[![Coverage Status](https://lcov-server.gabrielcsapo.com/badge/github%2Ecom/gabrielcsapo/shell-p.svg)](https://lcov-server.gabrielcsapo.com/coverage/github%2Ecom/gabrielcsapo/shell-p)\n[![npm](https://img.shields.io/npm/dt/shell-p.svg?maxAge=2592000)]()\n[![npm](https://img.shields.io/npm/dm/shell-p.svg?maxAge=2592000)]()\n\n# What is this?\n\n```javascript\nconst shell = require('./index');\nconst path = require('path');\n\nshell(path.resolve(__dirname, './test.sh'))\n  .then((res) =\u003e {\n    console.log(res);\n  })\n  .catch((err) =\u003e {\n    console.log(err);\n  });\n```\n\n### output\n\n```json\n[\n    {\n        \"started\": 1505969831167,\n        \"ended\": 1505969831167,\n        \"stdout\": \"\",\n        \"stderr\": \"\",\n        \"command\": \"HELLO=WORLD\",\n        \"duration\": 0\n    },\n    {\n        \"started\": 1505969831167,\n        \"ended\": 1505969831168,\n        \"stdout\": \"hello world\\n\",\n        \"stderr\": \"\",\n        \"command\": \"echo hello world\",\n        \"duration\": 1\n    },\n    {\n        \"started\": 1505969831168,\n        \"ended\": 1505969831174,\n        \"stdout\": \"total 64\\ndrwxr-xr-x   16 gabrielcsapo  staff   512 Sep 20 21:56 .\\ndrwx------@  58 gabrielcsapo  staff  1856 Sep 19 18:24 ..\\n-rw-r--r--    1 gabrielcsapo  staff    34 May 26 21:55 .eslintignore\\n-rw-r--r--    1 gabrielcsapo  staff    88 May 26 21:55 .eslintrc\\ndrwxr-xr-x   16 gabrielcsapo  staff   512 Sep 20 21:57 .git\\n-rw-r--r--    1 gabrielcsapo  staff    58 May 26 21:55 .gitignore\\ndrwxr-xr-x    4 gabrielcsapo  staff   128 Jun 10 13:28 .nyc_output\\n-rw-r--r--    1 gabrielcsapo  staff   264 Sep 18 21:36 .travis.yml\\n-rw-r--r--    1 gabrielcsapo  staff    85 Jun 15 23:22 CHANGELOG.md\\n-rw-r--r--    1 gabrielcsapo  staff  3524 Sep 18 21:36 README.md\\ndrwxr-xr-x    4 gabrielcsapo  staff   128 Jun 10 13:28 coverage\\n-rw-r--r--    1 gabrielcsapo  staff  2242 Sep 20 21:56 index.js\\ndrwxr-xr-x    3 gabrielcsapo  staff    96 Jun 15 23:22 lib\\ndrwxr-xr-x  272 gabrielcsapo  staff  8704 Sep 20 21:47 node_modules\\n-rw-r--r--    1 gabrielcsapo  staff   530 Sep 20 21:47 package.json\\ndrwxr-xr-x    4 gabrielcsapo  staff   128 Jun 15 23:22 test\\n\",\n        \"stderr\": \"\",\n        \"command\": \"ls -la\",\n        \"duration\": 6\n    },\n    {\n        \"started\": 1505969831175,\n        \"ended\": 1505969831176,\n        \"stdout\": \"hello again world\\nanother hello!\\n\",\n        \"stderr\": \"\",\n        \"command\": \"if  [ 1 ]\\nthen\\n echo hello again world\\n echo another hello!\\nelse\\n echo nope\\nfi\",\n        \"duration\": 1\n    },\n    {\n        \"started\": 1505969831176,\n        \"ended\": 1505969831176,\n        \"stdout\": \"WORLD\\n\",\n        \"stderr\": \"\",\n        \"command\": \"echo \\\"$HELLO\\\"\",\n        \"duration\": 0\n    },\n    {\n        \"started\": 1505969831176,\n        \"ended\": 1505969831177,\n        \"stdout\": \"\",\n        \"stderr\": \"bash: line 12: noop: command not found\\n\",\n        \"command\": \"noop\",\n        \"duration\": 1\n    }\n]\n```\n\n## Known Bugs\n\n- Does not work with shell functions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielcsapo%2Fshell-p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielcsapo%2Fshell-p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielcsapo%2Fshell-p/lists"}