create-cofounder 0.1.0 → 0.1.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 +6 -0
- package/index.js +19 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,3 +8,9 @@ npm create cofounder@latest -- --template worktree --setup-codex --yes
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
This creates a `.cofounder/` skeleton in the current project and can optionally install the Codex MCP entry.
|
|
11
|
+
|
|
12
|
+
`npm create` does not install a persistent `cofounder` shell command. For one-off runtime commands:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx -y --package cofounder-crew -- cofounder team
|
|
16
|
+
```
|
package/index.js
CHANGED
|
@@ -19,9 +19,9 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
19
19
|
} else {
|
|
20
20
|
console.log("");
|
|
21
21
|
console.log("Next:");
|
|
22
|
-
console.log("
|
|
23
|
-
console.log("
|
|
24
|
-
console.log(
|
|
22
|
+
console.log(` ${formatCofounderCommand(["setup", "codex", "--install"])}`);
|
|
23
|
+
console.log(` ${formatCofounderCommand(["team"])}`);
|
|
24
|
+
console.log(` ${formatCofounderCommand(["delegate", "backend", "inspect this repo and summarize the API boundaries"])}`);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -110,10 +110,25 @@ function resolveCofounderCommand(args) {
|
|
|
110
110
|
|
|
111
111
|
return {
|
|
112
112
|
bin: "npx",
|
|
113
|
-
args:
|
|
113
|
+
args: resolveNpxCofounderArgs(args)
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
function resolveNpxCofounderArgs(args) {
|
|
118
|
+
return ["-y", "--package", PACKAGE_NAME, "--", "cofounder", ...args];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function formatCofounderCommand(args) {
|
|
122
|
+
return ["npx", ...resolveNpxCofounderArgs(args)].map(quoteShellArg).join(" ");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function quoteShellArg(value) {
|
|
126
|
+
if (/^[A-Za-z0-9_./:@%+=,-]+$/.test(value)) {
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
return `"${value.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
130
|
+
}
|
|
131
|
+
|
|
117
132
|
function validateTemplate(template) {
|
|
118
133
|
if (!template) {
|
|
119
134
|
return;
|