create-gtkx 0.21.0 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +173 -0
  2. package/bin/create-gtkx.js +1 -4
  3. package/dist/cli.d.ts +1 -23
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +6 -11
  6. package/dist/cli.js.map +1 -1
  7. package/dist/command.d.ts +47 -55
  8. package/dist/command.d.ts.map +1 -1
  9. package/dist/command.js +54 -47
  10. package/dist/command.js.map +1 -1
  11. package/dist/index.d.ts +1 -4
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/{options.d.ts → package-managers.d.ts} +7 -9
  16. package/dist/package-managers.d.ts.map +1 -0
  17. package/dist/package-managers.js +9 -0
  18. package/dist/package-managers.js.map +1 -0
  19. package/dist/project-name.d.ts +2 -0
  20. package/dist/project-name.d.ts.map +1 -0
  21. package/dist/project-name.js +2 -0
  22. package/dist/project-name.js.map +1 -0
  23. package/dist/scaffolder.d.ts +6 -45
  24. package/dist/scaffolder.d.ts.map +1 -1
  25. package/dist/scaffolder.js +208 -117
  26. package/dist/scaffolder.js.map +1 -1
  27. package/{templates/gitignore.ejs → dist/templates/.gitignore.ejs} +0 -1
  28. package/{templates → dist/templates}/gtkx.config.ts.ejs +1 -1
  29. package/{templates → dist/templates}/package.json.ejs +8 -2
  30. package/{templates → dist/templates}/src/app.tsx.ejs +4 -8
  31. package/{templates → dist/templates}/src/index.tsx.ejs +1 -1
  32. package/{templates → dist/templates}/tests/app.test.tsx.ejs +5 -8
  33. package/{templates → dist/templates}/tsconfig.json.ejs +2 -0
  34. package/{templates/config → dist/templates}/vitest.config.ts.ejs +2 -3
  35. package/dist/templates.d.ts +3 -3
  36. package/dist/templates.d.ts.map +1 -1
  37. package/dist/templates.js +8 -16
  38. package/dist/templates.js.map +1 -1
  39. package/package.json +19 -15
  40. package/src/cli.ts +6 -11
  41. package/src/command.ts +62 -60
  42. package/src/index.ts +1 -4
  43. package/src/package-managers.ts +14 -0
  44. package/src/project-name.ts +1 -0
  45. package/src/scaffolder.ts +253 -169
  46. package/src/templates/.gitignore.ejs +3 -0
  47. package/src/templates/gtkx.config.ts.ejs +6 -0
  48. package/src/templates/package.json.ejs +22 -0
  49. package/src/templates/src/app.tsx.ejs +44 -0
  50. package/src/templates/src/gtkx-env.d.ts.ejs +2 -0
  51. package/src/templates/src/index.tsx.ejs +4 -0
  52. package/src/templates/tests/app.test.tsx.ejs +13 -0
  53. package/src/templates/tsconfig.json.ejs +16 -0
  54. package/src/templates/vitest.config.ts.ejs +10 -0
  55. package/src/templates.ts +11 -22
  56. package/dist/create.d.ts +0 -3
  57. package/dist/create.d.ts.map +0 -1
  58. package/dist/create.js +0 -7
  59. package/dist/create.js.map +0 -1
  60. package/dist/deps.d.ts +0 -3
  61. package/dist/deps.d.ts.map +0 -1
  62. package/dist/deps.js +0 -51
  63. package/dist/deps.js.map +0 -1
  64. package/dist/options.d.ts.map +0 -1
  65. package/dist/options.js +0 -13
  66. package/dist/options.js.map +0 -1
  67. package/src/create.ts +0 -7
  68. package/src/deps.ts +0 -51
  69. package/src/options.ts +0 -24
  70. package/templates/claude/EXAMPLES.md.ejs +0 -790
  71. package/templates/claude/SKILL.md.ejs +0 -126
  72. package/templates/claude/WIDGETS.md.ejs +0 -934
  73. /package/{templates → dist/templates}/src/gtkx-env.d.ts.ejs +0 -0
