{"id":20699910,"url":"https://github.com/mrmarble/zmk-viewer","last_synced_at":"2025-05-11T04:27:59.129Z","repository":{"id":38075634,"uuid":"451657424","full_name":"MrMarble/zmk-viewer","owner":"MrMarble","description":"cli tool to generate preview images from a zmk .keymap file","archived":false,"fork":false,"pushed_at":"2024-06-26T19:39:13.000Z","size":619,"stargazers_count":158,"open_issues_count":8,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-11T04:27:31.831Z","etag":null,"topics":["cli","generator","keymap","layout","zmk"],"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/MrMarble.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},"funding":{"github":"MrMarble","ko_fi":"mrmarble","custom":["https://paypal.me/mrmarble"]}},"created_at":"2022-01-24T22:39:53.000Z","updated_at":"2025-04-26T14:48:00.000Z","dependencies_parsed_at":"2024-03-26T12:42:30.012Z","dependency_job_id":"85eebe55-29b7-4f84-af5c-a75b007e17aa","html_url":"https://github.com/MrMarble/zmk-viewer","commit_stats":null,"previous_names":["mrmarble/zmk-layout-viewer"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fzmk-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fzmk-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fzmk-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMarble%2Fzmk-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrMarble","download_url":"https://codeload.github.com/MrMarble/zmk-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518955,"owners_count":21921074,"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","generator","keymap","layout","zmk"],"created_at":"2024-11-17T00:32:45.955Z","updated_at":"2025-05-11T04:27:59.085Z","avatar_url":"https://github.com/MrMarble.png","language":"Go","funding_links":["https://github.com/sponsors/MrMarble","https://ko-fi.com/mrmarble","https://paypal.me/mrmarble"],"categories":[],"sub_categories":[],"readme":"# ZMK viewer\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/mrmarble/zmk-layout-viewer)\n[![CodeQL](https://github.com/MrMarble/zmk-viewer/actions/workflows/codeql.yml/badge.svg)](https://github.com/MrMarble/zmk-viewer/actions/workflows/codeql.yml)\n[![golangci-lint](https://github.com/MrMarble/zmk-layout-viewer/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/MrMarble/zmk-layout-viewer/actions/workflows/golangci-lint.yml)\n\nA **work in progress** Cli tool to generate preview images from a zmk .keymap file.\n\n\n## Installation\n\nYou can download a pre compiled binary directly from the [releases](https://github.com/mrmarble/zmk-viewer/releases) for your OS/Architecture.\n### Linux/MacOS\n\nI made an [installation script](/scripts/install.sh) that should download the latest available version corresponding to your OS and architecture. `sudo` is needed to copy the binary to `/usr/local/bin`\n\n```sh\ncurl -sL https://raw.githubusercontent.com/MrMarble/zmk-viewer/master/scripts/install.sh | sudo -E bash -\n# or with wget\nwget -O - https://raw.githubusercontent.com/MrMarble/zmk-viewer/master/scripts/install.sh | sudo -E bash -\n```\n\n### Windows\n\nDownload the executable directly from the [releases](https://github.com/mrmarble/zmk-viewer/releases)\n\n### Others\n\nIf you already have Go in your system you can use go install to build the binary without cloning the repo first.\n\n```sh\ngo install github.com/mrmarble/zmk-viewer/cmd/zmk-viewer@latest # or target a specific version @v0.1.0\n```\n## Usage\n\n```shell\nUsage: zmk-viewer generate \u003ckeyboard-name\u003e\n\nGenerate layout image.\n\nArguments:\n  \u003ckeyboard-name\u003e    Keyboard name to fetch layout.\n\nFlags:\n  -h, --help                  Show context-sensitive help.\n  -D, --debug                 Enable debug mode\n      --version               Print version information and quit\n\n  -f, --file=STRING           ZMK .keymap file\n  -l, --layout-file=STRING    info.json file\n  -t, --transparent           Use a transparent background.\n  -r, --raw                   Draw the ZMK codes instead of the key labels.\n  -s, --single                Generate a single image.\n  -u, --unified               Generate a single image with all the layers.\n  -o, --output=\".\"            Output directory.\n```\n\nKeyboard name should be the same as in https://config.qmk.fm.\n\n```shell\nzmk-viewer generate cradio\n```\nWill output this image:\n\n![](assets/cradio_split_3x5_2.png)\n\nYou can pass a .keymap file ([this one for reference](https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/cradio/cradio.keymap)) to generate the layout with bindings\n\n\n### Normal\n\n```shell\nzmk-viewer generate -f ~/zmk-config/config/cradio.keymap cradio\n```\nwill output an image for each layer:\n\n![](assets/cradio_split_3x5_2_default_layer.png)\n![](assets/cradio_split_3x5_2_left_layer.png)\n![](assets/cradio_split_3x5_2_right_layer.png)\n![](assets/cradio_split_3x5_2_tri_layer.png)\n\n### Single\n\n```shell\nzmk-viewer generate -f ~/zmk-config/config/cradio.keymap cradio --single\n```\nwill output one image with all layers:\n\n![](assets/single.png)\n\n### Unified\n\n```shell\nzmk-viewer generate -f ~/zmk-config/config/cradio.keymap cradio --unified\n```\nwill output one image with all layers stacked:\n\n![](assets/unified.png)\n\n\n## ⭐ Stargazers\n\n[![Star History Chart](https://api.star-history.com/svg?repos=mrmarble/zmk-viewer\u0026type=Date)](https://star-history.com/#mrmarble/zmk-viewer\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmarble%2Fzmk-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmarble%2Fzmk-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmarble%2Fzmk-viewer/lists"}