{"id":19228993,"url":"https://github.com/romshark/valfile","last_synced_at":"2026-04-14T15:33:48.146Z","repository":{"id":192150724,"uuid":"686156238","full_name":"romshark/valfile","owner":"romshark","description":"A CLI tool to statically check env vars, YAML, TOML, JSON, HCL, Jsonnet and .env files against a Go type. ","archived":false,"fork":false,"pushed_at":"2023-09-09T12:26:49.000Z","size":4694,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T06:56:50.682Z","etag":null,"topics":["go","golang","hcl2","json","jsonnet","toml","validator","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/romshark.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}},"created_at":"2023-09-01T22:24:13.000Z","updated_at":"2023-11-24T01:44:01.000Z","dependencies_parsed_at":"2024-11-09T15:33:24.850Z","dependency_job_id":"64a1713d-228f-4cf1-9193-aa2e1fee2a65","html_url":"https://github.com/romshark/valfile","commit_stats":null,"previous_names":["romshark/valfile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/romshark/valfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fvalfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fvalfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fvalfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fvalfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romshark","download_url":"https://codeload.github.com/romshark/valfile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fvalfile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["go","golang","hcl2","json","jsonnet","toml","validator","yaml"],"created_at":"2024-11-09T15:31:28.487Z","updated_at":"2026-04-14T15:33:48.128Z","avatar_url":"https://github.com/romshark.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# valfile\n\nA CLI tool to statically validate YAML, TOML, JSON, Jsonnet, HCL, dotenv files and\nenvironment variables against a Go `struct` type.\n\n## Usage\n\nThe following command will return errors, if file `input-file.toml`\ncan't be unmarshaled into type `YourStructType` defined in package `path/to/yourpackage`\nor doesn't match it's `validate` field tags of\n[github.com/go-playground/validator](https://github.com/go-playground/validator):\n\n\n```sh\nvalfile -p path/to/yourpackage -t YourStructType -f input-file.toml\n```\n\nIf `input-file.toml` passes the marshaling and validation then\nthe above command is a no-op.\n\n### Struct tag check\n\nBy default, valfile will return errors if any of the fields of the selected type\ndon't have a tag corresponding to the input type, for example:\n\n```go\nstruct S struct {\n    Foo string `json:\"foo\"`\n    Bar string\n}\n```\n\nThe above type in combination with a JSON input file will produce:\n\n```sh\nConfig.Bar: missing tag \"json\"\n```\n\noption `-no-tag-check` disables this check.\n\n### Environment variables\n\nTo match environment variables against a Go type, use the `-env` flag.\nBeware that this flag is mutually exclusive with `-f`.\n\n```sh\nFOO=bar BAZZ=fuzz valfile -p path/to/yourpackage -t YourStructType -env\n```\n\n## Requirements\n\n`valfile` requires the Go compiler toolchain to be installed on the system.\n\n## How it works\n\n`valfile` parses the given package, finds the type definition, renders a format-specific\nprogram template to a temporary directory, runs it using the Go toolchain `go run .`\nand forwards error messages if any.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromshark%2Fvalfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromshark%2Fvalfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromshark%2Fvalfile/lists"}