package/README.md ADDED
@@ -0,0 +1,173 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/logo.svg" alt="GTKX" width="100" />
3
+ </p>
4
+
5
+ <h1 align="center">GTKX</h1>
6
+
7
+ <p align="center">
8
+ The React framework for Linux.<br />
9
+ Build GTK4 and Adwaita apps in TypeScript, with React components and hooks driving GNOME's own widgets. What you ship is a GNOME app.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/v/create-gtkx?color=cb3837&logo=npm&label=create-gtkx" alt="npm version" /></a>
14
+ <a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/dm/create-gtkx?color=cb3837&logo=npm&label=downloads" alt="npm downloads" /></a>
15
+ <img src="https://img.shields.io/badge/node-%E2%89%A524-339933?logo=node.js&logoColor=white" alt="Node >= 24" />
16
+ <a href="https://github.com/gtkx-org/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License: MPL-2.0" /></a>
17
+ <a href="https://github.com/gtkx-org/gtkx/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/gtkx-org/gtkx/ci.yml?branch=main&logo=github&label=CI" alt="CI status" /></a>
18
+ <img src="https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white" alt="TypeScript" />
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="https://gtkx.dev">Homepage</a> &middot;
23
+ <a href="https://gtkx.dev/guide/why-gtkx">Documentation</a> &middot;
24
+ <a href="https://github.com/gtkx-org/gtkx/tree/main/examples">Examples</a> &middot;
25
+ <a href="https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md">Contributing</a>
26
+ </p>
27
+
28
+ ---
29
+
30
+ GTKX generates fully typed bindings for the entire GTK4 and Adwaita surface directly from GObject-Introspection. On top of those bindings you get the React programming model: components and hooks driving GObject instances, with Fast Refresh while you develop.
31
+
32
+ <p align="center">
33
+ <img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/examples/tutorial/assets/screenshot.png" alt="The Tasks app: an Adwaita window with a sidebar of smart views and colored lists on the left, and a boxed task list on the right." />
34
+ </p>
35
+
36
+ <p align="center">
37
+ <em>The Tasks app you build in the <a href="https://gtkx.dev/tutorial/">tutorial</a>.</em>
38
+ </p>
39
+
40
+ ## Demo
41
+
42
+ The intrinsic elements in this snippet render GTK4 widgets, and ordinary React hooks and events drive them:
43
+
44
+ ```tsx
45
+ import * as Gtk from "@gtkx/gi/gtk";
46
+ import { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
47
+ import { createRoot, quit } from "@gtkx/react";
48
+ import { useState } from "react";
49
+
50
+ const Counter = () => {
51
+ const [count, setCount] = useState(0);
52
+
53
+ return (
54
+ <GtkApplicationWindow
55
+ title="Hello GTKX"
56
+ defaultWidth={400}
57
+ defaultHeight={300}
58
+ onCloseRequest={quit}
59
+ >
60
+ <GtkBox
61
+ orientation={Gtk.Orientation.VERTICAL}
62
+ spacing={20}
63
+ marginTop={40}
64
+ marginBottom={40}
65
+ marginStart={40}
66
+ marginEnd={40}
67
+ valign={Gtk.Align.CENTER}
68
+ halign={Gtk.Align.CENTER}
69
+ >
70
+ <GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
71
+ <GtkLabel cssClasses={["title-2"]}>{`Count: ${count}`}</GtkLabel>
72
+ <GtkButton
73
+ label="Increment"
74
+ onClicked={() => setCount((c) => c + 1)}
75
+ cssClasses={["suggested-action", "pill"]}
76
+ />
77
+ </GtkBox>
78
+ </GtkApplicationWindow>
79
+ );
80
+ };
81
+
82
+ const App = () => (
83
+ <GtkApplication>
84
+ <Counter />
85
+ </GtkApplication>
86
+ );
87
+
88
+ createRoot().render(<App />);
89
+ ```
90
+
91
+ This is the [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world) example, with `app.tsx` and `index.tsx` combined into a single snippet. `@gtkx/gi` and `@gtkx/jsx` are per-project bindings generated by the CLI, not packages you install from npm.
92
+
93
+ ## Why GTKX
94
+
95
+ ### A declarative layer for the GNOME stack
96
+
97
+ GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing re-renders that interface when your application state changes, and nothing hot-reloads it as you work. GTKX adds that missing layer, and the tooling around it, on top of the stack you already know:
98
+
99
+ - a React reconciler that exposes every GObject as a JSX element,
100
+ - a CLI for scaffolding, development, and production builds,
101
+ - a dev server with Fast Refresh that patches your running UI in place,
102
+ - CSS-in-JS styling and high-level list, grid, and dialog components,
103
+ - a Testing Library-style API for querying and driving your widgets in tests,
104
+ - and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
105
+
106
+ ### The full GNOME API surface
107
+
108
+ React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX exposes it: GTK4, Adwaita, and any other GObject-Introspection library on your system. Linux-only by design.
109
+
110
+ ### Why Node.js, and why generated bindings
111
+
112
+ GTKX runs on Node.js, which puts native modules, the npm ecosystem, and the tooling built for Node.js APIs within reach. GJS is GNOME's own runtime, built on SpiderMonkey rather than V8; node-gtk runs on Node.js but is lightly maintained, on the older nan/V8 ABI rather than N-API, and still centered on GTK3. The [why-gtkx guide](https://gtkx.dev/guide/why-gtkx) covers the comparison in full.
113
+
114
+ GTKX generates the TypeScript types and the native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. Codegen covers the whole GTK4 and Adwaita surface.
115
+
116
+ At runtime, the native Rust core calls straight into the system GTK4, Adwaita, and GLib libraries through libffi, without loading libgirepository at all.
117
+
118
+ ## Quick start
119
+
120
+ GTKX is Linux-only and needs Node.js 24 or later. See [Requirements](#requirements).
121
+
122
+ Scaffold a new app with the `create-gtkx` initializer:
123
+
124
+ ```sh
125
+ npm create gtkx@rc
126
+ ```
127
+
128
+ The same command works with other package managers: `pnpm create gtkx@rc` or `yarn create gtkx@rc`.
129
+
130
+ Then run your new app:
131
+
132
+ ```sh
133
+ cd my-app
134
+ npm run dev
135
+ ```
136
+
137
+ To go further, follow the [tutorial](https://gtkx.dev/tutorial/).
138
+
139
+ ## Documentation
140
+
141
+ The documentation at **[gtkx.dev](https://gtkx.dev)** includes a step-by-step tutorial that builds a complete GNOME app, from scaffolding to packaging and shipping, plus guides and a full API reference.
142
+
143
+ **[Read the docs &rarr;](https://gtkx.dev/guide/why-gtkx)**
144
+
145
+ ## Requirements
146
+
147
+ GTKX is Linux-only. You need:
148
+
149
+ - Linux with the GTK4 (4.20 or later), Adwaita (1.8 or later), and GLib development libraries
150
+ - Node.js 24 or later
151
+
152
+ The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other targets need to build it from the GTKX repository, which requires a Rust toolchain.
153
+
154
+ ## Examples
155
+
156
+ Explore the [example apps](https://github.com/gtkx-org/gtkx/tree/main/examples):
157
+
158
+ - [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the counter above.
159
+ - [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): a React port of the official GTK4 widget showcase, covering lists, dialogs, gestures, CSS, and OpenGL.
160
+ - [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): a WebKitWebView-based web browser.
161
+ - [`tutorial`](https://github.com/gtkx-org/gtkx/tree/main/examples/tutorial): the Tasks app the documentation builds.
162
+
163
+ ## Status
164
+
165
+ GTKX 1.0 is at the release candidate stage.
166
+
167
+ ## Contributing
168
+
169
+ Contributions are welcome. See [CONTRIBUTING.md](https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md), the [Code of Conduct](https://github.com/gtkx-org/gtkx/blob/main/CODE_OF_CONDUCT.md), and the [security policy](https://github.com/gtkx-org/gtkx/blob/main/SECURITY.md). Building the repo needs Node.js 24 or later, pnpm, and a Rust toolchain.
170
+
171
+ ## License
172
+
173
+ GTKX is licensed under [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
@@ -1,5 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import { runMain } from "citty";
3
- import { main } from "../dist/cli.js";
4
-
5
- runMain(main);
2
+ import "../dist/cli.js";
package/dist/cli.d.ts CHANGED
@@ -1,24 +1,2 @@
1
- export declare const main: import("citty").CommandDef<{
2
- name: {
3
- type: "positional";
4
- description: string;
5
- required: false;
6
- };
7
- "application-id": {
8
- type: "string";
9
- description: string;
10
- };
11
- pm: {
12
- type: "string";
13
- description: string;
14
- };
15
- testing: {
16
- type: "string";
17
- description: string;
18
- };
19
- "claude-skills": {
20
- type: "boolean";
21
- description: string;
22
- };
23
- }>;
1
+ export {};
24
2
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;EAQf,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js CHANGED
@@ -1,19 +1,14 @@
1
- import { createRequire } from "node:module";
2
- import { resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
1
+ import { packageVersion } from "@gtkx/utils";
4
2
  import { defineCommand, runMain } from "citty";
5
- import { createCommandArgs, runCreate } from "./command.js";
6
- const { version } = createRequire(import.meta.url)("../package.json");
7
- export const main = defineCommand({
3
+ import { createCommand } from "./command.js";
4
+ const version = packageVersion(import.meta.url);
5
+ const main = defineCommand({
6
+ ...createCommand,
8
7
  meta: {
9
8
  name: "create-gtkx",
10
9
  version,
11
10
  description: "Scaffold a new GTKX application",
12
11
  },
13
- args: createCommandArgs,
14
- run: ({ args }) => runCreate(args),
15
12
  });
16
- if (process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1])) {
17
- void runMain(main);
18
- }
13
+ runMain(main);
19
14
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAwB,CAAC;AAE7F,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;IAC9B,IAAI,EAAE;QACF,IAAI,EAAE,aAAa;QACnB,OAAO;QACP,WAAW,EAAE,iCAAiC;KACjD;IACD,IAAI,EAAE,iBAAiB;IACvB,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;CACrC,CAAC,CAAC;AAEH,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjF,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEhD,MAAM,IAAI,GAAG,aAAa,CAAC;IACvB,GAAG,aAAa;IAChB,IAAI,EAAE;QACF,IAAI,EAAE,aAAa;QACnB,OAAO;QACP,WAAW,EAAE,iCAAiC;KACjD;CACJ,CAAC,CAAC;AAEH,OAAO,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import { packageVersion } from \"@gtkx/utils\";\nimport { defineCommand, runMain } from \"citty\";\nimport { createCommand } from \"./command.js\";\n\nconst version = packageVersion(import.meta.url);\n\nconst main = defineCommand({\n ...createCommand,\n meta: {\n name: \"create-gtkx\",\n version,\n description: \"Scaffold a new GTKX application\",\n },\n});\n\nrunMain(main);\n"]}
package/dist/command.d.ts CHANGED
@@ -1,65 +1,57 @@
1
- /** Raw, unparsed command-line arguments accepted by the create command. */
2
1
  export type CreateCommandArgs = {
3
2
  name?: string | undefined;
4
3
  "application-id"?: string | undefined;
5
- pm?: string | undefined;
6
- testing?: string | undefined;
7
- "claude-skills"?: boolean | undefined;
8
- };
9
- /**
10
- * Shared citty argument schema for both the standalone `create-gtkx` binary and
11
- * the `gtkx create` subcommand.
12
- */
13
- export declare const createCommandArgs: {
14
- name: {
15
- type: "positional";
16
- description: string;
17
- required: false;
18
- };
19
- "application-id": {
20
- type: "string";
21
- description: string;
22
- };
23
- pm: {
24
- type: "string";
25
- description: string;
26
- };
27
- testing: {
28
- type: "string";
29
- description: string;
30
- };
31
- "claude-skills": {
32
- type: "boolean";
33
- description: string;
34
- };
4
+ "package-manager"?: string | undefined;
5
+ typescript?: boolean | undefined;
6
+ vitest?: boolean | undefined;
7
+ yes?: boolean | undefined;
8
+ "no-interactive"?: boolean | undefined;
9
+ overwrite?: boolean | undefined;
35
10
  };
11
+ export declare const runCreate: (args: CreateCommandArgs) => Promise<void>;
36
12
  /**
37
- * Normalize raw create arguments and scaffold the application. Throws on an
38
- * unknown package manager or testing option before any files are written.
13
+ * Citty command definition for the CLI `create` subcommand. It declares the
14
+ * scaffolder's arguments (target name, application ID, package manager,
15
+ * TypeScript and Vitest toggles, prompt behavior, and overwrite) and runs the
16
+ * scaffolder to generate a new GTKX application.
39
17
  */
40
- export declare const runCreate: (args: CreateCommandArgs) => Promise<void>;
41
- /** The `gtkx create` subcommand: scaffold a new gtkx application. */
42
18
  export declare const createCommand: import("citty").CommandDef<{
43
- name: {
44
- type: "positional";
45
- description: string;
46
- required: false;
47
- };
48
- "application-id": {
49
- type: "string";
50
- description: string;
51
- };
52
- pm: {
53
- type: "string";
54
- description: string;
55
- };
56
- testing: {
57
- type: "string";
58
- description: string;
59
- };
60
- "claude-skills": {
61
- type: "boolean";
62
- description: string;
19
+ readonly name: {
20
+ readonly type: "positional";
21
+ readonly description: "Target directory or project name (e.g. my-app, ., apps/my-app)";
22
+ readonly required: false;
23
+ };
24
+ readonly "application-id": {
25
+ readonly type: "string";
26
+ readonly description: "Application ID (e.g., com.example.myapp)";
27
+ };
28
+ readonly "package-manager": {
29
+ readonly type: "string";
30
+ readonly alias: "pm";
31
+ readonly description: string;
32
+ };
33
+ readonly typescript: {
34
+ readonly type: "boolean";
35
+ readonly negativeDescription: "Scaffold the application in JavaScript instead of TypeScript";
36
+ readonly description: "Scaffold the application in TypeScript";
37
+ };
38
+ readonly vitest: {
39
+ readonly type: "boolean";
40
+ readonly description: "Include a Vitest testing setup";
41
+ };
42
+ readonly yes: {
43
+ readonly type: "boolean";
44
+ readonly alias: "y";
45
+ readonly description: "Skip prompts and accept defaults for unspecified options";
46
+ };
47
+ readonly "no-interactive": {
48
+ readonly type: "boolean";
49
+ readonly description: "Run without prompts, using the default for every option not passed on the command line (same as --yes)";
50
+ };
51
+ readonly overwrite: {
52
+ readonly type: "boolean";
53
+ readonly alias: "force";
54
+ readonly description: "Overwrite the contents of a non-empty target directory when running without prompts";
63
55
  };
64
56
  }>;
65
57
  //# sourceMappingURL=command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAWA,2EAA2E;AAC3E,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;CAsBX,CAAC;AAkBpB;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAU,MAAM,iBAAiB,KAAG,OAAO,CAAC,IAAI,CAQrE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC,CAAC;AAUF,eAAO,MAAM,SAAS,SAAgB,iBAAiB,KAAG,OAAO,CAAC,IAAI,CAWrE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CxB,CAAC"}
package/dist/command.js CHANGED
@@ -1,33 +1,6 @@
1
1
  import { defineCommand } from "citty";
2
- import { createApp } from "./create.js";
3
- import { isKnownPackageManager, isTestingOption, PACKAGE_MANAGER_FLAG_DESCRIPTION, TESTING_FLAG_DESCRIPTION, } from "./options.js";
4
- /**
5
- * Shared citty argument schema for both the standalone `create-gtkx` binary and
6
- * the `gtkx create` subcommand.
7
- */
8
- export const createCommandArgs = {
9
- name: {
10
- type: "positional",
11
- description: "Project name",
12
- required: false,
13
- },
14
- "application-id": {
15
- type: "string",
16
- description: "Application ID (e.g., com.example.myapp)",
17
- },
18
- pm: {
19
- type: "string",
20
- description: PACKAGE_MANAGER_FLAG_DESCRIPTION,
21
- },
22
- testing: {
23
- type: "string",
24
- description: TESTING_FLAG_DESCRIPTION,
25
- },
26
- "claude-skills": {
27
- type: "boolean",
28
- description: "Include Claude Code skills for AI assistance",
29
- },
30
- };
2
+ import { isKnownPackageManager, PACKAGE_MANAGER_FLAG_DESCRIPTION } from "./package-managers.js";
3
+ import { scaffold } from "./scaffolder.js";
31
4
  const parsePackageManager = (value) => {
32
5
  if (value === undefined)
33
6
  return undefined;
@@ -36,34 +9,68 @@ const parsePackageManager = (value) => {
36
9
  }
37
10
  return value;
38
11
  };
39
- const parseTestingOption = (value) => {
40
- if (value === undefined)
41
- return undefined;
42
- if (!isTestingOption(value)) {
43
- throw new Error(`Unknown testing setup "${value}". Expected one of: ${TESTING_FLAG_DESCRIPTION}.`);
44
- }
45
- return value;
46
- };
47
- /**
48
- * Normalize raw create arguments and scaffold the application. Throws on an
49
- * unknown package manager or testing option before any files are written.
50
- */
51
12
  export const runCreate = async (args) => {
52
- await createApp({
13
+ const interactive = args["no-interactive"] ? false : args.yes ? false : process.stdin.isTTY === true;
14
+ await scaffold({
53
15
  name: args.name,
54
16
  applicationId: args["application-id"],
55
- packageManager: parsePackageManager(args.pm),
56
- testing: parseTestingOption(args.testing),
57
- claudeSkills: args["claude-skills"],
17
+ packageManager: parsePackageManager(args["package-manager"]),
18
+ typescript: args.typescript,
19
+ includeTesting: args.vitest,
20
+ interactive,
21
+ overwrite: args.overwrite,
58
22
  });
59
23
  };
60
- /** The `gtkx create` subcommand: scaffold a new gtkx application. */
24
+ /**
25
+ * Citty command definition for the CLI `create` subcommand. It declares the
26
+ * scaffolder's arguments (target name, application ID, package manager,
27
+ * TypeScript and Vitest toggles, prompt behavior, and overwrite) and runs the
28
+ * scaffolder to generate a new GTKX application.
29
+ */
61
30
  export const createCommand = defineCommand({
62
31
  meta: {
63
32
  name: "create",
64
33
  description: "Create a new GTKX application",
65
34
  },
66
- args: createCommandArgs,
35
+ args: {
36
+ name: {
37
+ type: "positional",
38
+ description: "Target directory or project name (e.g. my-app, ., apps/my-app)",
39
+ required: false,
40
+ },
41
+ "application-id": {
42
+ type: "string",
43
+ description: "Application ID (e.g., com.example.myapp)",
44
+ },
45
+ "package-manager": {
46
+ type: "string",
47
+ alias: "pm",
48
+ description: PACKAGE_MANAGER_FLAG_DESCRIPTION,
49
+ },
50
+ typescript: {
51
+ type: "boolean",
52
+ negativeDescription: "Scaffold the application in JavaScript instead of TypeScript",
53
+ description: "Scaffold the application in TypeScript",
54
+ },
55
+ vitest: {
56
+ type: "boolean",
57
+ description: "Include a Vitest testing setup",
58
+ },
59
+ yes: {
60
+ type: "boolean",
61
+ alias: "y",
62
+ description: "Skip prompts and accept defaults for unspecified options",
63
+ },
64
+ "no-interactive": {
65
+ type: "boolean",
66
+ description: "Run without prompts, using the default for every option not passed on the command line (same as --yes)",
67
+ },
68
+ overwrite: {
69
+ type: "boolean",
70
+ alias: "force",
71
+ description: "Overwrite the contents of a non-empty target directory when running without prompts",
72
+ },
73
+ },
67
74
  run: ({ args }) => runCreate(args),
68
75
  });
69
76
  //# sourceMappingURL=command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,aAAa,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACH,qBAAqB,EACrB,eAAe,EACf,gCAAgC,EAEhC,wBAAwB,GAE3B,MAAM,cAAc,CAAC;AAWtB;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,IAAI,EAAE;QACF,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,cAAc;QAC3B,QAAQ,EA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PACKAGE_MANAGER_FLAG_DESCRIPTION, type PackageManager } from \"./package-managers.js\";\nimport { scaffold } from \"./scaffolder.js\";\n\nexport type CreateCommandArgs = {\n name?: string | undefined;\n \"application-id\"?: string | undefined;\n \"package-manager\"?: string | undefined;\n typescript?: boolean | undefined;\n vitest?: boolean | undefined;\n yes?: boolean | undefined;\n \"no-interactive\"?: boolean | undefined;\n overwrite?: boolean | undefined;\n};\n\nconst parsePackageManager = (value: string | undefined): PackageManager | undefined => {\n if (value === undefined) return undefined;\n if (!isKnownPackageManager(value)) {\n throw new Error(`Unknown package manager \"${value}\". Expected one of: ${PACKAGE_MANAGER_FLAG_DESCRIPTION}.`);\n }\n return value;\n};\n\nexport const runCreate = async (args: CreateCommandArgs): Promise<void> => {\n const interactive = args[\"no-interactive\"] ? false : args.yes ? false : process.stdin.isTTY === true;\n await scaffold({\n name: args.name,\n applicationId: args[\"application-id\"],\n packageManager: parsePackageManager(args[\"package-manager\"]),\n typescript: args.typescript,\n includeTesting: args.vitest,\n interactive,\n overwrite: args.overwrite,\n });\n};\n\n/**\n * Citty command definition for the CLI `create` subcommand. It declares the\n * scaffolder's arguments (target name, application ID, package manager,\n * TypeScript and Vitest toggles, prompt behavior, and overwrite) and runs the\n * scaffolder to generate a new GTKX application.\n */\nexport const createCommand = defineCommand({\n meta: {\n name: \"create\",\n description: \"Create a new GTKX application\",\n },\n args: {\n name: {\n type: \"positional\",\n description: \"Target directory or project name (e.g. my-app, ., apps/my-app)\",\n required: false,\n },\n \"application-id\": {\n type: \"string\",\n description: \"Application ID (e.g., com.example.myapp)\",\n },\n \"package-manager\": {\n type: \"string\",\n alias: \"pm\",\n description: PACKAGE_MANAGER_FLAG_DESCRIPTION,\n },\n typescript: {\n type: \"boolean\",\n negativeDescription: \"Scaffold the application in JavaScript instead of TypeScript\",\n description: \"Scaffold the application in TypeScript\",\n },\n vitest: {\n type: \"boolean\",\n description: \"Include a Vitest testing setup\",\n },\n yes: {\n type: \"boolean\",\n alias: \"y\",\n description: \"Skip prompts and accept defaults for unspecified options\",\n },\n \"no-interactive\": {\n type: \"boolean\",\n description:\n \"Run without prompts, using the default for every option not passed on the command line (same as --yes)\",\n },\n overwrite: {\n type: \"boolean\",\n alias: \"force\",\n description: \"Overwrite the contents of a non-empty target directory when running without prompts\",\n },\n },\n run: ({ args }) => runCreate(args),\n});\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- export { createCommand, createCommandArgs, type CreateCommandArgs, runCreate } from "./command.js";
2
- export { createApp } from "./create.js";
3
- export { isKnownPackageManager, isTestingOption, type PackageManager, type TestingOption } from "./options.js";
4
- export type { CreateOptions } from "./scaffolder.js";
1
+ export { createCommand } from "./command.js";
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/G,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,2 @@
1
- export { createCommand, createCommandArgs, runCreate } from "./command.js";
2
- export { createApp } from "./create.js";
3
- export { isKnownPackageManager, isTestingOption } from "./options.js";
1
+ export { createCommand } from "./command.js";
4
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAA2C,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { createCommand } from \"./command.js\";\n"]}
@@ -1,25 +1,23 @@
1
- export type TestingOption = "vitest" | "none";
2
1
  export declare const PACKAGE_MANAGERS: readonly [{
3
2
  readonly value: "pnpm";
4
3
  readonly label: "pnpm";
5
- readonly runDev: "pnpm dev";
4
+ readonly devCommand: "pnpm dev";
5
+ readonly installCommand: "pnpm install";
6
6
  readonly recommended: true;
7
7
  }, {
8
8
  readonly value: "npm";
9
9
  readonly label: "npm";
10
- readonly runDev: "npm run dev";
10
+ readonly devCommand: "npm run dev";
11
+ readonly installCommand: "npm install";
11
12
  readonly recommended: false;
12
13
  }, {
13
14
  readonly value: "yarn";
14
15
  readonly label: "yarn";
15
- readonly runDev: "yarn dev";
16
+ readonly devCommand: "yarn dev";
17
+ readonly installCommand: "yarn install";
16
18
  readonly recommended: false;
17
19
  }];
18
20
  export type PackageManager = (typeof PACKAGE_MANAGERS)[number]["value"];
19
- export declare const PACKAGE_MANAGER_VALUES: PackageManager[];
20
21
  export declare const isKnownPackageManager: (name: string) => name is PackageManager;
21
- export declare const isTestingOption: (value: string) => value is TestingOption;
22
22
  export declare const PACKAGE_MANAGER_FLAG_DESCRIPTION: string;
23
- export declare const TESTING_FLAG_DESCRIPTION: string;
24
- export declare const isValidProjectName: (name: string) => boolean;
25
- //# sourceMappingURL=options.d.ts.map
23
+ //# sourceMappingURL=package-managers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-managers.d.ts","sourceRoot":"","sources":["../src/package-managers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;aACvB,KAAK,EAAE,MAAM;aAAE,KAAK,EAAE,MAAM;aAAE,UAAU,EAAE,UAAU;aAAE,cAAc,EAAE,cAAc;aAAE,WAAW;;aACjG,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;aAAE,UAAU,EAAE,aAAa;aAAE,cAAc,EAAE,aAAa;aAAE,WAAW;;aACjG,KAAK,EAAE,MAAM;aAAE,KAAK,EAAE,MAAM;aAAE,UAAU,EAAE,UAAU;aAAE,cAAc,EAAE,cAAc;aAAE,WAAW;EAC7F,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAIxE,eAAO,MAAM,qBAAqB,SAAU,MAAM,KAAG,IAAI,IAAI,cACN,CAAC;AAExD,eAAO,MAAM,gCAAgC,QAA2D,CAAC"}
@@ -0,0 +1,9 @@
1
+ export const PACKAGE_MANAGERS = [
2
+ { value: "pnpm", label: "pnpm", devCommand: "pnpm dev", installCommand: "pnpm install", recommended: true },
3
+ { value: "npm", label: "npm", devCommand: "npm run dev", installCommand: "npm install", recommended: false },
4
+ { value: "yarn", label: "yarn", devCommand: "yarn dev", installCommand: "yarn install", recommended: false },
5
+ ];
6
+ const PACKAGE_MANAGER_VALUES = PACKAGE_MANAGERS.map((manager) => manager.value);
7
+ export const isKnownPackageManager = (name) => PACKAGE_MANAGER_VALUES.includes(name);
8
+ export const PACKAGE_MANAGER_FLAG_DESCRIPTION = `Package manager (${PACKAGE_MANAGER_VALUES.join(", ")})`;
9
+ //# sourceMappingURL=package-managers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-managers.js","sourceRoot":"","sources":["../src/package-managers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE;IAC3G,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE;IAC5G,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE;CACtG,CAAC;AAIX,MAAM,sBAAsB,GAAqB,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAElG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAA0B,EAAE,CACzE,sBAAmC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,gCAAgC,GAAG,oBAAoB,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC","sourcesContent":["export const PACKAGE_MANAGERS = [\n { value: \"pnpm\", label: \"pnpm\", devCommand: \"pnpm dev\", installCommand: \"pnpm install\", recommended: true },\n { value: \"npm\", label: \"npm\", devCommand: \"npm run dev\", installCommand: \"npm install\", recommended: false },\n { value: \"yarn\", label: \"yarn\", devCommand: \"yarn dev\", installCommand: \"yarn install\", recommended: false },\n] as const;\n\nexport type PackageManager = (typeof PACKAGE_MANAGERS)[number][\"value\"];\n\nconst PACKAGE_MANAGER_VALUES: PackageManager[] = PACKAGE_MANAGERS.map((manager) => manager.value);\n\nexport const isKnownPackageManager = (name: string): name is PackageManager =>\n (PACKAGE_MANAGER_VALUES as string[]).includes(name);\n\nexport const PACKAGE_MANAGER_FLAG_DESCRIPTION = `Package manager (${PACKAGE_MANAGER_VALUES.join(\", \")})`;\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const isValidProjectName: (name: string) => boolean;
2
+ //# sourceMappingURL=project-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-name.d.ts","sourceRoot":"","sources":["../src/project-name.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,SAAU,MAAM,KAAG,OAAoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const isValidProjectName = (name) => /^[a-z0-9-]+$/.test(name);
2
+ //# sourceMappingURL=project-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-name.js","sourceRoot":"","sources":["../src/project-name.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC","sourcesContent":["export const isValidProjectName = (name: string): boolean => /^[a-z0-9-]+$/.test(name);\n"]}