@gtkx/cli 0.9.4 → 0.10.0

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.
package/bin/gtkx.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../dist/cli.js";
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ import "./refresh-runtime.js";
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import "./refresh-runtime.js";
3
4
  import { createRequire } from "node:module";
4
5
  import { resolve } from "node:path";
5
6
  import { render } from "@gtkx/react";
package/dist/create.d.ts CHANGED
@@ -1,5 +1,16 @@
1
+ /**
2
+ * Supported package managers for GTKX projects.
3
+ */
1
4
  export type PackageManager = "pnpm" | "npm" | "yarn" | "bun";
5
+ /**
6
+ * Supported testing frameworks for GTKX projects.
7
+ */
2
8
  export type TestingFramework = "vitest" | "jest" | "node" | "none";
9
+ /**
10
+ * Options for creating a new GTKX project.
11
+ *
12
+ * All options are optional; missing values will be prompted interactively.
13
+ */
3
14
  export type CreateOptions = {
4
15
  name?: string;
5
16
  appId?: string;
@@ -7,16 +18,36 @@ export type CreateOptions = {
7
18
  testing?: TestingFramework;
8
19
  claudeSkills?: boolean;
9
20
  };
10
- export declare const getTestScript: (testing: TestingFramework) => string | undefined;
11
- export declare const generatePackageJson: (name: string, appId: string, testing: TestingFramework) => string;
12
- export declare const generateTsConfig: () => string;
13
21
  export declare const getAddCommand: (pm: PackageManager, deps: string[], dev: boolean) => string;
14
22
  export declare const getRunCommand: (pm: PackageManager) => string;
15
23
  export declare const isValidProjectName: (name: string) => boolean;
16
24
  export declare const isValidAppId: (appId: string) => boolean;
17
25
  /**
18
- * Creates a new GTKX application with interactive prompts.
19
- * Scaffolds project structure, installs dependencies, and sets up configuration.
20
- * @param options - Pre-filled options to skip interactive prompts
26
+ * Creates a new GTKX project with interactive prompts.
27
+ *
28
+ * Scaffolds a complete project structure including:
29
+ * - TypeScript configuration
30
+ * - React component template
31
+ * - Development server entry point
32
+ * - Optional testing setup
33
+ * - Optional Claude Code skills
34
+ *
35
+ * @param options - Pre-filled options to skip prompts
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * import { createApp } from "@gtkx/cli";
40
+ *
41
+ * // Interactive mode
42
+ * await createApp();
43
+ *
44
+ * // With pre-filled options
45
+ * await createApp({
46
+ * name: "my-app",
47
+ * appId: "com.example.myapp",
48
+ * packageManager: "pnpm",
49
+ * testing: "vitest",
50
+ * });
51
+ * ```
21
52
  */
22
53
  export declare const createApp: (options?: CreateOptions) => Promise<void>;