{"id":13451538,"url":"https://github.com/jkcfg/jk","last_synced_at":"2025-07-27T08:07:30.216Z","repository":{"id":33745338,"uuid":"153312936","full_name":"jkcfg/jk","owner":"jkcfg","description":"Configuration as Code with ECMAScript","archived":false,"fork":false,"pushed_at":"2023-01-04T21:42:33.000Z","size":1899,"stargazers_count":405,"open_issues_count":100,"forks_count":28,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-25T06:05:29.759Z","etag":null,"topics":["configuration","ecmascript","hcl","json","kubernetes","v8","yaml"],"latest_commit_sha":null,"homepage":"https://jkcfg.github.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkcfg.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}},"created_at":"2018-10-16T15:52:49.000Z","updated_at":"2025-05-15T11:27:16.000Z","dependencies_parsed_at":"2023-01-15T02:19:09.480Z","dependency_job_id":null,"html_url":"https://github.com/jkcfg/jk","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/jkcfg/jk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcfg%2Fjk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcfg%2Fjk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcfg%2Fjk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcfg%2Fjk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkcfg","download_url":"https://codeload.github.com/jkcfg/jk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkcfg%2Fjk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267319489,"owners_count":24068508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["configuration","ecmascript","hcl","json","kubernetes","v8","yaml"],"created_at":"2024-07-31T07:00:55.477Z","updated_at":"2025-07-27T08:07:30.209Z","avatar_url":"https://github.com/jkcfg.png","language":"Go","funding_links":[],"categories":["Go","Configuration Management"],"sub_categories":[],"readme":"# jk\n\n[![Build Status](https://travis-ci.org/jkcfg/jk.svg?branch=master)](https://travis-ci.org/jkcfg/jk)\n\nCaveat: jk is pre-1.0, and as such, features, commands, and APIs inevitably\nwill change.\n\nReleases within a minor version should be stable; we try to signal breaking\nchanges ahead of time in [./docs/deprecations.md](./docs/deprecations.md).\n\n## jk - configuration as code\n\n`jk` is a data templating tool designed to help writing structured\nconfiguration files.\n\nThe main idea behind `jk` is to use a general purpose language for this task.\nThey offer mature tooling, great runtimes, a well established ecosystem and\nmany learning resources. `jk` uses Javascript and a runtime tailored for\nconfiguration.\n\n## Quick start\n\nA good way to start with `jk` is to read our [introduction tutorial][quick-start].\nFor more context head to our [introduction blog post][blog-0]!\n\n## More complex examples\n\n- [A Kubernetes deployment written in Typescript][guestbook-ts]\n- [Generating Kubernetes objects, using e.g., kustomize-like behavior][k8s-examples]\n- [Using jk with JavaScript libraries][js-examples]\n\n## Architecture \u0026 design\n\n### v8\n\n`jk` itself is a Javascript runtime written in Go and embedding [v8][v8]. It\nuses Ryan Dahl's [v8worker2][v8worker2] to embed v8 and\n[flatbuffers][flatbuffers] for the v8 ⟷ Go communication.\n\n### Hermeticity\n\nWhile a general purpose language is great, configuration code can be made\nmore maintainable by restricting what it can do. A nice property `jk` has to\noffer is being *hermetic*: if you clone a git repository\nand execute a `jk` script, the resulting files should be the same on any\nmachine. To give concrete examples, this means the `jk` standard library\ndoesn't support environment variables nor has any networking capability.\n\n### Library support\n\n`jk` provides an unopinionated data templating layer. On top of the `jk`\nruntime, libraries provide APIs for users to write configuration.\n\n- [kubernetes][kubernetes]: build Kubernetes objects\n- [grafana][grafana]: build dashboard configs for Grafana\n\n## Roadmap\n\nThis project is still in early stages but future (exciting!) plans include:\n\n- Reach the state of having Kubernetes examples working and well documented.\n- Work on hermeticity. (eg. [#110][issue110], [#44][issue44], [topic/hermeticity][issueHermeticity]).\n- Native typescript support ([#54][issue54]).\n- HCL support ([#94][issue94]).\n\n[v8]: https://v8.dev/\n[blog-0]: https://damien.lespiau.name/posts/2019-06-12-jk-configuration-as-code/\n[quick-start]: https://jkcfg.github.io/#/documentation/quick-start\n[grafana]: https://github.com/jkcfg/grafana\n[kubernetes]: https://github.com/jkcfg/kubernetes\n[guestbook-ts]: https://github.com/jkcfg/kubernetes/blob/master/examples/guestbook-ts\n[js-examples]: https://github.com/jkcfg/jk/tree/master/examples\n[k8s-examples]: https://github.com/jkcfg/jk/tree/master/examples/kubernetes\n[v8worker2]: https://github.com/ry/v8worker2\n[flatbuffers]: https://github.com/google/flatbuffers\n\n[issue44]: https://github.com/jkcfg/jk/issues/44\n[issue54]: https://github.com/jkcfg/jk/issues/54\n[issue94]: https://github.com/jkcfg/jk/issues/94\n[issue110]: https://github.com/jkcfg/jk/issues/110\n[issueHermeticity]: https://github.com/jkcfg/jk/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%2Fhermeticity\n\n## Contributing\nWhen contributing to this repository, please first discuss the change you wish to make via issue with the owners of this repository before making a change.\n\n### Setup\nThe `jk` executable itself is written in [Go](https://golang.org), but the JavaScript part of this project requires [NodeJS](https://nodejs.org).\n\n**Prerequisites:**\n* `go` 1.11.4 or later (modules support)\n* `nodejs`, `npm`\n* `make`\n* `pkg-config`\n\nFirst off, clone this repository:\n```bash\n$ git clone https://github.com/jkcfg/jk.git\n# or with hub:\n$ hub clone jkcfg/jk\n\n$ cd ./jk\n```\n\nThen pull most of the dependencies using the `Makefile`:\n```bash\n$ make dep\n```\n\n`jk` is linked against [`v8worker2`](https://github.com/jkcfg/v8worker2). As building V8 takes ~30 minutes, [prebuilt versions](https://github.com/jkcfg/prebuilt) are provided for `linux/amd64` and `darwin/amd64`. This also includes `flatc` from `flatbuffers`:\n```bash\n# download the prebuilt artifacts from GitHub:\n$ git clone https://github.com/jkcfg/prebuilt.git\n$ cd ./prebuilt\n\n# these following put files in /usr/local, so you may need sudo\n\n# x64 Linux:\n$ make install-linux-amd64\n\n# x64 macOS:\n$ make install-darwin-amd64\n```\n\n### Building\nAfter setting up the environment, the `jk` binary can be built:\n```bash\n$ make jk\n$ ./jk --help # confirm it works\n```\n\nAdditionally, on Linux, it's possible to use a docker container to build the project instead of installing the prebuilt libraries and binaries:\n```bash\n$ ./run-in-docker.sh make dep jk\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkcfg%2Fjk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkcfg%2Fjk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkcfg%2Fjk/lists"}