@guiho/runx 0.2.7 → 0.4.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/CHANGELOG.md +27 -0
- package/DOCS.md +127 -128
- package/README.md +56 -75
- package/devops/build-binaries.ts +44 -62
- package/devops/devops.xdocs.md +8 -5
- package/devops/install.ps1 +182 -152
- package/devops/install.sh +197 -262
- package/devops/installers.spec.ts +31 -0
- package/devops/verify-release-assets.ts +17 -0
- package/docs/docs.xdocs.md +3 -1
- package/docs/plans/plans.xdocs.md +7 -0
- package/docs/plans/rfc-0034-cli-compliance-migration.md +586 -0
- package/docs/plans/upgrade-reliability-implementation.md +95 -0
- package/docs/reviews/implementation/implementation.xdocs.md +2 -0
- package/docs/reviews/implementation/rfc-0034-cli-compliance-migration-review.md +59 -0
- package/docs/reviews/plans/plans.xdocs.md +6 -0
- package/docs/reviews/plans/rfc-0034-cli-compliance-migration-review.md +80 -0
- package/docs/reviews/plans/upgrade-reliability-implementation-review.md +65 -0
- package/docs/superpowers/specs/2026-07-15-upgrade-reliability-design.md +662 -0
- package/docs/superpowers/specs/specs.xdocs.md +24 -0
- package/docs/superpowers/superpowers.xdocs.md +21 -0
- package/docs/todo/rfc-0034-cli-compliance-migration-implementation.md +58 -0
- package/docs/todo/rfc-0034-cli-compliance-migration.md +151 -0
- package/docs/todo/todo.xdocs.md +6 -2
- package/docs/validation/rfc-0034-cli-compliance-migration.md +67 -0
- package/docs/validation/upgrade-reliability.md +124 -0
- package/docs/validation/validation.xdocs.md +5 -0
- package/library/agents.d.ts +28 -4
- package/library/agents.d.ts.map +1 -1
- package/library/agents.js +143 -41
- package/library/cli.d.ts.map +1 -1
- package/library/cli.js +296 -334
- package/library/configuration.d.ts +57 -0
- package/library/configuration.d.ts.map +1 -0
- package/library/configuration.js +111 -0
- package/library/embedded-resources.d.ts +6 -1
- package/library/embedded-resources.d.ts.map +1 -1
- package/library/embedded-resources.js +10 -4
- package/library/executor.d.ts +5 -1
- package/library/executor.d.ts.map +1 -1
- package/library/executor.js +10 -10
- package/library/help.d.ts +8 -4
- package/library/help.d.ts.map +1 -1
- package/library/help.js +70 -46
- package/library/init.d.ts +8 -27
- package/library/init.d.ts.map +1 -1
- package/library/init.js +37 -159
- package/library/manifest.d.ts +4 -43
- package/library/manifest.d.ts.map +1 -1
- package/library/manifest.js +4 -125
- package/library/path-utils.d.ts +13 -0
- package/library/path-utils.d.ts.map +1 -0
- package/library/path-utils.js +82 -0
- package/library/recovery.d.ts +7 -0
- package/library/recovery.d.ts.map +1 -0
- package/library/recovery.js +23 -0
- package/library/release-catalog.d.ts +32 -0
- package/library/release-catalog.d.ts.map +1 -0
- package/library/release-catalog.js +124 -0
- package/library/self-management.d.ts +24 -4
- package/library/self-management.d.ts.map +1 -1
- package/library/self-management.js +279 -99
- package/library/storage.d.ts +13 -0
- package/library/storage.d.ts.map +1 -0
- package/library/storage.js +38 -0
- package/library/types.d.ts +11 -16
- package/library/types.d.ts.map +1 -1
- package/library/types.js +3 -0
- package/library/update-cache.d.ts +21 -0
- package/library/update-cache.d.ts.map +1 -0
- package/library/update-cache.js +68 -0
- package/library/upgrade-reporting.d.ts +11 -0
- package/library/upgrade-reporting.d.ts.map +1 -0
- package/library/upgrade-reporting.js +67 -0
- package/library/upgrade-types.d.ts +72 -0
- package/library/upgrade-types.d.ts.map +1 -0
- package/library/upgrade-types.js +3 -0
- package/package.json +6 -3
- package/scripts/runx-bin.mjs +49 -0
- package/scripts/runx-bin.spec.ts +62 -0
- package/scripts/scripts.xdocs.md +3 -3
- package/skills/guiho-s-runx/SKILL.md +64 -59
- package/skills/guiho-s-runx/guiho-s-runx.xdocs.md +7 -4
- package/skills/skills.xdocs.md +1 -1
- package/docs/todo/implement-runx-alpha.md +0 -36
- package/scripts/runx-bin.ts +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,33 @@ owner: runx
|
|
|
15
15
|
|
|
16
16
|
# Changelog
|
|
17
17
|
|
|
18
|
+
## 0.4.0 - 2026-07-18
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Added complete Developer Context help, the singular agent skill/instruction/prompt namespace, a detached TypeBox-validated update cache, and the canonical `guiho-i-runx` prompt.
|
|
23
|
+
- Added a Node-compatible npm bootstrap, complete dual-tool direct installers, and exact verification for twelve native binaries plus two agent assets.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Rebuilt RunX around the complete RFC 0034 Bun, strict ESM TypeScript, raw Citty, and TypeBox contract.
|
|
28
|
+
- Configuration now resolves only through `--config`, effective-cwd `runx.yaml`, then `~/.guiho/runx/runx.yaml`.
|
|
29
|
+
- The startup banner, help modes, output streams, exit codes, upgrade catalog, release names, bundled skill, documentation, and workflows now follow the canonical RFC contract.
|
|
30
|
+
|
|
31
|
+
### Removed
|
|
32
|
+
|
|
33
|
+
- Removed the run command alias, root selector shorthand, `--file`, parent-directory discovery, plural agent namespace, arbitrary short flags, legacy platform asset names, and Bun-dependent npm launcher.
|
|
34
|
+
|
|
35
|
+
## 0.3.0 - 2026-07-18
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Added transactional executable replacement and automatic rollback for both Windows and POSIX updates with a bounded 10-second verification timeout.
|
|
40
|
+
- Added a complete GitHub release catalog parser that paginates all releases and implements SemVer prerelease precedence.
|
|
41
|
+
- Added structured JSON progress events and equivalent console phase reporting.
|
|
42
|
+
- Added exact-version recovery commands and process-stop commands to every upgrade outcome.
|
|
43
|
+
- Added hardened direct installers (`install.ps1`/`install.sh`) that verify the installed version and support rollback.
|
|
44
|
+
|
|
18
45
|
## 0.2.7 - 2026-07-15
|
|
19
46
|
|
|
20
47
|
### Added
|
package/DOCS.md
CHANGED
|
@@ -1,156 +1,155 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: RunX Documentation
|
|
3
|
-
purpose:
|
|
4
|
-
description:
|
|
3
|
+
purpose: Define the canonical supported RunX CLI contract.
|
|
4
|
+
description: Complete reference for command routing, YAML configuration, startup, help, output, agents, upgrades, installation, and release assets.
|
|
5
5
|
created: 2026-07-12
|
|
6
|
-
flags:
|
|
6
|
+
flags:
|
|
7
|
+
- canonical
|
|
7
8
|
tags:
|
|
8
|
-
- documentation
|
|
9
9
|
- cli
|
|
10
|
+
- reference
|
|
10
11
|
keywords:
|
|
11
|
-
-
|
|
12
|
-
-
|
|
12
|
+
- RFC 0034
|
|
13
|
+
- runx.yaml
|
|
14
|
+
- agent namespace
|
|
15
|
+
- release assets
|
|
13
16
|
owner: runx
|
|
14
17
|
---
|
|
15
18
|
|
|
16
19
|
# RunX Documentation
|
|
17
20
|
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
RunX
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| `runx r <selector>` | Short alias for `runx run`. |
|
|
37
|
-
| `runx <selector>` | Human shorthand for `runx run <selector>` when no built-in name conflicts. |
|
|
38
|
-
| `runx agents install <local|global>` | Install `guiho-s-runx`; add `--tool agents|claude|all` when needed. |
|
|
39
|
-
| `runx agents instructions` | Add or refresh the managed RunX section in `AGENTS.md`. |
|
|
40
|
-
| `runx upgrade` | Replace a native installed executable when a newer release is available. |
|
|
41
|
-
| `runx upgrade check` | Check whether a newer release is available. |
|
|
42
|
-
| `runx upgrade list` | List recent release versions. |
|
|
43
|
-
| `runx uninstall [--dry-run]` | Remove a native installed executable. |
|
|
44
|
-
|
|
45
|
-
Global flags: `--cwd <path>`, `--file <path>`, `--format <text|json>`,
|
|
46
|
-
`--verbose`, `-v`/`--version`, `-h`/`--help`, `--help-tree`, and
|
|
47
|
-
`--help-docs`. Applicable command flags include `--dry-run`, `--yes`, and
|
|
48
|
-
`--tool <agents|claude|all>`. Options may appear before or after their command.
|
|
49
|
-
Unknown options and missing required arguments produce command usage instead
|
|
50
|
-
of falling through to manifest discovery.
|
|
51
|
-
|
|
52
|
-
`runx init` is intentionally an interactive text workflow: it accepts `--cwd`
|
|
53
|
-
to select the target project, but rejects `--file` (the target is always
|
|
54
|
-
`runx.yaml`) and `--format json`. It previews the exact file, requires a final
|
|
55
|
-
confirmation, asks before replacing an existing file, and leaves no partial
|
|
56
|
-
file when cancelled. It creates the manifest only; the configured scripts
|
|
57
|
-
directory is created later when the first script is added.
|
|
58
|
-
|
|
59
|
-
Citty is the CLI parser, command router, alias registry, and ordinary usage
|
|
60
|
-
renderer. RunX keeps its home page, extended command tree, and manifest guide
|
|
61
|
-
as the explicit `runx`, `--help-tree`, and `--help-docs` surfaces.
|
|
62
|
-
|
|
63
|
-
## Manifest
|
|
64
|
-
|
|
65
|
-
RunX searches upward from the current directory for `runx.yaml`. Use `--file`
|
|
66
|
-
to select an explicit manifest. RunX does not merge files.
|
|
67
|
-
|
|
68
|
-
```yaml
|
|
69
|
-
version: "1.0.0"
|
|
70
|
-
project:
|
|
71
|
-
name: example
|
|
72
|
-
scripts:
|
|
73
|
-
directory: scripts
|
|
74
|
-
groups:
|
|
75
|
-
public:
|
|
76
|
-
summary: Default public project commands.
|
|
77
|
-
development:
|
|
78
|
-
summary: Local development work.
|
|
79
|
-
release:
|
|
80
|
-
summary: Explicit release actions.
|
|
81
|
-
commands:
|
|
82
|
-
- uid: example-check
|
|
83
|
-
id: check
|
|
84
|
-
group: development
|
|
85
|
-
summary: Type-check the project.
|
|
86
|
-
description: Runs the project's static type checker without emitting build files.
|
|
87
|
-
command: bun run typecheck
|
|
88
|
-
cwd: .
|
|
89
|
-
shell: auto
|
|
90
|
-
tags: [validation]
|
|
91
|
-
- uid: example-release
|
|
92
|
-
id: release
|
|
93
|
-
group: release
|
|
94
|
-
summary: Build the release artifact.
|
|
95
|
-
description: Builds the release artifact after the project has passed its required checks.
|
|
96
|
-
command: bun run build
|
|
97
|
-
confirm: always
|
|
21
|
+
## Runtime Contract
|
|
22
|
+
|
|
23
|
+
RunX uses Bun, strict ESM TypeScript, raw Citty, and TypeBox. Core source is
|
|
24
|
+
Bun-only. The isolated npm bootstrap is Node-compatible because it must work
|
|
25
|
+
before Bun is installed.
|
|
26
|
+
|
|
27
|
+
No arguments prints exactly:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
Hello Windows - runx v<version>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The foreground reads `~/.guiho/runx/cache.json` and never waits for network
|
|
34
|
+
work. A detached worker validates GitHub release data and atomically refreshes
|
|
35
|
+
that cache. When a decoded cache announces an update, RunX prints:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
New version available. Run this command to upgrade: runx upgrade
|
|
98
39
|
```
|
|
99
40
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
RunX loads YAML only. Resolution is:
|
|
44
|
+
|
|
45
|
+
1. `--config <path>`;
|
|
46
|
+
2. `<effective-cwd>/runx.yaml`;
|
|
47
|
+
3. `~/.guiho/runx/runx.yaml`.
|
|
48
|
+
|
|
49
|
+
Whenever loaded, the absolute path is reported as:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
configuration file loaded: <absolute-path>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The complete manifest and nested records are TypeBox-decoded. Invalid or absent
|
|
56
|
+
configuration exits `3`.
|
|
57
|
+
|
|
58
|
+
## Commands And Help
|
|
106
59
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
letters, digits, and hyphens. `uid` is globally unique; the group and ID pair
|
|
110
|
-
is also unique.
|
|
60
|
+
The public command tree is the catalog shown in [README.md](README.md). Citty is
|
|
61
|
+
the only parser and router. The only short flags are `-h` and root `-v`.
|
|
111
62
|
|
|
112
|
-
|
|
113
|
-
relative to the manifest and cannot escape its directory. Shell values are
|
|
114
|
-
`auto`, `bash`, `sh`, `powershell`, and `cmd`. Confirmation values are `never`
|
|
115
|
-
and `always`.
|
|
63
|
+
Every root, group, and leaf supports:
|
|
116
64
|
|
|
117
|
-
|
|
65
|
+
- standard help with usage, description, positionals, flags, and examples;
|
|
66
|
+
- `--help-tree`, using Unicode box-drawing branches;
|
|
67
|
+
- `--help-tree-depth <positive-integer>`;
|
|
68
|
+
- redirect-safe Markdown through `--help-docs`.
|
|
118
69
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
only stable until commands are reordered, and an ambiguous bare ID fails rather
|
|
122
|
-
than selecting a command.
|
|
70
|
+
Only `runx run <selector>` executes catalog code. Listing, describing, checking,
|
|
71
|
+
help, initialization, agent operations, upgrade inspection, and dry runs do not.
|
|
123
72
|
|
|
124
|
-
|
|
125
|
-
command. A real run streams stdout/stderr and uses the child process exit code.
|
|
126
|
-
`confirm: always` requires the user to add `--yes`.
|
|
73
|
+
## Output And Exit Codes
|
|
127
74
|
|
|
128
|
-
|
|
129
|
-
|
|
75
|
+
Text results use stdout and diagnostics use stderr. JSON mode emits one valid
|
|
76
|
+
JSON document on stdout; configuration reports and diagnostics remain on
|
|
77
|
+
stderr.
|
|
130
78
|
|
|
131
|
-
|
|
79
|
+
| Code | Meaning |
|
|
80
|
+
| ---: | --- |
|
|
81
|
+
| `0` | Success |
|
|
82
|
+
| `1` | Unexpected operational failure |
|
|
83
|
+
| `2` | Usage or structured flag validation failure |
|
|
84
|
+
| `3` | Configuration resolution or decoding failure |
|
|
85
|
+
| `4` | Release or network failure |
|
|
86
|
+
| `5` | Installation, upgrade, or filesystem mutation failure |
|
|
87
|
+
| `130` | Interruption |
|
|
132
88
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
89
|
+
An executed catalog command preserves its exact delegated exit code.
|
|
90
|
+
|
|
91
|
+
## Agent Integration
|
|
92
|
+
|
|
93
|
+
Skill install, update, and uninstall default to global scope and target both:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
~/.agents/skills/guiho-s-runx
|
|
97
|
+
~/.claude/skills/guiho-s-runx
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use `--local` for the corresponding project-local paths.
|
|
101
|
+
|
|
102
|
+
Instruction actions manage both `AGENTS.md` and `CLAUDE.md` when both exist,
|
|
103
|
+
the existing one when only one exists, and create `AGENTS.md` when neither
|
|
104
|
+
exists. The exact idempotent boundaries are:
|
|
136
105
|
|
|
137
106
|
```text
|
|
138
|
-
|
|
107
|
+
<!-- BEGIN RUNX — DO NOT EDIT THIS SECTION -->
|
|
108
|
+
<!-- END RUNX -->
|
|
139
109
|
```
|
|
140
110
|
|
|
141
|
-
|
|
111
|
+
The canonical prompt is `guiho-i-runx`. `agent prompt list --names` prints raw
|
|
112
|
+
names; `agent prompt show <id>` prints only the raw prompt.
|
|
113
|
+
|
|
114
|
+
## Upgrade And Installation
|
|
142
115
|
|
|
143
|
-
`
|
|
144
|
-
|
|
145
|
-
`
|
|
146
|
-
On Windows it renames the running executable, installs and verifies the target
|
|
147
|
-
version at the original path, and restores the previous executable if replacement
|
|
148
|
-
fails. Only cleanup of the renamed old image is deferred until RunX exits.
|
|
149
|
-
`runx uninstall` removes the same native executable and supports `--dry-run`.
|
|
116
|
+
`runx upgrade` accepts `--version`, `--arch`, `--variant`, `--dry-run`, and
|
|
117
|
+
`--format`. x64 defaults to `baseline`. `upgrade list` supports positive
|
|
118
|
+
`--page` and `--per-page` plus `--pre-releases`.
|
|
150
119
|
|
|
151
|
-
|
|
120
|
+
Replacement is transactional: download, native-format validation, backup,
|
|
121
|
+
replacement, version verification, rollback on failure, agent-skill refresh,
|
|
122
|
+
instruction reconciliation, then cleanup.
|
|
152
123
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
124
|
+
Both direct installers show target metadata and download progress, configure
|
|
125
|
+
PATH, install both global skill copies, reconcile project instructions, and
|
|
126
|
+
verify the final version.
|
|
127
|
+
|
|
128
|
+
## Npm Bootstrap
|
|
129
|
+
|
|
130
|
+
`scripts/runx-bin.mjs` detects platform and architecture, chooses the exact
|
|
131
|
+
versioned native asset, caches it under `~/.guiho/runx/npm/<version>/`, applies
|
|
132
|
+
Unix execute permissions, delegates args/stdin/stdout/stderr/environment, and
|
|
133
|
+
preserves the native exit code. It contains no RunX domain logic.
|
|
134
|
+
|
|
135
|
+
## Release Assets
|
|
136
|
+
|
|
137
|
+
Every release contains exactly fourteen assets: twelve native binaries and two
|
|
138
|
+
agent assets.
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
runx-linux-arm64
|
|
142
|
+
runx-linux-x64
|
|
143
|
+
runx-linux-x64-baseline
|
|
144
|
+
runx-linux-x64-modern
|
|
145
|
+
runx-darwin-arm64
|
|
146
|
+
runx-darwin-x64
|
|
147
|
+
runx-darwin-x64-baseline
|
|
148
|
+
runx-darwin-x64-modern
|
|
149
|
+
runx-windows-arm64.exe
|
|
150
|
+
runx-windows-x64.exe
|
|
151
|
+
runx-windows-x64-baseline.exe
|
|
152
|
+
runx-windows-x64-modern.exe
|
|
153
|
+
guiho-s-runx
|
|
154
|
+
guiho-i-runx
|
|
155
|
+
```
|
package/README.md
CHANGED
|
@@ -1,108 +1,89 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: RunX README
|
|
3
|
-
purpose: Introduce RunX and
|
|
4
|
-
description: Public overview
|
|
3
|
+
purpose: Introduce RunX and provide the supported RFC 0034 installation and quick-start workflow.
|
|
4
|
+
description: Public overview of the RunX YAML command catalog, native CLI, agent integration, and release channels.
|
|
5
5
|
created: 2026-07-12
|
|
6
|
-
flags:
|
|
6
|
+
flags:
|
|
7
|
+
- public
|
|
7
8
|
tags:
|
|
8
|
-
- documentation
|
|
9
9
|
- cli
|
|
10
|
-
keywords:
|
|
11
10
|
- runx
|
|
12
|
-
|
|
11
|
+
keywords:
|
|
12
|
+
- runx.yaml
|
|
13
|
+
- native binary
|
|
14
|
+
- command catalog
|
|
13
15
|
owner: runx
|
|
14
16
|
---
|
|
15
17
|
|
|
16
|
-
#
|
|
18
|
+
# RunX
|
|
17
19
|
|
|
18
|
-
RunX is a
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
local shell commands rather than package-manager scripts.
|
|
20
|
+
RunX is a language-agnostic command catalog backed by a strict `runx.yaml`
|
|
21
|
+
file. It makes project operations discoverable and keeps execution explicit:
|
|
22
|
+
only `runx run <selector>` spawns a configured command.
|
|
22
23
|
|
|
23
24
|
## Install
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
public `@guiho/runx` package on npm. The npm launcher requires Bun.
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
bun add --global @guiho/runx
|
|
30
|
-
```
|
|
26
|
+
PowerShell:
|
|
31
27
|
|
|
32
28
|
```powershell
|
|
33
29
|
irm https://raw.githubusercontent.com/CGuiho/runx/main/devops/install.ps1 | iex
|
|
34
30
|
```
|
|
35
31
|
|
|
32
|
+
POSIX:
|
|
33
|
+
|
|
36
34
|
```sh
|
|
37
|
-
curl -fsSL https://raw.githubusercontent.com/CGuiho/runx/main/devops/install.sh | sh
|
|
35
|
+
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/CGuiho/runx/main/devops/install.sh | sh
|
|
38
36
|
```
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
The direct installers select and verify a native asset, install `runx` on PATH,
|
|
39
|
+
install `guiho-s-runx` into both global agent-tool directories, and reconcile
|
|
40
|
+
RunX instructions in the current project.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
The npm package is a Node-compatible bootstrap that downloads and delegates to
|
|
43
|
+
the version-matched native binary. Bun is not required for npm installation or
|
|
44
|
+
first execution.
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
43
47
|
|
|
44
48
|
```text
|
|
45
49
|
runx init
|
|
50
|
+
runx check
|
|
51
|
+
runx list
|
|
52
|
+
runx describe app-dev
|
|
53
|
+
runx run app-dev --dry-run
|
|
54
|
+
runx run app-dev
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
catalog starts with a SemVer `1.x` manifest version, a configurable scripts
|
|
50
|
-
directory, the required `public` group, and no commands. Add commands directly
|
|
51
|
-
or ask an agent to add a script under the configured directory and its command
|
|
52
|
-
entry together.
|
|
53
|
-
|
|
54
|
-
For example, a catalog with a development command can look like this:
|
|
55
|
-
|
|
56
|
-
```yaml
|
|
57
|
-
version: "1.0.0"
|
|
58
|
-
project:
|
|
59
|
-
name: example
|
|
60
|
-
scripts:
|
|
61
|
-
directory: scripts
|
|
62
|
-
groups:
|
|
63
|
-
public:
|
|
64
|
-
summary: Default public project commands.
|
|
65
|
-
development:
|
|
66
|
-
summary: Local development commands.
|
|
67
|
-
commands:
|
|
68
|
-
- uid: app-dev
|
|
69
|
-
id: dev
|
|
70
|
-
group: development
|
|
71
|
-
summary: Start the application locally.
|
|
72
|
-
description: Starts the application in local development mode until interrupted.
|
|
73
|
-
command: bash scripts/dev.sh
|
|
74
|
-
shell: bash
|
|
75
|
-
tags: [local, watch]
|
|
76
|
-
```
|
|
57
|
+
Configuration resolves in this exact order:
|
|
77
58
|
|
|
78
|
-
|
|
59
|
+
1. `--config <path>`;
|
|
60
|
+
2. `<effective-cwd>/runx.yaml`;
|
|
61
|
+
3. `~/.guiho/runx/runx.yaml`.
|
|
79
62
|
|
|
80
|
-
|
|
81
|
-
runx Show the home page and usage.
|
|
82
|
-
runx -h Show Citty-generated command help.
|
|
83
|
-
runx -v Show the installed version without loading a manifest.
|
|
84
|
-
runx init Interactively create an empty runx.yaml catalog.
|
|
85
|
-
runx list List commands in the nearest manifest.
|
|
86
|
-
runx describe app-dev Explain one command without execution.
|
|
87
|
-
runx run app-dev --dry-run Inspect the execution plan.
|
|
88
|
-
runx run app-dev Execute the command.
|
|
89
|
-
runx r app-dev Use the short run alias.
|
|
90
|
-
runx app-dev Use the human selector shorthand.
|
|
91
|
-
```
|
|
63
|
+
RunX never searches parent directories.
|
|
92
64
|
|
|
93
|
-
|
|
94
|
-
Use `runx list --format json` and stable UIDs for agent automation.
|
|
95
|
-
RunX uses Citty for argument parsing, aliases, command routing, and ordinary
|
|
96
|
-
usage text, so conventional `-h`/`--help` and `-v`/`--version` work outside a
|
|
97
|
-
configured project.
|
|
65
|
+
## Command Catalog
|
|
98
66
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
67
|
+
```text
|
|
68
|
+
runx
|
|
69
|
+
├── list
|
|
70
|
+
├── describe <selector>
|
|
71
|
+
├── run <selector>
|
|
72
|
+
├── check
|
|
73
|
+
├── init
|
|
74
|
+
├── agent
|
|
75
|
+
│ ├── skill install|uninstall|update|list|show
|
|
76
|
+
│ ├── instruction apply|remove|update|show
|
|
77
|
+
│ └── prompt list|show
|
|
78
|
+
├── upgrade
|
|
79
|
+
│ ├── check
|
|
80
|
+
│ └── list
|
|
81
|
+
└── uninstall
|
|
82
|
+
```
|
|
105
83
|
|
|
106
|
-
|
|
84
|
+
Every scope supports `--help`, `-h`, `--help-tree`,
|
|
85
|
+
`--help-tree-depth <positive-integer>`, and `--help-docs`. Only root
|
|
86
|
+
`--version` also has `-v`.
|
|
107
87
|
|
|
108
|
-
[
|
|
88
|
+
See [DOCS.md](DOCS.md) for configuration, output, exit codes, agent resources,
|
|
89
|
+
upgrade behavior, installers, npm bootstrap, and the exact release matrix.
|
package/devops/build-binaries.ts
CHANGED
|
@@ -1,57 +1,53 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Copyright
|
|
3
|
-
*
|
|
4
|
-
* Build release binaries for the supported RunX platform matrix.
|
|
2
|
+
* @copyright Copyright © 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
|
|
5
3
|
*/
|
|
6
4
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
5
|
+
import { $ } from 'bun'
|
|
6
|
+
import { joinPath } from '../source/path-utils.js'
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
agentAssetNames,
|
|
10
|
+
binaryTargets,
|
|
11
|
+
expectedReleaseAssetNames,
|
|
12
|
+
}
|
|
10
13
|
|
|
11
14
|
type BinaryTarget = {
|
|
12
15
|
readonly bunTarget: string
|
|
13
16
|
readonly assetName: string
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
const
|
|
19
|
+
const binaryTargets: readonly BinaryTarget[] = [
|
|
17
20
|
{ bunTarget: 'bun-linux-arm64', assetName: 'runx-linux-arm64' },
|
|
18
21
|
{ bunTarget: 'bun-linux-x64', assetName: 'runx-linux-x64' },
|
|
19
22
|
{ bunTarget: 'bun-linux-x64-baseline', assetName: 'runx-linux-x64-baseline' },
|
|
20
23
|
{ bunTarget: 'bun-linux-x64-modern', assetName: 'runx-linux-x64-modern' },
|
|
21
|
-
{ bunTarget: 'bun-darwin-arm64', assetName: 'runx-
|
|
22
|
-
{ bunTarget: 'bun-darwin-x64', assetName: 'runx-
|
|
23
|
-
{ bunTarget: 'bun-darwin-x64-baseline', assetName: 'runx-
|
|
24
|
-
{ bunTarget: 'bun-darwin-x64-modern', assetName: 'runx-
|
|
24
|
+
{ bunTarget: 'bun-darwin-arm64', assetName: 'runx-darwin-arm64' },
|
|
25
|
+
{ bunTarget: 'bun-darwin-x64', assetName: 'runx-darwin-x64' },
|
|
26
|
+
{ bunTarget: 'bun-darwin-x64-baseline', assetName: 'runx-darwin-x64-baseline' },
|
|
27
|
+
{ bunTarget: 'bun-darwin-x64-modern', assetName: 'runx-darwin-x64-modern' },
|
|
25
28
|
{ bunTarget: 'bun-windows-arm64', assetName: 'runx-windows-arm64.exe' },
|
|
26
29
|
{ bunTarget: 'bun-windows-x64', assetName: 'runx-windows-x64.exe' },
|
|
27
30
|
{ bunTarget: 'bun-windows-x64-baseline', assetName: 'runx-windows-x64-baseline.exe' },
|
|
28
31
|
{ bunTarget: 'bun-windows-x64-modern', assetName: 'runx-windows-x64-modern.exe' },
|
|
29
32
|
]
|
|
30
33
|
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const uniqueAssetNames = new Set(assetNames)
|
|
34
|
+
const agentAssetNames = ['guiho-s-runx', 'guiho-i-runx'] as const
|
|
35
|
+
const expectedReleaseAssetNames = [...binaryTargets.map((target) => target.assetName), ...agentAssetNames]
|
|
34
36
|
|
|
35
|
-
if (
|
|
36
|
-
throw new Error(
|
|
37
|
+
if (expectedReleaseAssetNames.length !== 14 || new Set(expectedReleaseAssetNames).size !== 14) {
|
|
38
|
+
throw new Error('RunX release matrix must contain exactly fourteen unique assets.')
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const binDirectory = join(root, 'bin')
|
|
45
|
-
const bunExecutable = process.execPath
|
|
46
|
-
|
|
47
|
-
await rm(binDirectory, { recursive: true, force: true })
|
|
48
|
-
await mkdir(binDirectory, { recursive: true })
|
|
41
|
+
if (import.meta.main) {
|
|
42
|
+
const root = Bun.fileURLToPath(new URL('..', import.meta.url))
|
|
43
|
+
const bin = joinPath(root, 'bin')
|
|
44
|
+
await $`rm -rf ${bin}`.quiet()
|
|
45
|
+
await $`mkdir -p ${bin}`.quiet()
|
|
49
46
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
bunExecutable,
|
|
47
|
+
for (const target of binaryTargets) {
|
|
48
|
+
const output = joinPath(bin, target.assetName)
|
|
49
|
+
const child = Bun.spawn([
|
|
50
|
+
process.execPath,
|
|
55
51
|
'build',
|
|
56
52
|
'source/guiho-runx-native-bin.ts',
|
|
57
53
|
'--compile',
|
|
@@ -61,39 +57,25 @@ const builds = targets.map(async (target) => {
|
|
|
61
57
|
'--target',
|
|
62
58
|
target.bunTarget,
|
|
63
59
|
'--outfile',
|
|
64
|
-
|
|
65
|
-
],
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
proc.exited,
|
|
75
|
-
])
|
|
76
|
-
|
|
77
|
-
if (exitCode !== 0) {
|
|
78
|
-
throw new Error([
|
|
79
|
-
`Failed to build ${target.bunTarget} -> ${target.assetName}`,
|
|
80
|
-
stdout.trim(),
|
|
81
|
-
stderr.trim(),
|
|
82
|
-
].filter(Boolean).join('\n'))
|
|
60
|
+
output,
|
|
61
|
+
], { cwd: root, stdout: 'pipe', stderr: 'pipe' })
|
|
62
|
+
const [stdout, stderr, exitCode] = await Promise.all([
|
|
63
|
+
new Response(child.stdout).text(),
|
|
64
|
+
new Response(child.stderr).text(),
|
|
65
|
+
child.exited,
|
|
66
|
+
])
|
|
67
|
+
if (exitCode !== 0) throw new Error([`Failed to build ${target.assetName}`, stdout, stderr].filter(Boolean).join('\n'))
|
|
68
|
+
if ((await Bun.file(output).size) === 0) throw new Error(`Built binary is empty: ${target.assetName}`)
|
|
69
|
+
process.stdout.write(`built: ${target.assetName}\n`)
|
|
83
70
|
}
|
|
84
71
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
await Promise.all(builds)
|
|
72
|
+
await Bun.write(joinPath(bin, 'guiho-s-runx'), Bun.file(joinPath(root, 'skills', 'guiho-s-runx', 'SKILL.md')))
|
|
73
|
+
await Bun.write(joinPath(bin, 'guiho-i-runx'), Bun.file(joinPath(root, 'prompts', 'guiho-i-runx.md')))
|
|
89
74
|
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (output.size === 0) {
|
|
95
|
-
throw new Error(`Built binary is empty: bin/${target.assetName}`)
|
|
75
|
+
const observed = [...new Bun.Glob('*').scanSync({ cwd: bin, onlyFiles: true })].sort()
|
|
76
|
+
const expected = [...expectedReleaseAssetNames].sort()
|
|
77
|
+
if (JSON.stringify(observed) !== JSON.stringify(expected)) {
|
|
78
|
+
throw new Error(`Release asset mismatch.\nExpected: ${expected.join(', ')}\nObserved: ${observed.join(', ')}`)
|
|
96
79
|
}
|
|
80
|
+
process.stdout.write('verified exactly 14 release assets\n')
|
|
97
81
|
}
|
|
98
|
-
|
|
99
|
-
process.stdout.write(`verified ${targets.length} native binary assets\n`)
|
package/devops/devops.xdocs.md
CHANGED
|
@@ -4,9 +4,11 @@ description: Native release-asset compilation and direct RunX installer scripts.
|
|
|
4
4
|
parent: runx
|
|
5
5
|
children: []
|
|
6
6
|
files:
|
|
7
|
-
build-binaries.ts: Cross-compiles
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
build-binaries.ts: Cross-compiles twelve RFC-named native binaries and adds the two exact agent assets.
|
|
8
|
+
verify-release-assets.ts: Fails on any missing, duplicate, extra, or legacy release asset name.
|
|
9
|
+
installers.spec.ts: Verifies both installers expose progress, validation, dual-tool skills, instruction reconciliation, and no POSIX Bun dependency.
|
|
10
|
+
install.ps1: Resolves an exact Windows release, downloads and validates a compatible asset, transactionally replaces the canonical executable, verifies its version, and rolls back on failure.
|
|
11
|
+
install.sh: POSIX installer for Linux or Darwin with progress, validation, PATH, dual skills, instructions, verification, and rollback.
|
|
10
12
|
documents: {}
|
|
11
13
|
tags:
|
|
12
14
|
- devops
|
|
@@ -15,11 +17,12 @@ tags:
|
|
|
15
17
|
keywords:
|
|
16
18
|
- runx
|
|
17
19
|
- windows
|
|
18
|
-
-
|
|
20
|
+
- darwin
|
|
19
21
|
- linux
|
|
20
22
|
- native binary
|
|
21
23
|
flags: []
|
|
22
24
|
status: stable
|
|
23
25
|
---
|
|
24
26
|
|
|
25
|
-
These scripts
|
|
27
|
+
These scripts build and verify the exact fourteen-asset release and support
|
|
28
|
+
direct installation without npm or Bun.
|