{"id":16116304,"url":"https://github.com/frol/clap-yaml-json-demo","last_synced_at":"2025-04-06T08:44:47.092Z","repository":{"id":234801405,"uuid":"622131917","full_name":"frol/clap-yaml-json-demo","owner":"frol","description":"Minimal CLI app in Rust that does yaml to json and json to yaml convertion","archived":false,"fork":false,"pushed_at":"2023-04-02T20:10:02.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T14:19:18.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-04-01T08:02:55.000Z","updated_at":"2023-04-01T18:16:33.000Z","dependencies_parsed_at":"2024-04-20T20:54:31.328Z","dependency_job_id":"d40f2a8c-f124-46d6-aecb-2a085ef8a8f2","html_url":"https://github.com/frol/clap-yaml-json-demo","commit_stats":null,"previous_names":["frol/clap-yaml-json-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fclap-yaml-json-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fclap-yaml-json-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fclap-yaml-json-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frol%2Fclap-yaml-json-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frol","download_url":"https://codeload.github.com/frol/clap-yaml-json-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457740,"owners_count":20941906,"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":[],"created_at":"2024-10-09T20:22:01.768Z","updated_at":"2025-04-06T08:44:47.072Z","avatar_url":"https://github.com/frol.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo YAML to JSON and JSON to YAML command line utility\n\nIn this demo I just wanted to show that developing CLIs in Rust is a breeze.\n\nThere are three versions of this demo stored in separate branches:\n\n* [`main`](https://github.com/frol/clap-yaml-json-demo/tree/main) - lazy and short version without proper error handling\n* [`with-error-handling`](https://github.com/frol/clap-yaml-json-demo/tree/with-error-handling) - added the error handling\n* [`with-custom-type`](https://github.com/frol/clap-yaml-json-demo/tree/with-custom-type) - added a custom type `ExistingPath` to showcase that you can validate anything at CLI arguments parsing\n\n[![asciicast](https://asciinema.org/a/GHMTURjyGxh3AqN1V4bUYj8ht.svg)](https://asciinema.org/a/GHMTURjyGxh3AqN1V4bUYj8ht)\n\n## Build\n\nYou will need [Rust](https://www.rust-lang.org/) installed on your computer, and then run:\n\n```sh\ncargo build --release\n```\n\n## Run\n\nAfter the build, the executable file is usually located at `target/release/clap-yaml-json-demo` (or with `.exe` extension on Windows), so run it:\n\nOn Linux/MacOS:\n\n```\n./target/release/clap-yaml-json-demo\n```\n\nOn Windows:\n\n```\n.\\target\\release\\clap-yaml-json-demo.exe\n```\n\nYou will be greeted with clap help message that is generated automatically from the code!\nAll the CLI arguments are validated and once you get the `Command` type, you can trust that all the types are valid (e.g. if you expect a number, it will be a number, not a string that you will still need to parse).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrol%2Fclap-yaml-json-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrol%2Fclap-yaml-json-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrol%2Fclap-yaml-json-demo/lists"}