{"id":13602870,"url":"https://github.com/fentas/argsh","last_synced_at":"2025-04-11T13:31:34.466Z","repository":{"id":57183582,"uuid":"183746555","full_name":"fentas/argsh","owner":"fentas","description":":shell: Argument parsing for all interpreter languages.","archived":true,"fork":false,"pushed_at":"2024-03-18T13:49:47.000Z","size":32,"stargazers_count":10,"open_issues_count":16,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-31T21:08:30.999Z","etag":null,"topics":["argument-parser","arguments","bash","cli","interpreted-programming-language","shell"],"latest_commit_sha":null,"homepage":"https://arg.sh","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/fentas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-27T08:14:28.000Z","updated_at":"2024-03-18T13:50:06.000Z","dependencies_parsed_at":"2022-08-23T01:30:24.249Z","dependency_job_id":null,"html_url":"https://github.com/fentas/argsh","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/fentas%2Fargsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fentas%2Fargsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fentas%2Fargsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fentas%2Fargsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fentas","download_url":"https://codeload.github.com/fentas/argsh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223470294,"owners_count":17150526,"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":["argument-parser","arguments","bash","cli","interpreted-programming-language","shell"],"created_at":"2024-08-01T18:01:41.156Z","updated_at":"2024-11-07T06:30:30.101Z","avatar_url":"https://github.com/fentas.png","language":"Shell","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"🗃️ archived for https://github.com/arg-sh/argsh\n\n---\n\n# argsh\n[![Latest release](https://img.shields.io/github/release/fentas/argsh.svg)](https://github.com/fentas/argsh/releases/latest)\n[![npm package](https://img.shields.io/npm/v/argsh.svg)](https://www.npmjs.com/package/argsh)\n[![License](https://img.shields.io/github/license/fentas/argsh.svg)](https://github.com/fentas/argsh/blob/master/LICENSE)\n[![Continuous integration status for Linux and macOS](https://img.shields.io/travis/fentas/argsh/master.svg?label=travis%20build)](https://travis-ci.org/fentas/argsh)\n\nCreate simple and short shell (bash) scripts with ease. `argsh` takes away the\ntedious work to create your own argument parser and keeps your shell usage at bay.\n\n## Install argsh\n* to be able to use argsh scripts on your system, it makes sense to install it globally\n```sh\n# manually\ngit clone https://github.com/fentas/argsh.git\ncd argsh/bin\nsuod ln -sf argsh /usr/local/bin\n```\n\n## Quick start\n* Describe your arguments and `argsh` does the rest.\n\n### script template\n```sh\ntouch \u003cyour-script-name\u003e\nsudo chmod +x \u003cyour-script-name\u003e\n```\n\n### create argsh script from template\n```sh\n#!/usr/bin/env argsh\nset -eu -o pipefail\n\n# OPTIONS\n# argsh(t|test-option): env(TEST_OPTION) def(false) des(A test option.) val()\n\n# ACTIONS\n\n# PATHS\n\n# VARIABLES\n\n# IMPORTS\n\n# MAIN\nmain() {\n  # dependencies\n\n  # actions\n  for ACTION in ${ARGSH_ACTIONS}; do case \"${ACTION}\" in\n    T|test-action)  test_action ;;\n  esac; done\n}\n\n# FUNCTIONS\ntest_action() {\n  echo \"$TEST_OPTION\"\n}\n\n# VALIDATORS\n\n# RUN\n[[ \"${0}\" != \"${BASH_SOURCE[0]}\" ]] || main \"${@}\"\n```\n\n## Include `argsh` into your tests\n\nFollow up.\n\n## Honorable Mentions\n\nFolder structure is right out copied from https://github.com/bats-core/bats-core. Also is bats used for testing. Big thanks for that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffentas%2Fargsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffentas%2Fargsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffentas%2Fargsh/lists"}