{"id":48660792,"url":"https://github.com/ehsanmok/envo","last_synced_at":"2026-04-15T07:03:52.954Z","repository":{"id":350091840,"uuid":"1205261285","full_name":"ehsanmok/envo","owner":"ehsanmok","description":"Typed config loading from env vars, TOML, and CLI for Mojo🔥","archived":false,"fork":false,"pushed_at":"2026-04-08T20:11:09.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T10:40:09.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ehsanmok.github.io/envo/","language":"Mojo","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/ehsanmok.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T19:48:01.000Z","updated_at":"2026-04-08T20:53:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ehsanmok/envo","commit_stats":null,"previous_names":["ehsanmok/envo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ehsanmok/envo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsanmok%2Fenvo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsanmok%2Fenvo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsanmok%2Fenvo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsanmok%2Fenvo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehsanmok","download_url":"https://codeload.github.com/ehsanmok/envo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsanmok%2Fenvo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31830158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-04-10T10:06:23.583Z","updated_at":"2026-04-15T07:03:52.947Z","avatar_url":"https://github.com/ehsanmok.png","language":"Mojo","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envo\n\n[![CI](https://github.com/ehsanmok/envo/actions/workflows/ci.yml/badge.svg)](https://github.com/ehsanmok/envo/actions)\n[![Docs](https://github.com/ehsanmok/envo/actions/workflows/docs.yaml/badge.svg)](https://ehsanmok.github.io/envo)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nTyped config loading from env vars, TOML, and CLI for Mojo.\n\n`envo` composes [`morph`](https://github.com/ehsanmok/morph)'s TOML and\nCLI parsing with a single libc `getenv(3)` FFI call to give you layered,\ntyped configuration with zero boilerplate.\n\n## Precedence\n\n```\nCLI args   --port 9090      (highest)\nenv vars   PORT=9090\nTOML file  port = 8080      (lowest)\n```\n\n## Quick start\n\n```mojo\nfrom envo import load_config\n\n@fieldwise_init\nstruct ServerConfig(Defaultable, Movable):\n    var host: String\n    var port: Int\n    var debug: Bool\n    def __init__(out self):\n        self.host = \"localhost\"\n        self.port = 8080\n        self.debug = False\n\nvar cfg = load_config[ServerConfig](\"config.toml\")\n# PORT=9090 in environment -\u003e cfg.port == 9090\n# --debug on CLI -\u003e cfg.debug == True\n```\n\nWith explicit CLI args:\n\n```mojo\nvar cfg = load_config[ServerConfig](\"config.toml\", args=argv())\n```\n\nLow-level env var access:\n\n```mojo\nfrom envo import getenv, getenv_or\n\nvar home = getenv(\"HOME\")             # Optional[String]\nvar port = getenv_or(\"PORT\", \"8080\") # String\n```\n\n## Field name mapping\n\n| Struct field | Env var    | CLI flag      |\n|------------- |----------- |-------------- |\n| `host`       | `HOST`     | `--host`      |\n| `db_url`     | `DB_URL`   | `--db-url`    |\n| `max_conns`  | `MAX_CONNS`| `--max-conns` |\n\n## Supported field types\n\n`String`, `Int`, `Int64`, `Bool`, `Float64`, `Float32`,\n`Optional[String]`, `Optional[Int]`, `Optional[Float64]`, `Optional[Bool]`,\n`List[String]`, `List[Int]`\n\n## Installation\n\n```toml\n# pixi.toml\n[dependencies]\nenvo = { git = \"https://github.com/ehsanmok/envo.git\", branch = \"main\" }\n```\n\n## Development\n\n```bash\npixi run tests     # run all tests\npixi run example   # run example\npixi run bench     # run benchmarks\npixi run -e dev docs  # build and open docs\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsanmok%2Fenvo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehsanmok%2Fenvo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsanmok%2Fenvo/lists"}