{"id":48279724,"url":"https://github.com/omkar-foss/zebra","last_synced_at":"2026-04-04T22:43:11.201Z","repository":{"id":345289045,"uuid":"1162363348","full_name":"omkar-foss/zebra","owner":"omkar-foss","description":"A simple, fast, all-in-one config loader for Zig.","archived":false,"fork":false,"pushed_at":"2026-03-25T12:04:16.000Z","size":289,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T13:05:11.303Z","etag":null,"topics":["config-loader","zig","zig-library","zig-package","ziglang"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/omkar-foss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-20T07:00:36.000Z","updated_at":"2026-03-25T14:45:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omkar-foss/zebra","commit_stats":null,"previous_names":["omkar-foss/zebra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omkar-foss/zebra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkar-foss%2Fzebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkar-foss%2Fzebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkar-foss%2Fzebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkar-foss%2Fzebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omkar-foss","download_url":"https://codeload.github.com/omkar-foss/zebra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkar-foss%2Fzebra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31417949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["config-loader","zig","zig-library","zig-package","ziglang"],"created_at":"2026-04-04T22:43:10.473Z","updated_at":"2026-04-04T22:43:11.192Z","avatar_url":"https://github.com/omkar-foss.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Zebra](images/zebra.jpg)\n\n# Zebra ![Zig](https://img.shields.io/badge/Zig-%23F7A41D.svg?style=for-the-badge\u0026logo=zig\u0026logoColor=white)\n\nA simple, fast, all-in-one config loader for Zig. Supports reading dotenv, toml,\nyaml and os env. Fully-functional and tested on Zig 0.15.2.\n\n🏔️ Codeberg Mirror: https://codeberg.org/omkar-foss/zebra\n\n## Design\n\n- Inspired by the wonderful [viper (golang)](https://github.com/spf13/viper). Stripes instead of\n  fangs! 🦓\n- Built to adhere to [Zen of Zig](https://ziglang.org/documentation/0.15.2/#Zen).\n- Reads multiple config files and write into a single, unified hashmap or struct.\n- Zero external dependencies, all loaders are native to zebra's code.\n- Extensive tests to ensure zebra is as compliant as possible with file format standards.\n\n## Usage\n\n### Step 1. Install Zebra\n\n- Fetch Zebra as a dependency to your Zig project:\n\n```bash\nzig fetch --save \"git+https://github.com/omkar-foss/zebra#main\"\n```\n\n- In your project's `build.zig`, add Zebra as a module dependency by placing below code before `b.installArtifact(exe);`:\n\n```zig\nconst zebra = b.dependency(\"zebra\", .{\n    .target = target,\n    .optimize = optimize,\n});\nexe.root_module.addImport(\"zebra\", zebra.module(\"zebra\"));\n```\n\n### Step 2. Load yaml file as a map and print a key in it\n\nTo try out below example, copy the file [`env_test.yaml`](env_test.yaml) to your project folder, and then update your `src/main.zig` as follows:\n\n```zig\nconst std = @import(\"std\");\nconst zebra = @import(\"zebra\");\n\npub fn main() !void {\n    var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n    defer _ = gpa.deinit();\n\n    const allocator = gpa.allocator();\n\n    var cfg: std.StringHashMap([]u8) = try zebra.core.loadAsMap(allocator, \u0026[_][]const u8{\"env_test.yaml\"});\n    defer zebra.cleanup.deinitMap(allocator, \u0026cfg);\n\n    std.debug.print(\"Output: {s}\\n\", .{cfg.get(\"person.name.first\").?});\n}\n```\n\nAnd then run `zig build run`, you'll get the below output:\n\n```bash\n$ zig build run\nOutput: John\n```\n\nRefer to [integration.zig](./tests/integration.zig) for detailed usage examples.\n\n## Contributing\n\nI'd really appreciate any help from the community towards making Zebra better. Please check out [CONTRIBUTING.md](CONTRIBUTING.md) to get started!\n\n### Note on AI usage\n\nAutomated PRs without clear human oversight will be closed. I welcome the use of AI as a\nproductivity tool, but all PRs must be authored, reviewed, and justified by a human who takes full\nresponsibility for the logic, security, and maintenance of the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomkar-foss%2Fzebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomkar-foss%2Fzebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomkar-foss%2Fzebra/lists"}