plain-forge
Advanced tools
+15
-2
@@ -560,4 +560,17 @@ #!/usr/bin/env node | ||
| // the test suite) must not trigger main() or process.exit(). | ||
| const invokedDirectly = | ||
| process.argv[1] && path.resolve(process.argv[1]) === __filename; | ||
| // `__filename` (from import.meta.url) is realpath-resolved by Node, but | ||
| // process.argv[1] is the path as invoked — under npx / a global install it's a | ||
| // symlink in node_modules/.bin or the npx cache. Resolve both through realpath | ||
| // so the comparison survives symlinked bins; otherwise main() silently never | ||
| // runs (spinner, then nothing). | ||
| function isInvokedDirectly() { | ||
| const invoked = process.argv[1]; | ||
| if (!invoked) return false; | ||
| try { | ||
| return fs.realpathSync(invoked) === __filename; | ||
| } catch { | ||
| return path.resolve(invoked) === __filename; | ||
| } | ||
| } | ||
| const invokedDirectly = isInvokedDirectly(); | ||
| if (invokedDirectly) { | ||
@@ -564,0 +577,0 @@ main().catch((err) => { |
+1
-1
| { | ||
| "name": "plain-forge", | ||
| "version": "1.0.11", | ||
| "version": "1.0.12", | ||
| "description": "Conversational spec-writing tool for ***plain specification language", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+2
-50
@@ -45,5 +45,5 @@ <p align="center"> | ||
| ### Install with `npx plain-forge install` (recommended) | ||
| ### Install with `npx plain-forge install` | ||
| The primary install path. Works for every supported runtime and is the only installer that ships **all** plain-forge content (skills, rules, **and** docs) — the other methods below are limited or agent-specific. | ||
| The one and only way to install plain-forge. It works for every supported runtime and ships **all** plain-forge content (skills, rules, **and** docs). | ||
@@ -99,36 +99,2 @@ ```bash | ||
| ### Alternative install paths (skills only — no rules or docs) | ||
| These work but only install the skill files. Rules and docs do **not** travel with them, so use them only if you have a reason not to use `npx plain-forge install`. | ||
| #### `npx skills` CLI | ||
| ```bash | ||
| npx skills add Codeplain-ai/plain-forge --skill '*' --agent claude-code | ||
| ``` | ||
| Replace `--agent claude-code` with `codex` or `opencode` to target a different runtime, or repeat the flag for several at once. | ||
| #### Claude Code native plugin flow | ||
| Requires the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code). Inside a Claude Code session, run the following **three commands** one after the other: | ||
| ```text | ||
| /plugin marketplace add Codeplain-ai/plain-forge | ||
| /plugin install plain-forge@plain-forge | ||
| /reload-plugins | ||
| ``` | ||
| Without the reload the skills won't appear in the current session. | ||
| #### Codex native plugin flow | ||
| Requires the [OpenAI Codex CLI](https://developers.openai.com/codex/cli/reference). From your shell: | ||
| ```bash | ||
| codex plugin marketplace add Codeplain-ai/plain-forge | ||
| ``` | ||
| Then, inside Codex, open the plugin directory, pick the `plain-forge` marketplace, and install the plugin from there. (Codex's CLI does not currently expose a `codex plugin install` equivalent.) | ||
| ## Usage | ||
@@ -223,16 +189,2 @@ | ||
| ### Contributing | ||
| After editing anything under `forge/` or `runtimes/*/templates/`, regenerate the runtime outputs: | ||
| ```bash | ||
| npm install # required after every fresh clone (node_modules/ is gitignored) | ||
| npm run build # regenerate runtime outputs for Claude, Codex, OpenCode | ||
| npm run clean # remove generated outputs and rebuild from scratch | ||
| ``` | ||
| If `npm run build` errors with `sh: tsx: command not found`, it means `node_modules/` is missing — run `npm install` first. | ||
| The build is idempotent — re-running it produces no `git diff`. | ||
| ## Available Skills | ||
@@ -239,0 +191,0 @@ |
545
2.44%616738
-0.22%241
-16.61%