{"id":14008090,"url":"https://github.com/lucasepe/uri","last_synced_at":"2025-07-15T08:32:24.467Z","repository":{"id":53519292,"uuid":"351759315","full_name":"lucasepe/uri","owner":"lucasepe","description":"A commandline tool to resolve URI Templates expressions as specified in RFC 6570.","archived":false,"fork":false,"pushed_at":"2021-03-31T07:30:12.000Z","size":15,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-10T11:02:34.510Z","etag":null,"topics":["commandline-tool","cross-platform","golang","uri-templates"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucasepe.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":"2021-03-26T11:28:29.000Z","updated_at":"2024-06-20T08:54:12.000Z","dependencies_parsed_at":"2022-09-18T04:10:49.142Z","dependency_job_id":null,"html_url":"https://github.com/lucasepe/uri","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Furi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Furi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Furi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasepe%2Furi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasepe","download_url":"https://codeload.github.com/lucasepe/uri/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226027887,"owners_count":17562152,"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":["commandline-tool","cross-platform","golang","uri-templates"],"created_at":"2024-08-10T11:01:13.003Z","updated_at":"2024-11-23T10:17:51.333Z","avatar_url":"https://github.com/lucasepe.png","language":"Go","readme":"# URI\n\n## Are you tired to build, concat, replace URL(s) (via shell scripts sed/awk/tr) from your awesome commandline pipeline? \n### Well! here is the missing piece: `uri`!\n\n```\n         _            _  \no  / / _|     URI      |_ \no / /   |_ Templates  _|\n```\n\n\u003e A commandline tool to resolve URI Templates expressions as specified in [RFC 6570](http://tools.ietf.org/html/rfc6570).\n\nFor a complete syntax reference check the RFC6570 specs here: https://tools.ietf.org/html/rfc6570#section-2.\n\nExpressions are placeholders which are to be substituted by the values their variables reference.\n\n```text\nhttp://example.org/~{username}/\nhttp://example.org/dictionary/{term:1}/{term}\nhttp://example.org/search{?q*,lang}\n```\n\n# How to use `uri`\n\nThis tool takes a JSON as input data model containing the values ​​of the variables. Example:\n\n```json\n{\n    \"username\": \"scarlett\",\n    \"term\": \"black widow\",\n    \"q\": {\n        \"a\": \"mars\",\n        \"b\": \"jupiter\"\n    },\n    \"lang\": \"en\"\n}\n```\n\nYou can pass this JSON as file using the `-i` flag:\n\n```bash\n$ uri -i data.json http://example.org/~{username}/{term:1}/{term}{?q*,lang}\nhttp://example.org/~scarlett/b/black%20widow?q*\n```\n\nOr you can pipe it directly to the tool (and this the most interesting use case):\n\n```bash\n$ cat data.json | uri http://example.org/~{username}/{term:1}/{term}{?q*,lang}\nhttp://example.org/~scarlett/b/black%20widow?q*\n```\n\nUsing commandline pipes you can achieve tasks like this:\n\n```bash\n$ cat testdata/pets.json \\\n  | jq --raw-output '.pets[1] | {category: .species, year: .birthYear}' \\\n  | uri https://pets.api.com/{category}{?year} \\\n  | xargs curl\n```\n\n# Installation Steps\n\nIn order to use the crumbs command, compile it using the following command:\n\n```bash\ngo get -u github.com/lucasepe/uri\n```\n\nThis will create the executable under your $GOPATH/bin directory.\n\n\n## Ready-To-Use Releases \n\nIf you don't want to compile the source code yourself, [here you can find the executables](https://github.com/lucasepe/uri/releases/latest) for:\n\n- MacOS\n- Linux (amd64, arm7, arm64)\n- Windows\n\n## Credits\n\n`uri` was possible thanks to the [Joshua Tacoma URI Template library](https://github.com/jtacoma/uritemplates).","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasepe%2Furi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasepe%2Furi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasepe%2Furi/lists"}