{"id":22222498,"url":"https://github.com/5nord/shini","last_synced_at":"2025-10-13T07:30:17.998Z","repository":{"id":231452233,"uuid":"133809026","full_name":"5nord/shini","owner":"5nord","description":"Command-line TOML processor","archived":false,"fork":false,"pushed_at":"2020-10-10T07:07:43.000Z","size":4,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-05T00:53:16.402Z","etag":null,"topics":["bash","cli","command-line-tool","ini","parser","shell","toml"],"latest_commit_sha":null,"homepage":null,"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/5nord.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}},"created_at":"2018-05-17T12:17:37.000Z","updated_at":"2024-04-05T22:50:15.000Z","dependencies_parsed_at":"2024-04-04T03:56:15.850Z","dependency_job_id":null,"html_url":"https://github.com/5nord/shini","commit_stats":null,"previous_names":["5nord/shini"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/5nord/shini","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5nord%2Fshini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5nord%2Fshini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5nord%2Fshini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5nord%2Fshini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5nord","download_url":"https://codeload.github.com/5nord/shini/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5nord%2Fshini/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014119,"owners_count":26085463,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bash","cli","command-line-tool","ini","parser","shell","toml"],"created_at":"2024-12-02T23:18:29.492Z","updated_at":"2025-10-13T07:30:17.727Z","avatar_url":"https://github.com/5nord.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shini -- A minimalistic TOML processor\n\nshini is a tool for reading [TOML/INI](https://en.wikipedia.org/wiki/TOML)\nconfiguration files from command-line.\n\n**Example**\n\n```\n$ cat \u003econfig.ini \u003c\u003cEOT\n[servers.alpha]\n    ip   = \"192.168.0.5\"\n    name = \"fnord\"\n\n[servers.beta]\n    ip   = \"192.168.0.23\"\n    name = \"fnord\"\n\nEOT\n\n$ shini -f config.ini servers.alpha.ip || echo \"key not found\"\n192.168.0.5\n```\n**Usage**\n\n```\nshini [-f \u003cfile\u003e] [\u003ckeys...\u003e]\nshini [-f \u003cfile\u003e] -q \u003cquery\u003e\n\nIf '-f' is omitted, shini reads from stdin.\nIf \u003ckeys\u003e is omitted, shini dumps all keys and values.\nIf a requested key does not exist, shini prints a newline and\nreturns exit code 1.\n```\n\n## Queries\n\nshini uses the [go-toml](https://github.com/pelletier/go-toml) library\nby Thomas Pelletier and therefore also supports queries, using `-q` option.\n\nThe syntax of a query begins with a root token, followed by any number\nof sub-expressions:\n\n```\n$\n                 Root of the TOML tree.  This must always come first.\n.name\n                 Selects child of this node, where 'name' is a TOML key\n                 name.\n['name']\n                 Selects child of this node, where 'name' is a string\n                 containing a TOML key name.\n[index]\n                 Selcts child array element at 'index'.\n..expr\n                 Recursively selects all children, filtered by an a union,\n                 index, or slice expression.\n..*\n                 Recursive selection of all nodes at this point in the\n                 tree.\n.*\n                 Selects all children of the current node.\n[expr,expr]\n                 Union operator - a logical 'or' grouping of two or more\n                 sub-expressions: index, key name, or filter.\n[start:end:step]\n                 Slice operator - selects array elements from start to\n                 end-1, at the given step.  All three arguments are\n                 optional.\n```\n\n**Example**\n\n```\n$ cat config.ini | shini -q '$..[ip,name]'\n192.168.0.5\nfnord\n192.168.0.23\nfnord\n```\n\nFor more details on those queries, have a look at the\n[go-toml/query documentaion](https://godoc.org/github.com/pelletier/go-toml/query)\n\n\n## Install\n\nAssuming you have Go installed, you can install shini by using\nthe `go get` method:\n\n\tcd /tmp\n\tgo get github.com/5nord/shini\n\n\n## Wishlist\n\nThis tool was inspired by [jq](https://stedolan.github.io/jq/) and my reluctance\nto write a TOML-parser in shell-script. Although it serves its purpose, there\nare some features, which might come in handy someday:\n\n - [ ] Write support for configuration values\n - [ ] Shell-friendly formatting of array values\n - [ ] Additional output formats (JSON, CSV, ...)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5nord%2Fshini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5nord%2Fshini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5nord%2Fshini/lists"}