{"id":13441696,"url":"https://github.com/gjsify/ts-for-gir","last_synced_at":"2026-05-26T20:01:19.542Z","repository":{"id":37492044,"uuid":"94258848","full_name":"gjsify/ts-for-gir","owner":"gjsify","description":"TypeScript type definition generator for GObject introspection interfaces","archived":false,"fork":false,"pushed_at":"2026-05-20T20:59:54.000Z","size":256296,"stargazers_count":285,"open_issues_count":2,"forks_count":22,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-05-20T21:57:44.337Z","etag":null,"topics":["dts","gir","gjs","glib","gnome","gobject","gobject-introspection","gtk","node-gtk","typescript"],"latest_commit_sha":null,"homepage":"https://gjsify.github.io/docs/","language":"TypeScript","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/gjsify.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2017-06-13T21:18:02.000Z","updated_at":"2026-05-20T20:59:58.000Z","dependencies_parsed_at":"2025-01-02T01:07:28.782Z","dependency_job_id":"b44bf073-606b-47dd-b24d-498ad5df4d67","html_url":"https://github.com/gjsify/ts-for-gir","commit_stats":{"total_commits":1290,"total_committers":17,"mean_commits":75.88235294117646,"dds":"0.22635658914728685","last_synced_commit":"a366faa3d1912cbce931d3f2d489efdf06306093"},"previous_names":["sammydre/ts-for-gjs"],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/gjsify/ts-for-gir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjsify%2Fts-for-gir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjsify%2Fts-for-gir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjsify%2Fts-for-gir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjsify%2Fts-for-gir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gjsify","download_url":"https://codeload.github.com/gjsify/ts-for-gir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjsify%2Fts-for-gir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33530347,"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":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"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":["dts","gir","gjs","glib","gnome","gobject","gobject-introspection","gtk","node-gtk","typescript"],"created_at":"2024-07-31T03:01:37.108Z","updated_at":"2026-05-26T20:01:19.366Z","avatar_url":"https://github.com/gjsify.png","language":"TypeScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/ts-for-gir_x4.png\" /\u003e\n  \u003ch1 align=\"center\"\u003eTS \u003csmall\u003efor\u003c/small\u003e GIR\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/gjsify/ts-for-gir/ci.yml\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/gjsify/ts-for-gir\" /\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/@ts-for-gir/cli\" /\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dw/@ts-for-gir/cli\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eTypeScript type definition generator for GObject introspection GIR files\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/feeling.gif\" /\u003e\n\u003c/p\u003e\n\n`ts-for-gir` generates accurate TypeScript definitions from [GObject Introspection](https://gi.readthedocs.io/en/latest/) for [GJS](https://gitlab.gnome.org/GNOME/gjs/) projects — strong typing, IDE jump-to-definition, autocompletion across the whole GNOME stack.\n\n📖 **Project page on the gjsify website**: [gjsify.github.io/gjsify/projects/ts-for-gir](https://gjsify.github.io/gjsify/projects/ts-for-gir/) — install paths, quickstart, generator usage, links to the related [Patterns](https://gjsify.github.io/gjsify/patterns/) docs.\n\nBrowse the full **[TypeScript API Documentation](https://gjsify.github.io/docs)** for GLib, GTK, GStreamer, and more.\n\n## Quick Start\n\n```bash\ngjsify dlx @ts-for-gir/cli create my-app   # no install, no Node.js\n# or\nnpx @ts-for-gir/cli create my-app          # via npm\n```\n\nPick a template interactively, or pass `--template \u003cid\u003e`:\n\n| Template | Best for |\n|---|---|\n| **`types-gjsify`** | Node-free GJS app — all dev scripts (install, build, run, format) routed through [gjsify](https://gjsify.github.io/gjsify/) |\n| **`types-npm`** | Single-package, types from [`@girs/*`](https://github.com/gjsify/types) NPM, esbuild + node |\n| **`types-locally`** | Generate types into `./@types/` (no `@girs/*` dep) |\n| **`types-workspace`** | npm workspace with `@girs/*` as locally-generated workspace packages |\n\n```bash\ncd my-app \u0026\u0026 npm start    # or `gjsify run start` for types-gjsify\n```\n\n## Installation\n\n### GJS — no Node.js required\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/gjsify/ts-for-gir/main/install.js -o /tmp/install.js\ngjs -m /tmp/install.js \u0026\u0026 rm /tmp/install.js\n```\n\nInstalls to `~/.local/bin/`. Update later with `ts-for-gir self-update`. Powered by [GJSify](https://gjsify.github.io/gjsify/).\n\nAlternative — if you already have the [gjsify CLI](https://gjsify.github.io/gjsify/) installed: `gjsify dlx @ts-for-gir/cli \u003cargs\u003e` (npx-style, no install) or `gjsify install -g @ts-for-gir/cli` (managed global).\n\n### Node.js\n\n```bash\nnpx @ts-for-gir/cli --help\n# or globally:\nnpm install -g @ts-for-gir/cli\n```\n\n## CLI Usage\n\n```bash\nts-for-gir generate Gtk-4.0                          # generate types for a single module\nts-for-gir generate Gtk-4.0 --reporter               # with diagnostics\nts-for-gir analyze -f ./ts-for-gir-report.json       # inspect the report\nts-for-gir --help                                    # all commands\n```\n\nSee the [CLI documentation](/packages/cli/README.md) for advanced options.\n\n## Pre-generated NPM Packages\n\nIf you just want the types without generating them yourself:\n\n```bash\nnpm install @girs/gjs @girs/gtk-4.0\n```\n\n```ts\nimport \"@girs/gjs\";\nimport \"@girs/gjs/dom\";\nimport \"@girs/gtk-4.0\";\n\nimport Gtk from \"gi://Gtk?version=4.0\";\n\nconst button = new Gtk.Button();\n```\n\nAll packages are listed at [gjsify/types](https://github.com/gjsify/types). Missing a module? [Open an issue](https://github.com/gjsify/ts-for-gir/issues).\n\n## Showcase\n\n**GNOME Applications**\n\n- [Audio Player](https://flathub.org/apps/org.gnome.Decibels) — Play audio files\n- [Counters](https://flathub.org/apps/io.gitlab.guillermop.Counters) — Keep track of anything\n- [Ignition](https://flathub.org/apps/io.github.flattool.Ignition) — Manage startup apps and scripts\n- [Learn 6502](https://flathub.org/apps/eu.jumplink.Learn6502) — Learn programming on vintage game consoles\n- [Sound Recorder](https://flathub.org/apps/org.gnome.SoundRecorder) — A simple, modern sound recorder\n- [Sticky Notes](https://flathub.org/apps/com.vixalien.sticky) — Pin notes to your desktop\n- [Weather](https://flathub.org/apps/org.gnome.Weather) — Show weather conditions and forecast\n- [K'uychi](https://flathub.org/en/apps/one.naiara.Kuychi) — Generate color palettes\n\n**GNOME Shell Extensions**\n\n- [gTile](https://github.com/gTile/gTile) — Tiling window management for GNOME Shell\n- [Copyous](https://github.com/boerdereinar/copyous) — Clipboard manager for GNOME Shell\n- [Rounded Window Corners](https://github.com/flexagoon/rounded-window-corners) — Add rounded corners to windows\n\n## Example Projects\n\nLooking for a starting point? These example projects demonstrate how to use the TypeScript definitions with various bundlers:\n\n- [GTK 4 Template with Vite](/examples/gtk-4-template-vite) — Modern UI with Vite bundling\n- [GNOME TypeScript Template](https://codeberg.org/nyx_lyb3ra/gnome-ts-template) — A template using GTK, libadwaita, TypeScript, Flatpak, and Meson\n\nMore examples with screenshots and descriptions can be found in the [Examples directory](/examples/README.md). For information on using the examples with different CLI options, refer to the [CLI documentation](/packages/cli/README.md#using-the-generated-types).\n\n## Project Structure\n\nts-for-gir consists of several packages:\n\n- [`@ts-for-gir/cli`](/packages/cli) — Command-line interface for generating TypeScript definitions, documentation, and analyzing reports\n- [`@gi.ts/parser`](/packages/parser) — Parser for GObject Introspection XML files\n- [`@ts-for-gir/lib`](/packages/lib) — Core library for processing GIR data\n- [`@ts-for-gir/reporter`](/packages/reporter) — Reporting system for problems and statistics with dependency injection\n- [`@ts-for-gir/generator-typescript`](/packages/generator-typescript) — TypeScript definition generator\n- [`@ts-for-gir/generator-json`](/packages/generator-json) — TypeDoc JSON generator with GIR metadata enrichment\n- [`@ts-for-gir/generator-html-doc`](/packages/generator-html-doc) — HTML documentation generator using TypeDoc\n- [`@ts-for-gir/generator-base`](/packages/generator-base) — Shared base class for generators\n- [`@ts-for-gir/typedoc-theme`](/packages/typedoc-theme) — Custom TypeDoc theme inspired by gi-docgen\n- [`@ts-for-gir/gir-module-metadata`](/packages/gir-module-metadata) — Curated metadata (descriptions, logos, licenses) for GIR namespaces\n- [`@ts-for-gir/templates`](/packages/templates) — Template files for generated packages (tsconfig, typedoc config, ambient declarations)\n- [`@ts-for-gir/tsconfig`](/packages/tsconfig) — Shared TypeScript configuration\n- [`@ts-for-gir/language-server`](/packages/language-server) — Language server for GIR files (experimental)\n\n### Submodules\n\nThis repo contains Git submodules for pre-generated types and documentation:\n\n- `types-dev` (branch `dev`) — used during local development. Scripts write generated packages here.\n- `types-release` (branch `main`) — updated by the release workflow on tags.\n- `docs` (branch `main`) — generated HTML documentation, deployed to [gjsify.github.io/docs](https://gjsify.github.io/docs).\n\nUseful scripts:\n\n```bash\ngjsify run build:types          # regenerate into ./types-dev\ngjsify run build:types:release  # regenerate into ./types-release\ngjsify run build:doc            # build HTML docs into ./docs\n```\n\n## Further Reading\n\n- [TypeScript API Documentation](https://gjsify.github.io/docs)\n- [Examples](/examples/README.md)\n- [CLI Documentation](/packages/cli/README.md)\n- [gjsify/types](https://github.com/gjsify/types) — pre-generated NPM packages\n- [gjsify/gnome-shell](https://github.com/gjsify/gnome-shell) — hand-written Shell Extension types\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjsify%2Fts-for-gir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgjsify%2Fts-for-gir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjsify%2Fts-for-gir/lists"}