{"id":15871008,"url":"https://github.com/sgreben/0sh","last_synced_at":"2025-08-09T09:05:28.195Z","repository":{"id":80988900,"uuid":"166569830","full_name":"sgreben/0sh","owner":"sgreben","description":"very simple (sub-POSIX) shell for scripting. single binary, no dependencies. osx, linux, windows. #golang","archived":false,"fork":false,"pushed_at":"2019-01-21T08:28:39.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T04:54:08.594Z","etag":null,"topics":["posix","shell","sub","tiny"],"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/sgreben.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-19T16:46:47.000Z","updated_at":"2024-09-14T19:58:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9836f77e-ce7d-47e5-be9f-0b3ae71bfa38","html_url":"https://github.com/sgreben/0sh","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"664e88238c4d122347d54b434ce98470e3b94cc4"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2F0sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2F0sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2F0sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2F0sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgreben","download_url":"https://codeload.github.com/sgreben/0sh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801680,"owners_count":20350108,"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":["posix","shell","sub","tiny"],"created_at":"2024-10-06T00:41:21.358Z","updated_at":"2025-03-16T04:30:28.842Z","avatar_url":"https://github.com/sgreben.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 0sh\n\nVery simple (sub-POSIX) shell for scripting.\n\n## Contents\n\n- [Contents](#contents)\n- [Features](#features)\n  - [Example](#example)\n- [Get it](#get-it)\n  - [Using `go get`](#using-go-get)\n  - [Pre-built binary](#pre-built-binary)\n- [Use it](#use-it)\n\n## Features\n\n- `$ENV` variables (read usage only, no assignment)\n- double-quoted strings (expansion, escapes) and single-quoted strings (neither)\n- built-ins: `cd` and `exit`\n- no branching of any kind (conditionals or loops)\n- no pipes (_NOTE_: this might change)\n- `-e` (errexit) and `-u` (noundef) enabled by default\n\n### Example\n\n```sh\n#!/usr/bin/env 0sh\necho \"$ABC\" '$ABC' # a comment\nexit 1\n```\n\n## Get it\n\n### Using `go get`\n\n```sh\ngo get -u github.com/sgreben/0sh\n```\n\n### Pre-built binary\n\nOr [download a binary](https://github.com/sgreben/0sh/releases/latest) from the releases page, or from the shell:\n\n```sh\n# Linux\ncurl -L https://github.com/sgreben/0sh/releases/download/0.0.2/0sh_0.0.2_linux_x86_64.tar.gz | tar xz\n\n# OS X\ncurl -L https://github.com/sgreben/0sh/releases/download/0.0.2/0sh_0.0.2_osx_x86_64.tar.gz | tar xz\n\n# Windows\ncurl -LO https://github.com/sgreben/0sh/releases/download/0.0.2/0sh_0.0.2_windows_x86_64.zip\nunzip 0sh_0.0.2_windows_x86_64.zip\n```\n\n## Use it\n\n```text\n0sh [OPTIONS]\n```\n\n```text\nUsage of 0sh:\n  -c string\n    \trun only the given COMMAND\n  -e\texit on error (default true)\n  -n\tdry-run\n  -u\terror on undefined (default true)\n  -v\tverbose\n  -version\n    \tprint version and exit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgreben%2F0sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgreben%2F0sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgreben%2F0sh/lists"}