{"id":44464757,"url":"https://github.com/semk/argparse","last_synced_at":"2026-02-12T19:35:49.260Z","repository":{"id":57568518,"uuid":"249361432","full_name":"semk/argparse","owner":"semk","description":"Simple and elegant command line argument parser for shell scripts.","archived":false,"fork":false,"pushed_at":"2021-02-27T14:39:43.000Z","size":24,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T10:15:41.486Z","etag":null,"topics":["argparse","argument-parser","bash","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/semk.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":"2020-03-23T07:20:23.000Z","updated_at":"2021-05-03T18:22:29.000Z","dependencies_parsed_at":"2022-08-30T04:23:25.110Z","dependency_job_id":null,"html_url":"https://github.com/semk/argparse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/semk/argparse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semk%2Fargparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semk%2Fargparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semk%2Fargparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semk%2Fargparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semk","download_url":"https://codeload.github.com/semk/argparse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semk%2Fargparse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29378819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T19:05:20.189Z","status":"ssl_error","status_checked_at":"2026-02-12T19:01:44.216Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["argparse","argument-parser","bash","golang"],"created_at":"2026-02-12T19:35:48.686Z","updated_at":"2026-02-12T19:35:49.254Z","avatar_url":"https://github.com/semk.png","language":"Go","readme":"# argparse\nSimple and elegant command line argument parser for scripts that can be used as a shebang (Bash | Python | Perl etc.)\n\n## Installation\n```\ngo get github.com/semk/argparse\ncp $(go env GOPATH)/bin/argparse /usr/local/bin\n```\n\n## Usage\n```\nUsage of ./argparse:\n  -arg value\n    \tDefine custom argument to the program. Format: name::default:desc\n  -executor string\n    \tPath to the script executor (set this to shebang (#!)) (default \"/bin/bash\")\n```\n\nAnd the last arguments can be the script with the arguments to be called.\n\n### in scripts #!\n```\n#!/usr/local/bin/argparse --executor=/bin/bash --arg=name::NoNameDefined::Name\n```\n\n### direct usage\n```\nargparse --executor=/bin/bash --arg=name::NoNameDefined::Name printname.sh --name Sreejith\n```\n\nThe defined args would then be available as capitalized envirionment variables with the `ARG_\u003cOPTION_NAME\u003e` format.\n\n## Example\nThis example shows how `argparse` can be used as a `#!` in a `bash` script for commandline parsing. The following file is named `printname.sh`.\n\n```\n#!/usr/local/bin/argparse --executor=/bin/bash --arg=name::NoNameDefined::Name\n\necho \"This program prints names passed to the argument --name.\"\necho \"Name: ${ARG_NAME}\"\n```\n\n```\n$ ./printname.sh --name Sreejith\nThis program prints names passed to the argument --name.\nName: Sreejith\n```\n\n```\n$ ./printname.sh                \nThis program prints names passed to the argument --name.\nName: NoNameDefined\n```\n\n```\n$ ./printname.sh --help\nUsage of ./printname.sh:\n  -name string\n    \tName (default \"NoNameDefined\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemk%2Fargparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemk%2Fargparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemk%2Fargparse/lists"}