{"id":14982916,"url":"https://github.com/abbotto/shell-api","last_synced_at":"2025-04-13T21:40:35.307Z","repository":{"id":57358225,"uuid":"141330140","full_name":"abbotto/shell-api","owner":"abbotto","description":"A POSIX-compatible shell utility library.","archived":false,"fork":false,"pushed_at":"2021-10-22T18:41:28.000Z","size":391,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T12:01:42.478Z","etag":null,"topics":["api","ash","bash","dash","ksh","mksh","posix","script","shell","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/abbotto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-17T18:47:33.000Z","updated_at":"2025-01-03T01:06:34.000Z","dependencies_parsed_at":"2022-09-06T21:41:13.894Z","dependency_job_id":null,"html_url":"https://github.com/abbotto/shell-api","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbotto%2Fshell-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbotto%2Fshell-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbotto%2Fshell-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbotto%2Fshell-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abbotto","download_url":"https://codeload.github.com/abbotto/shell-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788859,"owners_count":21161726,"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":["api","ash","bash","dash","ksh","mksh","posix","script","shell","zsh"],"created_at":"2024-09-24T14:06:24.707Z","updated_at":"2025-04-13T21:40:35.268Z","avatar_url":"https://github.com/abbotto.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shell-api\n\n[![Build Status](https://travis-ci.org/abbotto/shell-api.svg?branch=master)](https://travis-ci.org/abbotto/shell-api)\n[![NPM version](https://badge.fury.io/js/shell-api.svg)](http://badge.fury.io/js/shell-api)\n[![GitHub version](https://badge.fury.io/gh/abbotto%2Fshell-api.svg)](https://badge.fury.io/gh/abbotto%2Fshell-api)\n\n## Overview\n\nA robust set of [POSIX-compliant](http://pubs.opengroup.org/onlinepubs/9699919799/) scripts for shell environments.\n\n### Shell support\n\nThe goal is to provide a simple API that is compatible with Bourne-like shells on *nix systems.\n\nAll functions have been tested in `bash`, `dash`, `fish`, `ksh`, and `zsh`.\n\n### The API\n- [confirm](doc/api.md#confirm)\n- [export-file](doc/api.md#export-file)\n- [join-file](doc/api.md#join-file)\n- [log-level](doc/api.md#log-level)\n- [pipe-file](doc/api.md#pipe-file)\n- [print-text](doc/api.md#print-text)\n- [read-file](doc/api.md#read-file)\n- [require](doc/api.md#require)\n- [substring](doc/api.md#substring)\n- [start-daemon](doc/api.md#start-daemon)\n- [stop-daemon](doc/api.md#stop-daemon)\n- [strict-mode](doc/api.md#strict-mode)\n- [terminate](doc/api.md#terminate)\n- [watch-daemon](doc/api.md#watch-daemon)\n- [write-file](doc/api.md#write-file)\n\n---\n\n## Getting started\n\n### Install\n\n- Install this project via `npm`.\n\n      npm i shell-api --save\n\n### Usage\n\n**Method A**\n\n    #!/usr/bin/env sh\n\n    SHELL_API_PATH=\"/path/to/shell-api/shell\"\n\n    export SHELL_API_PATH\n\n    # Load all the scripts at once\n    . \"${SHELL_API_PATH}\"/shell-api\n\n    export-file ./.env\n    require \u003cSCRIPT\u003e\n\n    ...\n\n**Method B**\n\n    #!/usr/bin/env sh\n\n    SHELL_API_PATH=\"/path/to/shell-api/shell\"\n\n    export SHELL_API_PATH\n\n    # Selectively load scripts\n    . \"${SHELL_API_PATH}\"/strict-mode\n    . \"${SHELL_API_PATH}\"/export-file\n    . \"${SHELL_API_PATH}\"/require\n\n    export-file ./.env\n    require \u003cSCRIPT\u003e\n\n    ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbotto%2Fshell-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbotto%2Fshell-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbotto%2Fshell-api/lists"}