{"id":15992848,"url":"https://github.com/shnewto/lilac","last_synced_at":"2026-05-02T03:32:02.354Z","repository":{"id":75084082,"uuid":"332953501","full_name":"shnewto/lilac","owner":"shnewto","description":"OCaml library for getting the value of any field in a YAML file as a string.","archived":false,"fork":false,"pushed_at":"2023-02-14T01:31:30.000Z","size":40,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-11T15:36:23.350Z","etag":null,"topics":["bisect-ppx","cmdliner","codecov","dune","lilac","mit","ocaml","ounit","yaml","yaml-unix"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/shnewto.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}},"created_at":"2021-01-26T02:58:27.000Z","updated_at":"2023-02-14T01:10:47.000Z","dependencies_parsed_at":"2023-07-10T23:00:51.690Z","dependency_job_id":null,"html_url":"https://github.com/shnewto/lilac","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/shnewto/lilac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Flilac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Flilac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Flilac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Flilac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shnewto","download_url":"https://codeload.github.com/shnewto/lilac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Flilac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32522245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["bisect-ppx","cmdliner","codecov","dune","lilac","mit","ocaml","ounit","yaml","yaml-unix"],"created_at":"2024-10-08T06:41:26.477Z","updated_at":"2026-05-02T03:32:02.347Z","avatar_url":"https://github.com/shnewto.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![.github/workflows/ci.yml](https://github.com/shnewto/lilac/workflows/.github/workflows/ci.yml/badge.svg)](https://github.com/shnewto/lilac/actions)\n[![codecov](https://codecov.io/gh/shnewto/lilac/branch/main/graph/badge.svg?token=0OUYOWVMOL)](https://codecov.io/gh/shnewto/lilac)\n\n# lilac\n\nlilac is a simple library for getting the value of any field in a YAML file as a string.\n\n## Summary\n\nTake this example yaml:\n\n```yaml\nlilac-params:\n  source:\n    url: \"https://ttaw.dev\"\n    user: \"lilac+source@ttaw.dev\"\n  dest:\n    url: \"https://walkandtalk.dev\"\n    user: \"lilac+dest@walkandtalk.dev\"\n```\n\nTo get the value `\"lilac+source@ttaw.dev\"`, you'd specify the path `lilac-params.source.user`.\n\nHere's an example of how you might do that in code with the yaml used in this project's `test/res` directory:\n\n```ocaml\nlet yaml = yaml_from_fpath \"test/res/config.yaml\" in\n  yaml_value_str ~path:\"lilac-params.source.user\" yaml\n  |\u003e Option.value ~default:\"Oops! It wasn't there.\"\n```\n\n### lilacbin\nThe `lilacbin` app in this repo's `bin/` is really just used for debugging for now. It does have some niceties like a `--help` flag, but if there's something you're interested in it doing beyond debugging, let me know! Raising an issue is my preferred channel for that kinda thing.\n\n## Dependencies\n\nI'll start with the basics for macOS because putting this project together required I learn them too. I hope they'll\nserve as at least some direction for other operating systems but if you notice something important I've missed,\nplease create an issue :heart:\n\nFirst you'll need `opam` and `ocaml`.\n\nFor macOS:\n\n- `brew install opam`\n- `brew install ocaml`\n\nFor anything else, the opam installation docs live [here](https://opam.ocaml.org/doc/Install.html),\nand the ocaml intallation docs live [here](https://ocaml.org/docs/install.html).\n\nOnce OCaml and opam are installed, run `opam init` from the terminal to get the environment sorted. I chose to\nlet it modify my terminal's rc file (`.zshrc`) so I wouldn't have to think about it again, but that's up to you :)\n\n## Installing\n\nIf you just want to install lilac as a library and use it in your application, you can run `opam install lilac`.\nOtherwise, see the Developing section below.\n\n## Developing\n## Dev dependencies\n\nFor local development, I'll recommend not installing with opam beforehand. Once you've cloned the repo and have navigated into its directory, you'll want to run these commands, in this order:\n\n- `opam pin .`\n- `opam install . --deps-only --with-test`\n\n## Building\n\n`make`\n\n## Running the tests\n\n`make test`\n\n## Checking code coverage\n\n`make coverage`\n\n## Running lilac bin for stdout debugging / validation\n\n`make run args='-i \u003cpath to yaml file\u003e'`\n\nFor example `make run args='-i test/res/config.yaml'`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnewto%2Flilac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshnewto%2Flilac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnewto%2Flilac/lists"}