@getpawl/setup 1.3.1 → 1.3.3
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/dist/index.js +17 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,8 +17,10 @@ async function main() {
|
|
|
17
17
|
} else if (arg === "connect") {
|
|
18
18
|
await pawlConnect();
|
|
19
19
|
} else if (arg === "init") {
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const rest = process.argv.slice(3);
|
|
21
|
+
const noConnect = rest.includes("--no-connect");
|
|
22
|
+
const key = rest.find((a) => !a.startsWith("--"));
|
|
23
|
+
await pawlInit(key, { noConnect });
|
|
22
24
|
} else if (arg === "migrate") {
|
|
23
25
|
pawlMigrate();
|
|
24
26
|
} else {
|
|
@@ -34,7 +36,7 @@ Usage:
|
|
|
34
36
|
pawl migrate Migrate .pawl/sync.sh from AGENTMAP_* to PAWL_* vars
|
|
35
37
|
pawl-setup <PROJECT_KEY> Legacy setup (still supported)
|
|
36
38
|
|
|
37
|
-
Dashboard: https://
|
|
39
|
+
Dashboard: https://agentmap-mimy.onrender.com/dashboard
|
|
38
40
|
`);
|
|
39
41
|
}
|
|
40
42
|
function pawlSync(flag) {
|
|
@@ -99,7 +101,7 @@ function generateCode() {
|
|
|
99
101
|
}
|
|
100
102
|
function getRepoName() {
|
|
101
103
|
try {
|
|
102
|
-
const remote = (0, import_node_child_process.execSync)("git remote get-url origin", { encoding: "utf-8" }).trim();
|
|
104
|
+
const remote = (0, import_node_child_process.execSync)("git remote get-url origin", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
103
105
|
const match = remote.match(/\/([^/]+?)(?:\.git)?$/);
|
|
104
106
|
if (match) return match[1];
|
|
105
107
|
} catch {
|
|
@@ -208,7 +210,7 @@ function legacySetup(encoded) {
|
|
|
208
210
|
console.log(" Created: .agentmap/.env, .agentmap/sync.sh, .agentmap/parse-cc-session.js");
|
|
209
211
|
console.log(" Updated: .claude/settings.json, CLAUDE.md, .gitignore\n");
|
|
210
212
|
}
|
|
211
|
-
function pawlInit(key) {
|
|
213
|
+
async function pawlInit(key, opts) {
|
|
212
214
|
const cwd = process.cwd();
|
|
213
215
|
const detected = detectAgents(cwd);
|
|
214
216
|
migrateIfNeeded(cwd, detected.hasAgentMapDir);
|
|
@@ -239,6 +241,10 @@ function pawlInit(key) {
|
|
|
239
241
|
writeAgentsMd(cwd);
|
|
240
242
|
updateGitignore(cwd);
|
|
241
243
|
printSummary(detected, !!key);
|
|
244
|
+
if (!key && !opts?.noConnect) {
|
|
245
|
+
console.log("\nConnecting to Pawl dashboard...\n");
|
|
246
|
+
await pawlConnect();
|
|
247
|
+
}
|
|
242
248
|
}
|
|
243
249
|
function detectAgents(cwd) {
|
|
244
250
|
return {
|
|
@@ -818,28 +824,28 @@ function printSummary(detected, hasKey) {
|
|
|
818
824
|
if (detected.hasGemini) {
|
|
819
825
|
console.log(" Gemini CLI \u2713 hooks installed (.gemini/settings.json)");
|
|
820
826
|
}
|
|
821
|
-
|
|
827
|
+
if (detected.hasGitDir) {
|
|
828
|
+
console.log(" Git hook active \u2014 syncs on every commit (all agents)");
|
|
829
|
+
}
|
|
822
830
|
console.log("\n Files written:");
|
|
823
831
|
console.log(" .pawl/sync.mjs (Node.js sync \u2014 no curl/jq needed)");
|
|
824
832
|
console.log(" .pawl/track-file.mjs (Node.js file tracker)");
|
|
825
833
|
console.log(" .pawl/sync.sh (bash fallback)");
|
|
826
834
|
console.log(" .pawl/parse-cc-session.js");
|
|
827
835
|
console.log(" CLAUDE.md (pawl context block updated)");
|
|
828
|
-
console.log(" AGENTS.md (
|
|
836
|
+
console.log(" AGENTS.md (universal context block \u2014 readable by all agents)");
|
|
829
837
|
if (detected.hasGitDir) {
|
|
830
838
|
console.log(" .git/hooks/post-commit (universal sync fallback)");
|
|
831
839
|
}
|
|
832
840
|
console.log(" .gitignore (updated)");
|
|
833
841
|
if (detected.hasGitDir) {
|
|
834
|
-
console.log("\n
|
|
835
|
-
console.log(" Each team member should run: pawl init");
|
|
842
|
+
console.log("\n Each team member should run pawl init to activate git sync.");
|
|
836
843
|
} else {
|
|
837
844
|
console.log("\n Note: git repo not detected \u2014 post-commit hook skipped.");
|
|
838
845
|
}
|
|
839
846
|
if (!hasKey) {
|
|
840
847
|
console.log("\n Sync is not yet connected to the Pawl dashboard.");
|
|
841
|
-
console.log("
|
|
842
|
-
console.log(" Get your key at: https://pawl.dev/settings");
|
|
848
|
+
console.log(" Starting connect flow...");
|
|
843
849
|
} else {
|
|
844
850
|
console.log("\n .pawl/.env written \u2014 sync is connected.");
|
|
845
851
|
}
|