path-terminal-init 0.2.11 → 0.2.12

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/README.md CHANGED
@@ -1,93 +1,93 @@
1
- # path-terminal-init
2
-
3
- One-line setup for the **Path Terminal SDK integration assistant**. It connects the
4
- user's AI coding agent (Claude Code or Cursor) to the Path MCP help server and installs
5
- the right **per-OS integration recipe** into their EPOS project. The agent then wires the
6
- Path SDK in — a backend switcher for the emulator (Wi-Fi/IP by default, or Bluetooth) and
7
- a real Verifone terminal — guided by the recipe and the MCP server's tools.
8
-
9
- **This repo is the single source of truth** for both the bootstrap CLI and the recipes.
10
- `Path-mcp-server` serves them (`/rules`, `/init.js`) from here — there are no duplicate copies.
11
-
12
- > **Tuning the install process?** It's a *pair* of repos, not just this one:
13
- > - **`Path-terminal-init`** (here) — the **recipes/rules** (`rules/**/*.mdc`) the agent follows + the CLI. Changes reach partners only after **`npm publish`** (version bump + 2FA).
14
- > - **`Path-mcp-server`** — the **code examples** the agent pulls (`get_code_example`) + MCP prompts/tools. Changes go live only after a **deploy to the box** (mcp.path2ai.tech).
15
- >
16
- > A single behaviour change usually touches **both** (the rule says *what*, the MCP example gives the *code*) — tune one without the other and they drift. Then **update the Terminal Bible** (§12 Distribution & releases) so the docs stay current. Distribution/versioning specifics per platform live in the SDK repos.
17
-
18
- ## Layout
19
-
20
- ```
21
- src/cli.ts the bootstrap program
22
- rules/
23
- ios/path-integration.mdc iOS (Swift / SPM)
24
- android/path-integration-android.mdc Android (Kotlin / Gradle)
25
- windows-11/path-integration-windows11.mdc Windows 11 (WinUI 3 / .NET 10)
26
- windows-10/path-integration-windows10.mdc Windows 10 (WPF / .NET Framework 4.8)
27
- build.mjs builds dist/cli.js + dist/init.js
28
- ```
29
-
30
- ## How a customer runs it
31
-
32
- **Every platform (published to npm) — run from the project root:**
33
- ```bash
34
- npx path-terminal-init
35
- ```
36
- Works on macOS, Linux and Windows (PowerShell or CMD). Needs Node installed. It
37
- auto-detects iOS / Android / Windows 11 (WinUI 3) / Windows 10 (WPF). Add `--agent cursor`
38
- for Cursor (default is Claude Code).
39
-
40
- > **Windows PowerShell:** on a fresh box plain `npx` fails with *"npx.ps1 cannot be loaded
41
- > because running scripts is disabled on this system"* — that's PowerShell's default
42
- > execution policy blocking Node's `.ps1` shim, not an install problem. Run the `.cmd`
43
- > shim instead (works under any policy, no admin, no config change):
44
- >
45
- > ```powershell
46
- > npx.cmd path-terminal-init
47
- > ```
48
- >
49
- > Or fix it once with `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`, after which
50
- > plain `npx` works. CMD is unaffected, and the no-npm alternative below runs `node.exe`
51
- > directly so it never hits the policy at all.
52
-
53
- **Alternative — fetch from the help server (no npm):**
54
- ```bash
55
- # macOS / Linux:
56
- node <(curl -s https://mcp.path2ai.tech/init.js) --agent claude
57
- # Windows PowerShell:
58
- curl.exe -s https://mcp.path2ai.tech/init.js -o "$env:TEMP\path-init.js"; node "$env:TEMP\path-init.js" --agent claude
59
- ```
60
-
61
- The CLI writes a `.mcp.json` (connecting the agent to `https://mcp.path2ai.tech`), adds the
62
- SDK dependency, and drops the matching recipe into `.cursor/rules/` and/or `CLAUDE.md`.
63
-
64
- ## Develop locally
65
-
66
- ```bash
67
- npm install
68
- npm run build # → dist/cli.js (installable) + dist/init.js (standalone bundle)
69
- npm run typecheck
70
- node dist/cli.js --help
71
- ```
72
-
73
- ## Two artifacts, one source
74
-
75
- - `dist/cli.js` — the installable CLI. Reads recipes from the local `rules/<os>/` folder.
76
- - `dist/init.js` — a self-contained bundle for the `curl … | node` one-liner. It runs with
77
- no local `rules/` folder, so it fetches the recipe from the server's `/rules` endpoint.
78
-
79
- `Path-mcp-server` serves `dist/init.js` at `/init.js` and the `rules/` files at `/rules*`.
80
- Its deploy copies them from this repo, so the server is never a stale duplicate.
81
-
82
- ## Publishing updates to npm
83
-
84
- Published as **[`path-terminal-init`](https://www.npmjs.com/package/path-terminal-init)** (public).
85
- To ship a new version: bump `version` in `package.json`, then:
86
-
87
- ```bash
88
- npm login # if not already logged in
89
- npm publish --access public # prepublishOnly rebuilds dist/ first
90
- npm view path-terminal-init version
91
- ```
92
-
93
- `npx path-terminal-init` always fetches the latest published version.
1
+ # path-terminal-init
2
+
3
+ One-line setup for the **Path Terminal SDK integration assistant**. It connects the
4
+ user's AI coding agent (Claude Code or Cursor) to the Path MCP help server and installs
5
+ the right **per-OS integration recipe** into their EPOS project. The agent then wires the
6
+ Path SDK in — a backend switcher for the emulator (Wi-Fi/IP by default, or Bluetooth) and
7
+ a real Verifone terminal — guided by the recipe and the MCP server's tools.
8
+
9
+ **This repo is the single source of truth** for both the bootstrap CLI and the recipes.
10
+ `Path-mcp-server` serves them (`/rules`, `/init.js`) from here — there are no duplicate copies.
11
+
12
+ > **Tuning the install process?** It's a *pair* of repos, not just this one:
13
+ > - **`Path-terminal-init`** (here) — the **recipes/rules** (`rules/**/*.mdc`) the agent follows + the CLI. Changes reach partners only after **`npm publish`** (version bump + 2FA).
14
+ > - **`Path-mcp-server`** — the **code examples** the agent pulls (`get_code_example`) + MCP prompts/tools. Changes go live only after a **deploy to the box** (mcp.path2ai.tech).
15
+ >
16
+ > A single behaviour change usually touches **both** (the rule says *what*, the MCP example gives the *code*) — tune one without the other and they drift. Then **update the Terminal Bible** (§12 Distribution & releases) so the docs stay current. Distribution/versioning specifics per platform live in the SDK repos.
17
+
18
+ ## Layout
19
+
20
+ ```
21
+ src/cli.ts the bootstrap program
22
+ rules/
23
+ ios/path-integration.mdc iOS (Swift / SPM)
24
+ android/path-integration-android.mdc Android (Kotlin / Gradle)
25
+ windows-11/path-integration-windows11.mdc Windows 11 (WinUI 3 / .NET 10)
26
+ windows-10/path-integration-windows10.mdc Windows 10 (WPF / .NET Framework 4.8)
27
+ build.mjs builds dist/cli.js + dist/init.js
28
+ ```
29
+
30
+ ## How a customer runs it
31
+
32
+ **Every platform (published to npm) — run from the project root:**
33
+ ```bash
34
+ npx path-terminal-init
35
+ ```
36
+ Works on macOS, Linux and Windows (PowerShell or CMD). Needs Node installed. It
37
+ auto-detects iOS / Android / Windows 11 (WinUI 3) / Windows 10 (WPF). Add `--agent cursor`
38
+ for Cursor (default is Claude Code).
39
+
40
+ > **Windows PowerShell:** on a fresh box plain `npx` fails with *"npx.ps1 cannot be loaded
41
+ > because running scripts is disabled on this system"* — that's PowerShell's default
42
+ > execution policy blocking Node's `.ps1` shim, not an install problem. Run the `.cmd`
43
+ > shim instead (works under any policy, no admin, no config change):
44
+ >
45
+ > ```powershell
46
+ > npx.cmd path-terminal-init
47
+ > ```
48
+ >
49
+ > Or fix it once with `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`, after which
50
+ > plain `npx` works. CMD is unaffected, and the no-npm alternative below runs `node.exe`
51
+ > directly so it never hits the policy at all.
52
+
53
+ **Alternative — fetch from the help server (no npm):**
54
+ ```bash
55
+ # macOS / Linux:
56
+ node <(curl -s https://mcp.path2ai.tech/init.js) --agent claude
57
+ # Windows PowerShell:
58
+ curl.exe -s https://mcp.path2ai.tech/init.js -o "$env:TEMP\path-init.js"; node "$env:TEMP\path-init.js" --agent claude
59
+ ```
60
+
61
+ The CLI writes a `.mcp.json` (connecting the agent to `https://mcp.path2ai.tech`), adds the
62
+ SDK dependency, and drops the matching recipe into `.cursor/rules/` and/or `CLAUDE.md`.
63
+
64
+ ## Develop locally
65
+
66
+ ```bash
67
+ npm install
68
+ npm run build # → dist/cli.js (installable) + dist/init.js (standalone bundle)
69
+ npm run typecheck
70
+ node dist/cli.js --help
71
+ ```
72
+
73
+ ## Two artifacts, one source
74
+
75
+ - `dist/cli.js` — the installable CLI. Reads recipes from the local `rules/<os>/` folder.
76
+ - `dist/init.js` — a self-contained bundle for the `curl … | node` one-liner. It runs with
77
+ no local `rules/` folder, so it fetches the recipe from the server's `/rules` endpoint.
78
+
79
+ `Path-mcp-server` serves `dist/init.js` at `/init.js` and the `rules/` files at `/rules*`.
80
+ Its deploy copies them from this repo, so the server is never a stale duplicate.
81
+
82
+ ## Publishing updates to npm
83
+
84
+ Published as **[`path-terminal-init`](https://www.npmjs.com/package/path-terminal-init)** (public).
85
+ To ship a new version: bump `version` in `package.json`, then:
86
+
87
+ ```bash
88
+ npm login # if not already logged in
89
+ npm publish --access public # prepublishOnly rebuilds dist/ first
90
+ npm view path-terminal-init version
91
+ ```
92
+
93
+ `npx path-terminal-init` always fetches the latest published version.