{"id":13561094,"url":"https://github.com/yaml/yamlscript","last_synced_at":"2026-06-12T23:01:20.563Z","repository":{"id":45402045,"uuid":"510139682","full_name":"yaml/yamlscript","owner":"yaml","description":"Programming in YAML","archived":false,"fork":false,"pushed_at":"2026-06-07T19:20:25.000Z","size":38422,"stargazers_count":622,"open_issues_count":17,"forks_count":60,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-06-07T20:04:28.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/yaml.png","metadata":{"files":{"readme":"ReadMe.md","changelog":"Changes","contributing":"Contributing.md","funding":null,"license":"License","code_of_conduct":".github/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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-03T21:31:31.000Z","updated_at":"2026-06-07T18:36:53.000Z","dependencies_parsed_at":"2024-02-12T05:25:16.256Z","dependency_job_id":"848c2164-df8f-4bfb-b5c6-8ed4c89b811a","html_url":"https://github.com/yaml/yamlscript","commit_stats":{"total_commits":853,"total_committers":13,"mean_commits":65.61538461538461,"dds":0.05392731535756157,"last_synced_commit":"b00b86c41aae7e17501183dde42110112dde52a4"},"previous_names":["ingydotnet/yamlscript"],"tags_count":148,"template":false,"template_full_name":null,"purl":"pkg:github/yaml/yamlscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaml","download_url":"https://codeload.github.com/yaml/yamlscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamlscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34265491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["hacktoberfest"],"created_at":"2024-08-01T13:00:52.448Z","updated_at":"2026-06-12T23:01:20.555Z","avatar_url":"https://github.com/yaml.png","language":"Clojure","funding_links":[],"categories":["others","Clojure","hacktoberfest","Configuration Management","\u003ca name=\"Clojure\"\u003e\u003c/a\u003eClojure"],"sub_categories":[],"readme":"YS / YAMLScript\n===============\n\nProgram in YAML — Code is Data\n\n\n## About YS / YAMLScript\n\n**[YS](https://yamlscript.org) (aka YAMLScript) is a new YAML loader** for 15\n(and counting) programming languages:  \n[C#](https://www.nuget.org/packages/YAMLScript/),\n[Clojure](https://clojars.org/org.yamlscript/clj-yamlscript),\n[Crystal](https://shardbox.org/shards/yamlscript),\n[Go](https://github.com/yaml/yamlscript-go),\n[Haskell](https://hackage.haskell.org/package/yamlscript),\n[Java](https://clojars.org/org.yamlscript/yamlscript),\n[Julia](https://juliahub.com/ui/Packages/General/YAMLScript),\n[Lua](https://luarocks.org/modules/ingy/yamlscript),\n[NodeJS](https://www.npmjs.com/package/@yaml/yamlscript),\n[Perl](https://metacpan.org/pod/YAMLScript),\n[PHP](https://packagist.org/packages/yaml/yamlscript),\n[Python](https://pypi.org/project/yamlscript/),\n[Raku](https://raku.land/zef:ingy/YAMLScript),\n[Ruby](https://rubygems.org/gems/yamlscript) and\n[Rust](https://crates.io/crates/yamlscript).\n\nTry using YS in place of your current YAML loader!\n\n* It's as easy to use as your current YAML loader\n  * Loads your existing YAML files properly\n* It works the same way in every programming language\n  * Same API, same features, same bugs, same bug fixes\n* YS has optional functional programming features\n  * File imports, string interpolation, standard library, etc\n  * Everything a compiled programming language has\n\nHow can YS offer all this?\n\n**YS is also a functional programming language!**\n\nLike [PyYAML](https://pyyaml.org/) and many other YAML loaders, YS is\nimplemented to the [YAML 1.2 specification](https://yaml.org/spec/1.2.2/).\nBut instead of loading YAML into directly into its intended data structure, a YS\nloader loads YAML into a Lisp AST (abstract syntax tree) data structure.\nThe AST is then rendered into Lisp code and evaluated by a full-featured\nruntime, resulting in the intended data structure.\n\nThe specific Lisp is [Clojure](https://clojure.org/), which is very capable,\nmature and well-documented programming language with a large ecosystem of\nlibraries and tools.\n\n\u003e Note: You may be aware that Clojure is a JVM hosted language (and also a\n\u003e JavaScript hosted one via ClojureScript), but YS doesn't need either of those.\n\u003e YS is compiled to a native binary executable and also a native shared library.\n\u003e The shared library can be used by nearly any programming language, including\n\u003e the ones listed above.\n\nNot only can you use YS as a loader library from a programming language, but you\ncan also use it from the command line with the `ys` command.\n\nYS is awesome for:\n\n* Querying, manipulating and transforming YAML (and JSON) files\n  * Outputs include YAML, JSON, CSV, TSV and EDN\n* Refactoring large monolithic YAML files into smaller, more manageable files\n* Using data from external sources in your YAML files\n  * Files, web, databases, APIs, shell commands, etc\n* Applying over 1000 built-in functions to your YAML data\n* Using YS libraries for even more functionality\n* Writing complete programs, applications, automation scripts\n\n**YS is an official language on the\n[Exercism](https://exercism.org/tracks) (free) language learning site!**  \nIt's a great way to learn how to program in YS.\n\n\n## A Quick Example\n\nFirst you'll need to install `ys` and/or `libys`.\nYou can install them both to `~/.local/bin/ys` and `~/.local/lib/libys.so`\nrespectively, with this single command:\n```bash\ncurl https://yamlscript.org/install | bash\n```\n\n\u003e See [Installing YS](https://yamlscript.org/doc/install/) for full details.\n\nNow say you have a file called `file.yaml` that looks like this:\n```yaml\nname: Fido\nage: 6\ndog years: 42\nlikes: [running, fetching, playing, treats]\n```\n\nYou can load it with:\n```bash\nys --json file.yaml\n```\n\nAnd get this output:\n```json\n{\"name\":\"Fido\",\n \"age\":6,\n \"dog years\":42,\n \"likes\":[\"fetching\", \"playing\", \"running\", \"treats\"]}\n```\n\nNothing special here.\nYS is 100% compatible with existing YAML files, so this is just what you'd\nexpect.\n\nBut here's where it gets interesting...\nLet's say you want to add some dynamic logic:\n\n```yaml\n!ys-0:\nage =: 6\n\nname: Fido\nage:: age\ndog years:: age * 7\nlikes::\n  sort:: [running, fetching, playing, treats]\n```\n\nThe first line is a special tag that tells YS that this file may contain code.\nThe `age =: 6` sets a variable, and the `::` tells YS that the value is a code\nexpression, not a data value.\nWe've also used the standard `sort` function to sort the `likes` list.\n\nLet's load it via a Python using the `yamlscript.py` module this time:\n```bash\npython3 -c '\nimport json, yamlscript;\nprint(json.dumps(yamlscript.YAMLScript()\n                 .load(open(\"file.yaml\").read())))' \n{\"name\": \"Fido\", \"age\": 6, \"dog years\": 42,\n \"likes\": [\"fetching\", \"playing\", \"running\", \"treats\"]}\n```\n\nThe good stuff is all sorted and the dog years are calculated automatically!\n\n\n## Real-World Examples\n\nWant to merge multiple YAML files with environment variable overrides?\n\n```yaml\n!ys-0:\nconfig =:\n  merge:\n    load: 'base-config.yaml'\n    load: 'prod-config.yaml'\n\ndatabase:\n  host:: config.database.host\n  port:: config.database.port || 5432\n  ssl:: ENV.environment == 'production'\n```\n\nNeed to transform data from an API?\n\n```yaml\n!ys-0:\nusers =: http/get('https://api.example.com/users'):json/load\n\nactive-users::\n  map user-data:\n    filter users:\n      fn(u):\n        (u.status == 'active') \u0026\u0026\n        (u.lastLogin \u003e date('-30d'))\n\ndefn user-data(u)::\n  name:: \"$(u.firstName) $(u.lastName)\"\n  email:: u.email\n  role:: u.role:uc\n```\n\n\u003c!--\nWant to generate Kubernetes manifests dynamically?\n\n```yaml\n!ys-0:\napps =: ['web', 'api', 'worker']\nreplicas =: ENV.PRODUCTION ? 3 : 1\n\ndeployments::\n  apps:map(fn [app] =\u003e\n    apiVersion: 'apps/v1'\n    kind: 'Deployment'\n    metadata:\n      name: app\n      labels:\n        app: app\n    spec:\n      replicas: replicas\n      selector:\n        matchLabels:\n          app: app\n      template:\n        spec:\n          containers:\n          - name: app\n            image: \"mycompany/$app:$ENV.VERSION\"\n            resources:\n              limits:\n                memory: ENV.\"${app:upper-case()}_MEMORY\" || '512Mi'\n                cpu: ENV.\"${app:upper-case()}_CPU\" || '500m')\n```\n--\u003e\n\n\n## Getting Started with YS\n\nThere are two primary ways to use YS:\n\n* Using the `ys` command line runner / loader / compiler / installer\n* Using a YAMLScript library in your own programming language\n\nThe `ys` command line tool is the easiest way to get started with YS.\nYou can use it to load / evaluate / transform YAML files and print the result as\nYAML, JSON, CSV, TSV, or EDN.\nOr you can use it to run programs written in YS.\n\nYou can also use YS as a library in your own programming language.\nFor example, in Python you can use the `yamlscript` module like this:\n\n```python\nfrom yamlscript import YAMLScript\nys = YAMLScript()\ntext = open(\"foo.yaml\").read()\ndata = ys.load(text)\n```\n\n\n### Supported Operating Systems\n\nYS is supported on these operating systems:\n\n* Linux\n* macOS\n* Windows  (coming soon)\n\nYS is supported on these architectures:\n\n* Intel/AMD (`x86_64`)\n* ARM (`aarch64`)\n\nFor now other systems cannot be supported because `ys` and `libys` are compiled\nby GraalVM's `native-image` tool, which only supports the above systems.\nHowever, work is underway to have YS use alternate runtimes such as JVM, Go,\nJavaScript and WebAssembly.\n\n\n## Usage Examples in Your Language\n\nHere's some examples of how to use YS in a few different programming languages.\nUsage in other languages is similar.\n\n**Python:**\n```python\nimport yamlscript\nys = yamlscript.YAMLScript()\nconfig = ys.load(open('config.yaml').read())\n```\n\n**JavaScript/Node:**\n```javascript\nYS = require('@yaml/yamlscript');\nys = new YS();\nconfig = ys.load(fs.readFileSync('config.yaml', 'utf8'));\n```\n\n**Go:**\n```go\nimport \"github.com/yaml/yamlscript-go\"\ndata, err := ys.Load(yamlContent)\n```\n\n**Ruby:**\n```ruby\nrequire 'yamlscript'\nys = YAMLScript.new\nconfig = ys.load(File.read('config.yaml'))\n```\n\n\n## Why Choose YS?\n\n* **🔧 Reliability** -\n  Same implementation across all languages means consistent behavior\n* **📦 Zero Dependencies** -\n  Single shared library with no runtime dependencies\n* **🎯 100% YAML Compatible** -\n  Works with all your existing YAML files today\n* **🚀 Performance** -\n  Native compiled code runs as fast or faster than Python/Perl\n* **💪 Powerful When Needed** -\n  Access to 1000+ built-in functions and full Clojure ecosystem\n* **🌐 Universal** -\n  One syntax to learn, use everywhere\n\n\n## Claude Code Plugin\n\nYS has an official [Claude Code](https://claude.ai/code) plugin that\nteaches Claude to write idiomatic YAMLScript.\nInstall it in Claude Code with:\n\n```\n/plugin marketplace add yaml/yamlscript\n/plugin install ys-skill@yamlscript\n```\n\nSee [ai/claude/ReadMe.md](ai/claude/ReadMe.md) for more details.\n\n\n## The YS Repository\n\nThe [YS source code repository](https://github.com/yaml/yamlscript)\nis a mono-repo containing:\n\n* The YS compiler code\n* The YS shared library code\n* A YS binding module for each programming language\n* The YS test suite\n* The YS documentation\n* The yamlscript.org website (with docs, blog, wiki, etc)\n\n\n### `make` It So\n\nThe YS repository uses a `Makefile` system to build, test and install its\nvarious offerings.\nIt installs (locally within this directory) all the dependencies you need to\nbuild and test YS, including every programming language needed by the bindings.\n\nThere is a top level `Makefile` and each repo subdirectory has its own\n`Makefile`.\nWhen run at the top level, many `make` targets like `test`, `build`, `install`,\n`clean`, `distclean`, etc will invoke that target in each relevant subdirectory.\n\nGiven that this repository has so few dependencies, you should be able to clone\nit and run `make` targets (try `make test`) without any problems.\n\n\n### Contributing to YS\n\nThis project aims to have a binding implementation for each every programming\nlanguage where YAML is used.\n\nIf you would like to contribute a new YS binding for a programming language,\nyou are encouraged to\n[submit a pull request](https://github.com/yaml/yamlscript/pulls) to this\nrepository.\n\nSee the YS [Contributing Guide](\nhttps://github.com/yaml/yamlscript/tree/main/Contributing.md) for more details.\n\n\n## YS Resources\n\n* [YS Documentation](https://yamlscript.org/doc/)\n* [YS Blog](https://yamlscript.org/blog/)\n* [Learn YS at Exercism](http://exercism.org/tracks/yamlscript)\n* [Example YS Programs on RosettaCode.org](\n  https://rosettacode.org/wiki/Category:YAMLScript)\n\n\n## Authors\n\n* [Ingy döt Net](https://github.com/ingydotnet) - Creator / Lead\n* [Ven de Thiel](https://github.com/vendethiel) - Language design mentor\n* [Delon R.Newman](https://github.com/delonnewman) - Clojure, Java and Ruby\n* [Josephine Pfeiffer](https://github.com/pfeifferj) - Crystal binding\n* [Andrew Pam](https://github.com/xanni) - Go binding\n* [Kenta Murata](https://github.com/mrkn) - Julia binding\n* [José Joaquín Atria](https://github.com/jjatria) - Perl binding\n* [tony-o](https://github.com/tony-o) - Raku binding\n* [Ethiraric](https://github.com/Ethiraric) - Rust binding\n\n\n## Copyright and License\n\nCopyright 2022-2025 by Ingy döt Net\n\nThis is free software, licensed under:\n\nThe MIT (X11) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyamlscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaml%2Fyamlscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaml%2Fyamlscript/lists"}