{"id":29210898,"url":"https://github.com/deatil/zig-dotenv","last_synced_at":"2025-07-05T21:02:29.774Z","repository":{"id":300058295,"uuid":"1005084841","full_name":"deatil/zig-dotenv","owner":"deatil","description":"A dotenv library for zig.","archived":false,"fork":false,"pushed_at":"2025-06-19T16:48:02.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T17:41:48.199Z","etag":null,"topics":["dotenv","dotenv-parser","zig","zig-env"],"latest_commit_sha":null,"homepage":"https://github.com/deatil/zig-dotenv","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deatil.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,"zenodo":null}},"created_at":"2025-06-19T16:34:36.000Z","updated_at":"2025-06-19T16:48:06.000Z","dependencies_parsed_at":"2025-06-19T17:52:54.966Z","dependency_job_id":null,"html_url":"https://github.com/deatil/zig-dotenv","commit_stats":null,"previous_names":["deatil/zig-dotenv"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/deatil/zig-dotenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fzig-dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fzig-dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fzig-dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fzig-dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deatil","download_url":"https://codeload.github.com/deatil/zig-dotenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fzig-dotenv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263222419,"owners_count":23433022,"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":["dotenv","dotenv-parser","zig","zig-env"],"created_at":"2025-07-02T22:00:50.191Z","updated_at":"2025-07-05T21:02:29.768Z","avatar_url":"https://github.com/deatil.png","language":"Zig","readme":"## Zig-dotenv \n\nA dotenv library for zig.\n\n\n### Env\n\n - Zig \u003e= 0.15.0-dev.337+4e700fdf8\n\n\n### Adding zig-dotenv as a dependency\n\nAdd the dependency to your project:\n\n```sh\nzig fetch --save=zig-dotenv git+https://github.com/deatil/zig-dotenv#main\n```\n\nor use local path to add dependency at `build.zig.zon` file\n\n```zig\n.{\n    .dependencies = .{\n        .@\"zig-dotenv\" = .{\n            .path = \"./lib/zig-dotenv\",\n        },\n        ...\n    }\n}\n```\n\nAnd the following to your `build.zig` file:\n\n```zig\nconst zig_totp_dep = b.dependency(\"zig-dotenv\", .{});\nexe.root_module.addImport(\"zig-dotenv\", zig_totp_dep.module(\"zig-dotenv\"));\n```\n\nThe `zig-dotenv` structure can be imported in your application with:\n\n```zig\nconst dotenv = @import(\"zig-dotenv\");\n```\n\n\n### Get Starting\n\n~~~zig\nconst std = @import(\"std\");\nconst dotenv = @import(\"zig-dotenv\");\n\npub fn main() !void {\n    const alloc = std.heap.page_allocator;\n\n    const env_data =\n        \\\\FOO=abc\n        \\\\BAR=\"def ghi\"\n        \\\\# Test\n        \\\\BAZ=xyz\n        ;\n    \n    var env = dotenv.Dotenv.init(alloc, .{});\n    defer env.deinit();\n\n    try env.parse(env_data);\n\n    const got_foo = env.get(\"FOO\").?;\n\n    // output: \n    // dotenv got: abc\n    std.debug.print(\"dotenv got: {s} \\n\", .{got_foo});\n}\n~~~\n\n\n### LICENSE\n\n*  The library LICENSE is `Apache2`, using the library need keep the LICENSE.\n\n\n### Copyright\n\n*  Copyright deatil(https://github.com/deatil).\n","funding_links":[],"categories":["Libraries","Fundamentals"],"sub_categories":["Utility"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Fzig-dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeatil%2Fzig-dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Fzig-dotenv/lists"}