Show HN: Skir – like Protocol Buffer but better
Source: Hacker News
The single source of truth for your data types
Skir is a declarative language for defining data types, constants, and APIs. Write your schema once in a .skir file and generate idiomatic, type‑safe code in TypeScript, Python, Java, C++, and more.
Quick Start
npx skir init

Code generation done right
- One YAML file. One command.
- Watch mode recompiles automatically.
- The generated code feels native to each language and is easy to use.
- The workflow is dead simple.
Serialize now, deserialize in 100 years
Modifying schemas in a long‑lived or distributed system is risky—one wrong move can break clients or make it impossible to deserialize old data. Skir provides simple guidelines and built-in checks to evolve your schema safely.

RPCs with end‑to‑end type safety
Define your API methods in Skir and invoke them like local functions a la gRPC. No more API contract mismatches between your frontend and backend or across microservices. Client and server are always in sync.
More features
Serialization to JSON or binary
Choose between dense JSON for web APIs and databases, readable JSON for debugging, or binary for raw performance.
Built‑in package manager
Stop copying files. Import types directly from any GitHub repository. Share common data structures across projects.
First‑class developer experience
A powerful VS Code extension with real‑time validation, code completion, automatic code formatting, and more.
Supported languages
Generate production‑ready code for all major programming languages.
Ready to get started?
Set up your first Skir project in minutes. Manage your entire project configuration from a single YAML file.