{"id":21380639,"url":"https://github.com/stefanoschrs/zap-cli","last_synced_at":"2026-05-20T06:03:50.254Z","repository":{"id":57709673,"uuid":"500698148","full_name":"stefanoschrs/zap-cli","owner":"stefanoschrs","description":"A CLI to pretty print logs in \"uber-go/zap\" json format.","archived":false,"fork":false,"pushed_at":"2022-06-07T05:35:12.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T22:44:24.062Z","etag":null,"topics":["cli","golang","json","logs"],"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/stefanoschrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"stefanoschrs"}},"created_at":"2022-06-07T05:13:05.000Z","updated_at":"2022-06-07T05:34:27.000Z","dependencies_parsed_at":"2022-09-26T21:21:18.979Z","dependency_job_id":null,"html_url":"https://github.com/stefanoschrs/zap-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoschrs%2Fzap-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoschrs%2Fzap-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoschrs%2Fzap-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoschrs%2Fzap-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanoschrs","download_url":"https://codeload.github.com/stefanoschrs/zap-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243857996,"owners_count":20359259,"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","golang","json","logs"],"created_at":"2024-11-22T10:42:00.260Z","updated_at":"2026-05-20T06:03:45.217Z","avatar_url":"https://github.com/stefanoschrs.png","language":"Go","funding_links":["https://github.com/sponsors/stefanoschrs"],"categories":[],"sub_categories":[],"readme":"# zap-cli\n\n\u003e Pretty print [uber-go/zap](https://github.com/uber-go/zap) logs\n\n## Installation\n```bash\nmake\nln -s $(pwd)/dist/zap-cli /usr/local/bin/zap-cli\n```\n\n## Usage / Examples\n1.  \n    ```bash\n    $ go run ./examples/test.go\n    {\"level\":\"\\u001b[35mDEBUG\\u001b[0m\",\"time\":\"2022-06-07T08:19:31+03:00\",\"message\":\"Failed to fetch URL\",\"url\":\"https://github.com/stefanoschrs/zap-cli\",\"attempt\":3}\n    {\"level\":\"\\u001b[34mINFO\\u001b[0m\",\"time\":\"2022-06-07T08:19:31+03:00\",\"message\":\"Failed to fetch URL\"}\n    ```\n    ```bash\n    $ go run ./examples/test.go | zap-cli \n    2022-06-07T08:19:33+03:00 DEBUG\tFailed to fetch URL\t{\"attempt\":3,\"url\":\"https://github.com/stefanoschrs/zap-cli\"}\n    2022-06-07T08:19:33+03:00 INFO\tFailed to fetch URL\n    ```\n2.  \n    ```bash\n    $ cat examples/test.log \n    {\"level\":\"\\u001b[35mDEBUG\\u001b[0m\",\"time\":\"2022-06-06T14:00:24Z\",\"message\":\"Processing\",\"CountryId\":\"1\",\"CountryName\":\"United States\"}\n    {\"level\":\"\\u001b[35mDEBUG\\u001b[0m\",\"time\":\"2022-06-06T14:00:24Z\",\"message\":\"Page 0\"}\n    {\"level\":\"\\u001b[35mDEBUG\\u001b[0m\",\"time\":\"2022-06-06T14:00:24Z\",\"message\":\"fetching data\"}\n    {\"level\":\"\\u001b[35mDEBUG\\u001b[0m\",\"time\":\"2022-06-06T14:00:26Z\",\"message\":\"Found 50 entries\"}\n    {\"level\":\"\\u001b[31mERROR\\u001b[0m\",\"time\":\"2022-06-06T14:00:26Z\",\"message\":\"no entry was added\"}\n    ```\n    ```bash\n    $ cat examples/test.log | zap-cli\n    2022-06-06T14:00:24Z DEBUG\tProcessing\t{\"CountryId\":\"1\",\"CountryName\":\"United States\"}\n    2022-06-06T14:00:24Z DEBUG\tPage 0\n    2022-06-06T14:00:24Z DEBUG\tfetching data\n    2022-06-06T14:00:26Z DEBUG\tFound 50 entries\n    2022-06-06T14:00:26Z ERROR\tno entry was added\n    ```\n\n## TODO\n- [ ] Use a config/flags to map the base fields (level, time, message)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoschrs%2Fzap-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanoschrs%2Fzap-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoschrs%2Fzap-cli/lists"}