{"id":48826019,"url":"https://github.com/trippwill/pakt","last_synced_at":"2026-04-14T18:01:22.716Z","repository":{"id":349166013,"uuid":"1201309982","full_name":"trippwill/pakt","owner":"trippwill","description":"PAKT — a typed data interchange format. Human-authorable. Stream-parseable. Spec-projected.","archived":false,"fork":false,"pushed_at":"2026-04-12T14:29:59.000Z","size":756,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T16:20:40.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/trippwill.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04T13:59:25.000Z","updated_at":"2026-04-09T22:10:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/trippwill/pakt","commit_stats":null,"previous_names":["trippwill/pakt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trippwill/pakt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trippwill%2Fpakt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trippwill%2Fpakt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trippwill%2Fpakt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trippwill%2Fpakt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trippwill","download_url":"https://codeload.github.com/trippwill/pakt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trippwill%2Fpakt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31808518,"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":[],"created_at":"2026-04-14T18:01:21.936Z","updated_at":"2026-04-14T18:01:22.700Z","avatar_url":"https://github.com/trippwill.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PAKT\n\n\u003e **PAKT** — a typed data interchange format. Human-authorable. Streaming. Self-describing.\n\n```\ngreeting:str     = 'hello world'\ncount:int        = 42\npayload:bin      = x'48656C6C6F'\nactive:bool      = true\nserver:{host:str, port:int} = { 'localhost', 8080 }\n```\n\n## What is PAKT?\n\nPAKT is a typed data interchange format where every value carries its type. No inference, no ambiguity. Units are self-validating — type annotations are producer assertions checked at parse time.\n\nThe current Go library and CLI implement the PAKT v0 surface: `;` map syntax, `bin`, raw strings, the first-content-line multi-line string rule, and top-level `\u003c\u003c` pack statements. Duplicate statement names and map keys are preserved in decode order; higher-level consumers decide how to interpret them.\n\n## Repository Structure\n\n```\npakt/\n├── encoding/       # Canonical Go library (github.com/trippwill/pakt/encoding)\n├── dotnet/         # .NET library, source generator, benchmarks\n├── main.go         # CLI entry point (go install github.com/trippwill/pakt@latest)\n├── spec/           # Formal specification (PAKT v0 draft)\n├── docs/           # User guide and documentation\n├── site/           # Hugo website (usepakt.dev)\n└── testdata/       # Sample .pakt files\n```\n\n## Install\n\n```sh\ngo install github.com/trippwill/pakt@latest\n```\n\n## CLI Usage\n\n```sh\n# Parse a file and emit structured events\npakt parse data.pakt\n\n# Validate only (exit 0/1)\npakt validate data.pakt\n```\n\n## Library\n\n```go\nimport \"github.com/trippwill/pakt/encoding\"\n```\n\n### Unmarshal\n\n```go\ntype Config struct {\n    Host string `pakt:\"host\"`\n    Port int    `pakt:\"port\"`\n}\n\ndata := []byte(\"host:str = 'localhost'\\nport:int = 8080\")\nvar cfg Config\nif err := encoding.Unmarshal(data, \u0026cfg); err != nil {\n    log.Fatal(err)\n}\n```\n\n### Streaming Decode (Events)\n\n```go\ndec := encoding.NewDecoder(reader)\ndefer dec.Close()\nfor {\n    ev, err := dec.Decode()\n    if err == io.EOF { break }\n    fmt.Println(ev.Kind, ev.Name, ev.Value)\n}\n```\n\n### Streaming Unmarshal (large datasets)\n\nProcess stream entries one at a time with constant memory:\n\n```go\ndec := encoding.NewDecoder(reader)\ndefer dec.Close()\n\n// Read top-level fields into a struct\nfor dec.More() {\n    var entry FSEntry\n    if err := dec.UnmarshalNext(\u0026entry); err != nil {\n        break\n    }\n    process(entry)\n}\n```\n\n## .NET Library\n\nThe `dotnet/` directory contains a high-performance .NET implementation with source-generated serialization. See [dotnet/README.md](dotnet/README.md) for full details.\n\n```csharp\nusing Pakt;\nusing Pakt.Serialization;\n\n[PaktSerializable(typeof(Server))]\npublic partial class AppPaktContext : PaktSerializerContext { }\n\n// Deserialize\nvar server = PaktSerializer.Deserialize\u003cServer\u003e(paktBytes, AppPaktContext.Default);\n\n// Iterate pack statements\nawait using var reader = PaktStreamReader.Create(paktBytes, AppPaktContext.Default);\nwhile (await reader.ReadStatementAsync())\n{\n    if (reader.IsPack)\n        await foreach (var item in reader.ReadPackElements\u003cServer\u003e())\n            Process(item);\n    else\n        var value = reader.Deserialize\u003cServer\u003e();\n}\n```\n\n## Documentation\n\n- [PAKT Specification](spec/pakt-v0.md) — formal grammar and semantics\n- [PAKT Guide](docs/guide.md) — human-friendly introduction\n- [usepakt.dev](https://usepakt.dev) — website\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrippwill%2Fpakt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrippwill%2Fpakt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrippwill%2Fpakt/lists"}