create-heximon 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WP Online Magyarország Kft.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # ⏣ Create Heximon
2
+
3
+ Scaffold a new Heximon app with nothing installed yet. `npm create heximon` (and its `pnpm`, `yarn`, and
4
+ `bun` equivalents) runs the same scaffolder as `heximon create`, so every option works the same way.
5
+
6
+ ## Why you want it
7
+
8
+ - **Nothing to install first.** Your package manager's `create` command downloads and runs this package
9
+ once, then discards it.
10
+ - **The same scaffolder, one command shorter.** This package forwards to `heximon create` verbatim, so
11
+ the prompts and the flags never drift apart.
12
+ - **Every prompt has a flag.** Run it non-interactively in a script with `--template`, `--validator`, and
13
+ `--yes`.
14
+
15
+ ## Install
16
+
17
+ There is nothing to install. Run one command for your package manager.
18
+
19
+ ```sh
20
+ npm create heximon@latest my-app
21
+ pnpm create heximon my-app
22
+ yarn create heximon my-app
23
+ bun create heximon my-app
24
+ ```
25
+
26
+ ## Registry access
27
+
28
+ The `@heximon/*` packages live on GitHub Packages. Before the first install, add two lines to your
29
+ user-level `~/.npmrc`. The token is a GitHub personal access token with the `read:packages` scope.
30
+
31
+ ```ini
32
+ @heximon:registry=https://npm.pkg.github.com
33
+ //npm.pkg.github.com/:_authToken=<your token>
34
+ ```
35
+
36
+ The scaffolder writes the first line into the new project's `.npmrc`. It checks registry access before it
37
+ runs the install and prints the fix if the check fails.
38
+
39
+ ## Your first app
40
+
41
+ Add flags to skip every prompt. `--template` picks `minimal` or `database`. `--validator` picks `zod`,
42
+ `valibot`, or `none`. `--yes` accepts every remaining default and installs dependencies.
43
+
44
+ ```sh
45
+ npm create heximon@latest my-app -- --template database --validator zod --yes
46
+ ```
47
+
48
+ `npm create` removes that `--` itself. `pnpm`, `yarn`, and `bun` forward it, so this package drops one
49
+ leading `--` before it reads the flags. The same command line works on every package manager.
50
+
51
+ ## What is included
52
+
53
+ | Feature | What it does |
54
+ | :-- | :-- |
55
+ | `create-heximon` binary | The one command this package ships. Package managers run it for `create heximon`. |
56
+ | `--template` | Selects the starter: `minimal` or `database`. |
57
+ | `--validator` | Selects the request-body validator: `zod`, `valibot`, or `none`. |
58
+ | `--yes` | Accepts every remaining default and runs the install. |
59
+
60
+ ## Works with
61
+
62
+ - [`heximon`](../cli) owns the real implementation. This package only forwards to its `create` command.
63
+
64
+ ## Learn more
65
+
66
+ - [Create a new app](https://heximon.dev/docs/cli/create) — every prompt and flag, and what each starter
67
+ contains.
68
+ - [The Heximon agent skill](../../../docs/skills/heximon) — the technical reference for coding agents.
69
+
70
+ ## License
71
+
72
+ MIT — see [LICENSE](./LICENSE).
package/dist/bin.d.mts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/bin.mjs ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from "node:module";
3
+ import { createCommand } from "heximon";
4
+ import process from "node:process";
5
+ import { runMain } from "citty";
6
+ //#region src/front-door.ts
7
+ /**
8
+ * The `npm create heximon` front door around the shared `heximon create` command.
9
+ *
10
+ * The command's `args` and `run` are reused verbatim — one implementation, two invocations — but its
11
+ * `meta` is not: `heximon create`'s meta names a SUBCOMMAND, which as a program name makes `--help`
12
+ * advertise a `create` binary that is on nobody's PATH, and its missing `version` makes citty's
13
+ * builtin `--version` exit 1 with a usage dump.
14
+ */
15
+ var CreateFrontDoor = class CreateFrontDoor {
16
+ /** The binary name, as it appears in `--help`'s usage line. */
17
+ static binaryName = "create-heximon";
18
+ /** The POSIX end-of-options marker some package managers forward into this bin's argv. */
19
+ static optionsSeparator = "--";
20
+ /** The command citty runs: the shared implementation under this package's own identity. */
21
+ static command() {
22
+ return {
23
+ ...createCommand,
24
+ meta: {
25
+ name: CreateFrontDoor.binaryName,
26
+ version: CreateFrontDoor.version(),
27
+ description: "Scaffold a new Heximon app (the `npm create heximon` front door)."
28
+ }
29
+ };
30
+ }
31
+ /**
32
+ * The argument vector citty parses, with the FIRST bare `--` dropped.
33
+ *
34
+ * `npm create` consumes the separator itself, but `pnpm`/`yarn`/`bun` forward it verbatim — and
35
+ * citty has no end-of-options handling, so everything after a bare `--` lands in `_` and never
36
+ * matches an arg. Without this, the documented `pnpm create heximon my-app -- --template database
37
+ * --yes` scaffolds the DEFAULT template with the install skipped, silently. Dropping it is safe at
38
+ * any position: a bare `--` carries no meaning this command reads, and no valid project name is
39
+ * spelled that way.
40
+ */
41
+ static rawArgs(argv) {
42
+ const separator = argv.indexOf(CreateFrontDoor.optionsSeparator);
43
+ return separator === -1 ? [...argv] : [...argv.slice(0, separator), ...argv.slice(separator + 1)];
44
+ }
45
+ /** This package's own version — the one citty's builtin `--version` prints. */
46
+ static version() {
47
+ return createRequire(import.meta.url)("../package.json").version;
48
+ }
49
+ };
50
+ //#endregion
51
+ //#region src/bin.ts
52
+ await runMain(CreateFrontDoor.command(), { rawArgs: [...CreateFrontDoor.rawArgs(process.argv.slice(2))] });
53
+ //#endregion
54
+ export {};
@@ -0,0 +1,2 @@
1
+ import { createCommand } from "heximon";
2
+ export { createCommand };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { createCommand } from "heximon";
2
+ export { createCommand };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "create-heximon",
3
+ "version": "0.1.0",
4
+ "description": "Scaffold a new Heximon app — the `npm create heximon` front door (forwards to `heximon create`).",
5
+ "keywords": [
6
+ "cli",
7
+ "create",
8
+ "esm",
9
+ "heximon",
10
+ "scaffolding",
11
+ "starter",
12
+ "typescript"
13
+ ],
14
+ "homepage": "https://heximon.dev",
15
+ "bugs": {
16
+ "url": "https://github.com/heximon/heximon/issues"
17
+ },
18
+ "license": "MIT",
19
+ "author": "WP Online Magyarország Kft. (https://wpo.hu)",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/heximon/heximon.git",
23
+ "directory": "packages/tooling/create-heximon"
24
+ },
25
+ "bin": {
26
+ "create-heximon": "./dist/bin.mjs"
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "type": "module",
32
+ "sideEffects": false,
33
+ "exports": {
34
+ ".": "./dist/index.mjs"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "dependencies": {
40
+ "citty": "^0.2.2",
41
+ "heximon": "0.1.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^24.13.3",
45
+ "@typescript/native-preview": "^7.0.0-dev.20260707.2",
46
+ "typescript": "^6.0.3",
47
+ "vitest": "^5.0.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=24"
51
+ },
52
+ "scripts": {
53
+ "build": "vp pack",
54
+ "test": "vitest --run"
55
+ }
56
+ }