heximon 0.0.1 → 0.1.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.
- package/LICENSE +1 -1
- package/README.md +139 -6
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +2912 -0
- package/dist/index.d.mts +405 -0
- package/dist/index.mjs +2 -6
- package/dist/skills-command-W72zUEYD.mjs +940 -0
- package/package.json +58 -19
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,17 +1,150 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ⏣ Heximon CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `heximon` command bundles the tasks that sit around everyday development: scaffolding a new app,
|
|
4
|
+
inspecting its routes and dependency graph, shipping a build, and running migrations.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`pnpm dev` and `pnpm build` stay Vite tasks. `heximon` handles what comes before your first `pnpm dev` and
|
|
7
|
+
after your last `pnpm build`.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Why you want it
|
|
10
|
+
|
|
11
|
+
- **One binary for the whole surface.** `create`, `check`, `routes`, `graph`, `doctor`, `deploy`,
|
|
12
|
+
`provision`, `migrations`, and `workflows` are one command each.
|
|
13
|
+
- **`heximon check` catches a dependency-injection error before `tsgo` does.** It compiles your app
|
|
14
|
+
headlessly and reports every compile error with its position and a fix.
|
|
15
|
+
- **`heximon doctor` finds a package installed twice.** Class identity is the only dependency-injection
|
|
16
|
+
token, so two copies of one package bind two different sets of classes. `doctor` names both directories.
|
|
17
|
+
- **`heximon deploy` ships with the platform's own tool.** It builds your app, then runs `wrangler`,
|
|
18
|
+
`vercel`, `netlify`, or `deployctl` for you, with the right flags for your environment.
|
|
19
|
+
- **Shell completion is built in.** `heximon complete zsh` (or `bash`, `fish`, `powershell`, `fig`) sets
|
|
20
|
+
up tab completion for every command and flag.
|
|
8
21
|
|
|
9
22
|
## Install
|
|
10
23
|
|
|
11
24
|
```sh
|
|
12
|
-
|
|
25
|
+
pnpm add -D heximon
|
|
13
26
|
```
|
|
14
27
|
|
|
28
|
+
You need no extra configuration. `heximon` reads the same `heximon.config.ts` sidecar your build
|
|
29
|
+
already uses.
|
|
30
|
+
|
|
31
|
+
## Your first command
|
|
32
|
+
|
|
33
|
+
Most starters wire `heximon check` in front of the type check, so a dependency-injection error surfaces
|
|
34
|
+
before the type checker runs.
|
|
35
|
+
|
|
36
|
+
```json [starters/minimal/package.json]
|
|
37
|
+
{
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "vp dev",
|
|
40
|
+
"build": "vp build",
|
|
41
|
+
"check": "heximon check && vp check",
|
|
42
|
+
"test": "vitest --run"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The full command surface is ten subcommands, each its own file, registered once.
|
|
48
|
+
|
|
49
|
+
```ts [src/bin.ts]
|
|
50
|
+
const main = defineCommand({
|
|
51
|
+
meta: { name: "heximon", description: "The Heximon CLI." },
|
|
52
|
+
subCommands: {
|
|
53
|
+
create: createCommand,
|
|
54
|
+
deploy: deployCommand,
|
|
55
|
+
check: checkCommand,
|
|
56
|
+
routes: routesCommand,
|
|
57
|
+
graph: graphCommand,
|
|
58
|
+
doctor: doctorCommand,
|
|
59
|
+
provision: provisionCommand,
|
|
60
|
+
migrations: migrationsCommand,
|
|
61
|
+
workflows: workflowsCommand,
|
|
62
|
+
skills: skillsCommand,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## What is included
|
|
68
|
+
|
|
69
|
+
| Command | What it does |
|
|
70
|
+
| :-- | :-- |
|
|
71
|
+
| `heximon create` | Scaffolds a new app from a starter template. Also reachable as `pnpm create heximon`. |
|
|
72
|
+
| `heximon check` | Compiles the app, reports every diagnostic, and refreshes the editor's type hints. `--emit` also writes the generated wiring to `.heximon/`; `--verify-baseline` names every durable record the committed `heximon.upgrade.json` has not acknowledged. |
|
|
73
|
+
| `heximon routes` | Prints one table for every path the app answers — routes, SSE streams, and WebSocket upgrades — read from the compiler, with no boot required. |
|
|
74
|
+
| `heximon graph` | Prints the resolved module dependency graph: modules, providers, and dependencies. |
|
|
75
|
+
| `heximon doctor` | Reports a package installed twice, an untraced deploy target, and a stale published module. |
|
|
76
|
+
| `heximon deploy` | Builds the app, then ships it with the target platform's own command-line tool. |
|
|
77
|
+
| `heximon provision` | Creates a resource your build needs an identifier for, before the build runs. |
|
|
78
|
+
| `heximon migrations` | Runs `generate`, `migrate`, `status`, or `push` against your database, with no hand-written `drizzle-kit` config. |
|
|
79
|
+
| `heximon workflows` | Compares a durable workflow's current shape against its committed upgrade baseline. |
|
|
80
|
+
| `heximon skills` | `add <url>` records an agent-skill source in `package.json` (`heximon.skills`) and installs it. `sync` re-installs every recorded source. |
|
|
81
|
+
| `heximon complete <shell>` | Installs shell completion for `zsh`, `bash`, `fish`, `powershell`, or `fig`. |
|
|
82
|
+
|
|
83
|
+
## Works with
|
|
84
|
+
|
|
85
|
+
- [`@heximon/deploy`](../deploy) supplies the `deploy` command's logic. This package adds the interactive
|
|
86
|
+
prompts on top.
|
|
87
|
+
- [`@heximon/compiler`](../../kernel/compiler) supplies `check`, `routes`, and `graph`.
|
|
88
|
+
- [`create-heximon`](../create-heximon) is a separate, smaller package that forwards `npm create heximon`
|
|
89
|
+
to this package's `create` command.
|
|
90
|
+
|
|
91
|
+
## Registry access
|
|
92
|
+
|
|
93
|
+
`@heximon/*` packages publish to GitHub Packages, a private registry. The `heximon` CLI itself stays on
|
|
94
|
+
public npm, so it installs with no extra setup — but a scaffolded app's `@heximon/*` dependencies need
|
|
95
|
+
two things in place:
|
|
96
|
+
|
|
97
|
+
1. A `.npmrc` in the project, with the scope line:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
@heximon:registry=https://npm.pkg.github.com
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`heximon create` writes this file for you. It does not overwrite a `.npmrc` your template already
|
|
104
|
+
ships, and it skips the file in `--workspace` mode, where the `@heximon/*` ranges are workspace links.
|
|
105
|
+
|
|
106
|
+
2. A GitHub token with the `read:packages` scope, in your **user-level** `~/.npmrc`:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
//npm.pkg.github.com/:_authToken=<your token>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Before it installs, `heximon create` checks that `@heximon/*` is readable. On failure it prints the fix
|
|
113
|
+
above, skips the install, and keeps the scaffolded project so you can install by hand once the token is in
|
|
114
|
+
place. Pass `--skip-registry-check` to skip this check (for example, when a proxy or mirror answers the
|
|
115
|
+
install another way).
|
|
116
|
+
|
|
117
|
+
`heximon doctor` reports the same check as its first line: `✔ GitHub Packages — @heximon/* readable`, or
|
|
118
|
+
the fix instructions plus a non-zero exit code.
|
|
119
|
+
|
|
120
|
+
## Good to know
|
|
121
|
+
|
|
122
|
+
- **`heximon deploy` needs the platform's own command-line tool installed and logged in.** It checks
|
|
123
|
+
this first and stops with the exact command to run, before it builds anything.
|
|
124
|
+
- **`heximon doctor` reports. It does not fix.** A duplicate package copy needs a change to your lockfile
|
|
125
|
+
or your dependency versions.
|
|
126
|
+
- **Run `heximon check` before you trust a red `pnpm check`.** The type checker cannot see a missing
|
|
127
|
+
provider on its own. `heximon check` reports that error with the line that is wrong.
|
|
128
|
+
- **`heximon check` writes no wiring unless you ask.** Pass `--emit`, or set `debug: true` in
|
|
129
|
+
`heximon.config.ts`, and the generated files land in `.heximon/` — prettified in place, and the command
|
|
130
|
+
prints where.
|
|
131
|
+
- **`heximon skills add` records only what it installed.** A source it could not fetch stays out of
|
|
132
|
+
`heximon.skills`, so `heximon skills sync` never retries a URL that never worked.
|
|
133
|
+
- **Adding a durable record is silent until you look for it.** A new queue channel, saga slot, workflow, or
|
|
134
|
+
integration subscription is safe to deploy, so the upgrade check says nothing. `heximon check
|
|
135
|
+
--verify-baseline` names every one the committed baseline has not acknowledged; add `--strict` to fail CI
|
|
136
|
+
on them, then `heximon check --update` to accept them. That acceptance also refreshes the DI verdict
|
|
137
|
+
mirror, so a bare `tsgo` on unchanged source passes right away.
|
|
138
|
+
- **`heximon workflows` still reports a breaking upgrade verdict per workflow.** The verdict comes out of a
|
|
139
|
+
complete graph analysis, so the rows stay and the command exits non-zero. Only a genuine compile failure
|
|
140
|
+
refuses the report. A workflow that only gained steps at the end reads as `appended`, not `diverged`.
|
|
141
|
+
|
|
142
|
+
## Learn more
|
|
143
|
+
|
|
144
|
+
- [The CLI](https://heximon.dev/docs/cli/overview) — every command, every flag.
|
|
145
|
+
- [Deploy from the CLI](https://heximon.dev/docs/cli/deploy) — the `deploy` command in depth.
|
|
146
|
+
- [The Heximon agent skill](../../../docs/skills/heximon) — the technical reference for coding agents.
|
|
147
|
+
|
|
15
148
|
## License
|
|
16
149
|
|
|
17
|
-
[
|
|
150
|
+
MIT — see [LICENSE](./LICENSE).
|
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|