{"id":16406195,"url":"https://github.com/itchyny/gojo","last_synced_at":"2025-03-21T03:30:48.678Z","repository":{"id":57493458,"uuid":"175622820","full_name":"itchyny/gojo","owner":"itchyny","description":"Yet another Go implementation of jo","archived":false,"fork":false,"pushed_at":"2023-03-02T14:12:08.000Z","size":81,"stargazers_count":51,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T20:12:48.767Z","etag":null,"topics":["cli-tool","cli-utility","go","golang","json"],"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/itchyny.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-03-14T13:00:33.000Z","updated_at":"2025-01-22T09:21:53.000Z","dependencies_parsed_at":"2024-06-19T04:10:24.624Z","dependency_job_id":"6d16365e-d2bc-4571-aaa3-455104b04534","html_url":"https://github.com/itchyny/gojo","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fgojo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fgojo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fgojo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fgojo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itchyny","download_url":"https://codeload.github.com/itchyny/gojo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244733496,"owners_count":20501011,"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":["cli-tool","cli-utility","go","golang","json"],"created_at":"2024-10-11T06:08:56.059Z","updated_at":"2025-03-21T03:30:48.418Z","avatar_url":"https://github.com/itchyny.png","language":"Go","readme":"# gojo\n[![CI Status](https://github.com/itchyny/gojo/workflows/CI/badge.svg)](https://github.com/itchyny/gojo/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/itchyny/gojo)](https://goreportcard.com/report/github.com/itchyny/gojo)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/itchyny/gojo/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/itchyny/gojo/all.svg)](https://github.com/itchyny/gojo/releases)\n[![pkg.go.dev](https://pkg.go.dev/badge/github.com/itchyny/gojo)](https://pkg.go.dev/github.com/itchyny/gojo)\n\n### Yet another Go implementation of [jo](https://github.com/jpmens/jo)\nThis is an implementation of [jo command](https://github.com/jpmens/jo) written in Go language.\n\n## Usage\n```sh\n $ gojo foo=bar qux=quux\n{\"foo\":\"bar\",\"qux\":\"quux\"}\n $ gojo -p foo=bar qux=quux\n{\n  \"foo\": \"bar\",\n  \"qux\": \"quux\"\n}\n $ gojo -a foo bar baz\n[\"foo\",\"bar\",\"baz\"]\n $ seq 10 | gojo -a\n[1,2,3,4,5,6,7,8,9,10]\n $ gojo -p foo=$(gojo bar=$(gojo baz=100))\n{\n  \"foo\": {\n    \"bar\": {\n      \"baz\": 100\n    }\n  }\n}\n $ gojo -p foo[bar][baz][qux][quux]=128\n{\n  \"foo\": {\n    \"bar\": {\n      \"baz\": {\n        \"qux\": {\n          \"quux\": 128\n        }\n      }\n    }\n  }\n}\n $ gojo -p res[foo][][id]=10 res[foo][][id]=20 res[cnt]=2\n{\n  \"res\": {\n    \"foo\": [\n      {\n        \"id\": 10\n      },\n      {\n        \"id\": 20\n      }\n    ],\n    \"cnt\": 2\n  }\n}\n $ gojo -y res[foo][][id]=10 res[foo][][id]=20 res[cnt]=2\nres:\n  foo:\n    - id: 10\n    - id: 20\n  cnt: 2\n $ gojo foo=@testdata/file.txt    # read contents from file\n{\"foo\":\"a\\nb\\nc\\nd\\ne\"}\n $ gojo foo=:testdata/file1.json  # json value of file\n{\"foo\":{\"x\":1,\"z\":2,\"y\":3}}\n $ gojo foo=%testdata/file.txt    # base64 of file contents\n{\"foo\":\"YQpiCmMKZAplCg==\"}\n```\n\n## Installation\n### Homebrew\n```sh\nbrew install itchyny/tap/gojo\n```\n\n### Build from source\n```bash\ngo install github.com/itchyny/gojo/cmd/gojo@latest\n```\n\n## Difference to jo\n- Implemented in Go and Go-gettable, also useful for library usage.\n- Implements nested paths (example: `foo[x][y][z]=1`, `foo[][][]=1`).\n- Implements YAML output option `-y` (example: `gojo -y foo=1` outputs `foo: 1`).\n- Drops support of `k@v` syntax (use `k=true` or `k=false`) and type guessing flags.\n- Does not print duplicate keys (although duplicate key in JSON is valid, it's not that useful and overwritten by the latter).\n\n## Bug Tracker\nReport bug at [Issues・itchyny/gojo - GitHub](https://github.com/itchyny/gojo/issues).\n\n## Author\nitchyny (https://github.com/itchyny)\n\n## License\nThis software is released under the MIT License, see LICENSE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitchyny%2Fgojo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitchyny%2Fgojo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitchyny%2Fgojo/lists"}