plan-tree 0.2.1 → 0.2.2
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 +25 -11
- package/README.zh-CN.md +25 -11
- package/VERSION +1 -1
- package/bin/plan-tree.js +25 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,25 +97,39 @@ A plan is implementation-ready only when the scope, chosen approach, expected be
|
|
|
97
97
|
|
|
98
98
|
## Installation
|
|
99
99
|
|
|
100
|
-
Install the lightweight installer from
|
|
100
|
+
Install the lightweight installer from npm, then install the skill for your provider:
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
|
|
104
|
-
plan-tree install
|
|
103
|
+
npm install -g plan-tree
|
|
104
|
+
plan-tree install codex
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
Common usage:
|
|
108
|
+
|
|
107
109
|
```bash
|
|
108
|
-
|
|
109
|
-
plan-tree install
|
|
110
|
+
plan-tree version
|
|
111
|
+
plan-tree install claude
|
|
112
|
+
plan-tree install opencode
|
|
113
|
+
plan-tree install codex
|
|
114
|
+
plan-tree install all
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
You can also install the same `plan-tree` command from PyPI:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
python -m pip install seemseam-plan-tree
|
|
121
|
+
plan-tree install claude
|
|
110
122
|
```
|
|
111
123
|
|
|
112
|
-
|
|
124
|
+
The npm package exposes a `plan-tree` binary through its `bin` field. Install it globally when you want to run `plan-tree` directly from any shell. A local install with `npm install plan-tree` exposes the command only inside npm's local binary path, so run it with `npx plan-tree ...`, `npm exec plan-tree -- ...`, or `./node_modules/.bin/plan-tree ...`.
|
|
125
|
+
|
|
126
|
+
Supported install targets:
|
|
113
127
|
|
|
114
128
|
```bash
|
|
115
|
-
plan-tree install
|
|
116
|
-
plan-tree install
|
|
117
|
-
plan-tree install
|
|
118
|
-
plan-tree install
|
|
129
|
+
plan-tree install claude
|
|
130
|
+
plan-tree install opencode
|
|
131
|
+
plan-tree install codex
|
|
132
|
+
plan-tree install all
|
|
119
133
|
```
|
|
120
134
|
|
|
121
135
|
The installer copies only the skill payload: `SKILL.md`, `VERSION`, README files, `references/`, `assets/`, and Codex/OpenAI metadata when installing for Codex. It does not install `.ccb/`, git state, logs, generated artifacts, or project runtime files.
|
|
@@ -123,7 +137,7 @@ The installer copies only the skill payload: `SKILL.md`, `VERSION`, README files
|
|
|
123
137
|
For local development or offline installation, point the installer at this repository:
|
|
124
138
|
|
|
125
139
|
```bash
|
|
126
|
-
plan-tree install
|
|
140
|
+
plan-tree install claude --source /path/to/plan-tree
|
|
127
141
|
```
|
|
128
142
|
|
|
129
143
|
You can also clone this repository directly into your skill directory:
|
package/README.zh-CN.md
CHANGED
|
@@ -97,25 +97,39 @@ A plan is implementation-ready only when the scope, chosen approach, expected be
|
|
|
97
97
|
|
|
98
98
|
## 安装
|
|
99
99
|
|
|
100
|
-
先从
|
|
100
|
+
先从 npm 安装轻量 installer,再用 installer 安装 skill:
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
|
|
104
|
-
plan-tree install
|
|
103
|
+
npm install -g plan-tree
|
|
104
|
+
plan-tree install codex
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
常用命令:
|
|
108
|
+
|
|
107
109
|
```bash
|
|
108
|
-
|
|
109
|
-
plan-tree install
|
|
110
|
+
plan-tree version
|
|
111
|
+
plan-tree install claude
|
|
112
|
+
plan-tree install opencode
|
|
113
|
+
plan-tree install codex
|
|
114
|
+
plan-tree install all
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
也可以从 PyPI 安装同一个 `plan-tree` 命令:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
python -m pip install seemseam-plan-tree
|
|
121
|
+
plan-tree install claude
|
|
110
122
|
```
|
|
111
123
|
|
|
112
|
-
|
|
124
|
+
npm 包通过 `bin` 字段暴露 `plan-tree` 命令。想在任意 shell 里直接运行 `plan-tree`,需要全局安装。普通的 `npm install plan-tree` 只会把命令放到 npm 的本地 binary 路径里,需要用 `npx plan-tree ...`、`npm exec plan-tree -- ...` 或 `./node_modules/.bin/plan-tree ...` 调用。
|
|
125
|
+
|
|
126
|
+
支持的安装目标:
|
|
113
127
|
|
|
114
128
|
```bash
|
|
115
|
-
plan-tree install
|
|
116
|
-
plan-tree install
|
|
117
|
-
plan-tree install
|
|
118
|
-
plan-tree install
|
|
129
|
+
plan-tree install claude
|
|
130
|
+
plan-tree install opencode
|
|
131
|
+
plan-tree install codex
|
|
132
|
+
plan-tree install all
|
|
119
133
|
```
|
|
120
134
|
|
|
121
135
|
installer 只复制 skill payload:`SKILL.md`、`VERSION`、README 文件、`references/`、`assets/`,以及安装到 Codex 时需要的 Codex/OpenAI metadata。它不会安装 `.ccb/`、git 状态、日志、生成物或项目运行态文件。
|
|
@@ -123,7 +137,7 @@ installer 只复制 skill payload:`SKILL.md`、`VERSION`、README 文件、`re
|
|
|
123
137
|
本地开发或离线安装时,可以显式指定当前仓库:
|
|
124
138
|
|
|
125
139
|
```bash
|
|
126
|
-
plan-tree install
|
|
140
|
+
plan-tree install claude --source /path/to/plan-tree
|
|
127
141
|
```
|
|
128
142
|
|
|
129
143
|
也可以直接把仓库克隆到你的 skill 目录:
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.2
|
package/bin/plan-tree.js
CHANGED
|
@@ -5,8 +5,9 @@ const os = require("os");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const { spawnSync } = require("child_process");
|
|
7
7
|
|
|
8
|
-
const PACKAGE_VERSION = "0.2.
|
|
8
|
+
const PACKAGE_VERSION = "0.2.2";
|
|
9
9
|
const REPO_URL = "https://github.com/SeemSeam/plan-tree.git";
|
|
10
|
+
const README_URL = "https://github.com/SeemSeam/plan-tree#readme";
|
|
10
11
|
const SKILL_NAME = "plan-tree";
|
|
11
12
|
|
|
12
13
|
const CORE_FILES = ["SKILL.md", "VERSION", "README.md", "README.zh-CN.md"];
|
|
@@ -32,23 +33,30 @@ function main(argv) {
|
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
function usage() {
|
|
35
|
-
console.log("Use `plan-tree install
|
|
36
|
+
console.log("Use `plan-tree install claude|opencode|codex|all`.");
|
|
37
|
+
console.log(`README: ${README_URL}`);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
function parseInstallArgs(args) {
|
|
39
41
|
const options = {
|
|
40
|
-
provider:
|
|
42
|
+
provider: null,
|
|
41
43
|
target: null,
|
|
42
44
|
source: null,
|
|
43
45
|
version: PACKAGE_VERSION,
|
|
44
46
|
force: false,
|
|
45
47
|
dryRun: false
|
|
46
48
|
};
|
|
49
|
+
let providerArg = null;
|
|
47
50
|
|
|
48
51
|
for (let i = 0; i < args.length; i += 1) {
|
|
49
52
|
const arg = args[i];
|
|
50
|
-
if (arg === "--provider")
|
|
51
|
-
|
|
53
|
+
if (arg === "--provider") {
|
|
54
|
+
const providerValue = requireValue(args, ++i, arg);
|
|
55
|
+
if (providerArg && providerArg !== providerValue) {
|
|
56
|
+
throw new Error("provider specified twice with different values");
|
|
57
|
+
}
|
|
58
|
+
providerArg = providerValue;
|
|
59
|
+
} else if (arg === "--target") options.target = requireValue(args, ++i, arg);
|
|
52
60
|
else if (arg === "--source") options.source = requireValue(args, ++i, arg);
|
|
53
61
|
else if (arg === "--version") options.version = requireValue(args, ++i, arg);
|
|
54
62
|
else if (arg === "--force") options.force = true;
|
|
@@ -56,17 +64,23 @@ function parseInstallArgs(args) {
|
|
|
56
64
|
else if (arg === "--help" || arg === "-h") {
|
|
57
65
|
usage();
|
|
58
66
|
process.exit(0);
|
|
59
|
-
} else {
|
|
67
|
+
} else if (arg.startsWith("-")) {
|
|
60
68
|
throw new Error(`Unknown argument: ${arg}`);
|
|
69
|
+
} else if (providerArg) {
|
|
70
|
+
throw new Error(`Unexpected argument: ${arg}`);
|
|
71
|
+
} else {
|
|
72
|
+
providerArg = arg;
|
|
61
73
|
}
|
|
62
74
|
}
|
|
63
75
|
|
|
76
|
+
options.provider = providerArg || "claude";
|
|
77
|
+
|
|
64
78
|
const allowed = [...Object.keys(PROVIDER_TARGETS), "all"];
|
|
65
79
|
if (!allowed.includes(options.provider)) {
|
|
66
|
-
throw new Error(
|
|
80
|
+
throw new Error(`provider must be one of: ${allowed.join(", ")}`);
|
|
67
81
|
}
|
|
68
82
|
if (options.target && options.provider === "all") {
|
|
69
|
-
throw new Error("--target cannot be combined with
|
|
83
|
+
throw new Error("--target cannot be combined with provider all");
|
|
70
84
|
}
|
|
71
85
|
return options;
|
|
72
86
|
}
|
|
@@ -88,6 +102,9 @@ function install(options) {
|
|
|
88
102
|
const target = path.resolve(expandHome(options.target || PROVIDER_TARGETS[provider]()));
|
|
89
103
|
installToProvider(source, target, provider, options.force, options.dryRun);
|
|
90
104
|
}
|
|
105
|
+
if (!options.dryRun) {
|
|
106
|
+
console.log(`Read the README: ${README_URL}`);
|
|
107
|
+
}
|
|
91
108
|
return 0;
|
|
92
109
|
}
|
|
93
110
|
|