@pathrule/cli 0.0.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/README.md +105 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +583 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Pathrule CLI
|
|
2
|
+
|
|
3
|
+
Pathrule CLI is the local runtime for headless terminals, SSH sessions, and
|
|
4
|
+
Browser+CLI workflows. It owns local auth, workspace attach, MCP install,
|
|
5
|
+
preflight checks, companion-file sync, and doctor diagnostics.
|
|
6
|
+
|
|
7
|
+
## Distribution Policy
|
|
8
|
+
|
|
9
|
+
Pathrule CLI v1 ships through three channels:
|
|
10
|
+
|
|
11
|
+
- Signed standalone binary artifacts for direct download.
|
|
12
|
+
- Homebrew tap formula that installs the signed binary artifact.
|
|
13
|
+
- `@pathrule/cli` npm package as a thin launcher/installer for Node-first users.
|
|
14
|
+
|
|
15
|
+
The CLI does not silently replace its own binary by default. Update behavior is
|
|
16
|
+
controlled by `PATHRULE_UPDATE_POLICY` or `pathrule config set update.policy`:
|
|
17
|
+
|
|
18
|
+
- `manual`: no update checks.
|
|
19
|
+
- `notify`: check for newer versions and print a passive notice.
|
|
20
|
+
- `auto`: opt-in only, reserved for managed installers such as npm or Homebrew.
|
|
21
|
+
|
|
22
|
+
`CI=true` and `NO_UPDATE_CHECK=1` force manual mode.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
### Homebrew
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
brew tap pathrule/tap
|
|
30
|
+
brew install pathrule
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Upgrade:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
brew upgrade pathrule
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### npm
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm i -g @pathrule/cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Upgrade:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm i -g @pathrule/cli@latest
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Standalone
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
curl -fsSL https://pathrule.io/install.sh | sh
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The standalone installer must verify the published checksum and signature before
|
|
58
|
+
placing the binary on `PATH`. The concrete signature manifest is owned by M34b
|
|
59
|
+
release integrity.
|
|
60
|
+
|
|
61
|
+
## First Run
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pathrule login
|
|
65
|
+
pathrule setup --json
|
|
66
|
+
pathrule setup --workspace <workspace-id-or-name> --target all --yes
|
|
67
|
+
pathrule start
|
|
68
|
+
pathrule doctor
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Run `pathrule start` to start the local Web bridge manually. Use `pathrule daemon autostart on`
|
|
72
|
+
or `pathrule daemon autostart off` to toggle whether it starts when you sign in.
|
|
73
|
+
|
|
74
|
+
`pathrule login` opens the hosted Pathrule Web authorization flow:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
One-time code: ABCD-EFGH
|
|
78
|
+
A browser window should open. If not, visit https://app.pathrule.io/device?code=ABCD-EFGH.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Compatibility Endpoint
|
|
82
|
+
|
|
83
|
+
`pathrule update` reads:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
https://app.pathrule.io/cli/versions.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Expected shape:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"latest_version": "0.5.0",
|
|
94
|
+
"min_supported_protocol_version": "0.5.0",
|
|
95
|
+
"upgrade_command": "brew upgrade pathrule",
|
|
96
|
+
"channels": {
|
|
97
|
+
"brew": "brew upgrade pathrule",
|
|
98
|
+
"npm": "npm i -g @pathrule/cli@latest",
|
|
99
|
+
"standalone": "curl -fsSL https://pathrule.io/install.sh | sh"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The endpoint is advisory for M31a. Production release gating, checksums,
|
|
105
|
+
signature manifests, and installer integrity checks land in M34b.
|
package/dist/index.d.ts
ADDED