{"id":37227412,"url":"https://github.com/peartreegames/topiary","last_synced_at":"2026-05-03T19:03:51.542Z","repository":{"id":181930290,"uuid":"603601420","full_name":"peartreegames/topiary","owner":"peartreegames","description":"Dialogue Scripting Language","archived":false,"fork":false,"pushed_at":"2026-01-10T17:08:39.000Z","size":3956,"stargazers_count":15,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T01:45:33.874Z","etag":null,"topics":["dialogue","narrative","narrative-design","narrative-game","scripting-games","scripting-language","video-game","video-game-development"],"latest_commit_sha":null,"homepage":"https://peartree.games/topiary","language":"Zig","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/peartreegames.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-19T02:18:47.000Z","updated_at":"2026-01-10T17:08:38.000Z","dependencies_parsed_at":"2023-07-23T20:31:07.475Z","dependency_job_id":"7fc91aed-7aa9-4eeb-9ab0-39ce9edab60c","html_url":"https://github.com/peartreegames/topiary","commit_stats":null,"previous_names":["peartreegames/topiary"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/peartreegames/topiary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peartreegames%2Ftopiary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peartreegames%2Ftopiary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peartreegames%2Ftopiary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peartreegames%2Ftopiary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peartreegames","download_url":"https://codeload.github.com/peartreegames/topiary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peartreegames%2Ftopiary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":["dialogue","narrative","narrative-design","narrative-game","scripting-games","scripting-language","video-game","video-game-development"],"created_at":"2026-01-15T03:21:17.962Z","updated_at":"2026-05-03T19:03:51.534Z","avatar_url":"https://github.com/peartreegames.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://github.com/peartreegames/topiary/blob/main/assets/logo_horizontal_outline.png)\n\nTopiary is a dialogue scripting tool which uses the Topi language to write interactive stories.\nIt is designed to be integrated into video games which require a large amount of state and control flow in their dialogue.\n\nThink of Topiary as programming a screenplay for your video game.\n\nIt is written in [Zig](https://ziglang.org).\n\n## Usage\n\nThe CLI tool is a very simple runner that can be used as a starting point. \nIt will compile a file, and run your story in the terminal.\nIt is recommended to start there to see how you can use topiary in your projects.\n\nTo run the CLI:\n\n```sh\nzig build // or download from release page\n./zig-out/bin/topi run ./examples/hello.topi\n```\n\nYou can then press `enter` for the next line,\nand select a choice with `0-9` then `enter`\n\n## Writing in Topi\n\nYou can view a full breakdown in the [syntax](https://github.com/peartreegames/topiary/blob/main/docs/syntax.md) file,\nthe [CLI reference](https://github.com/peartreegames/topiary/blob/main/docs/cli.md),\nand examples in the [example folder](https://github.com/peartreegames/topiary/tree/main/examples).\n\nHere you can see what writing in topi looks like\n\n```topi\n=== START {\n    :User: \"How does this work?\"\n    :Author: \"You write your dialogue like this, then you can use the compiler and virtual matchine to run it in game.\"\n    fork TOPIC {\n        ~ \"What does the compiler do?\" {\n            :Author: \"The compiler will take your source code and convert it into bytecode.\"\n            :Author: \"With that you can either pass it directly to the virtual machine, or serialize it to save to a file.\"\n            =\u003e TOPIC\n        }\n        ~ \"What does the virtual machine do?\" {\n            :Author: \"The virtual machine will take the bytecode and a runner and process each line of code, dialogue, and choices.\"\n            :Author: \"The runner has two functions, onLine, and onChoice. Which will be called and used to call your game code.\"\n            =\u003e TOPIC\n        }\n        ~ \"Okay, thanks.\" :Author: \"Let me know in the issues if you have any questions!\"\n    }\n}\n```\n\n## Future\n\nTopiary is in early development and still has a long way to go.\nPlease check the Issues tab on the repo to see features I'd like to implement.\n\n## Credits\n\nFirst off this project never would have been attempted without first being inspired by [Ink](https://github.com/inkle/ink) and [Yarn Spinner](https://yarnspinner.dev). \n\nSecondly writing my own language would have never been attempted without the wonderfully written books on [Crafting Interpreters](https://craftinginterpreters.com) by Robert Nystrom and [Writing an Interpreter/Complier in Go](https://interpreterbook.com)\nby Thorsten Ball. \n\nLastly when I started on this project I was fairly new to Zig, so I have to thank two other projects [Luf](https://github.com/Luukdegram/luf/tree/master), \nand [LoLa](https://github.com/MasterQ32/LoLa/tree/master) both of which are credited in the Licence since their parsers were used as inspiration when starting out.\n\n## Contributing\n\nDownload and install [Zig](https://ziglang.org). Currently Topiary uses version `0.16.0`\n\n```\ngit clone https://github.com/peartreegames/topiary\ncd topiary\nzig build\n```\n\nI'm confident there are many areas of improvement so please feel free to submit pull requests.\nThis is my first time writing a compiler, and I'm definitely don't understand everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeartreegames%2Ftopiary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeartreegames%2Ftopiary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeartreegames%2Ftopiary/lists"}