peekable 0.1.3 → 0.1.4
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/commands/init.d.ts +1 -0
- package/dist/commands/init.js +20 -2
- package/dist/commands/register.js +2 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/commands/init.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ type LocalAgentSkillResult = {
|
|
|
6
6
|
codex_skill_installed: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare function installLocalAgentSkills(skillSource: string, jsonOutput: boolean, home?: string): LocalAgentSkillResult;
|
|
9
|
+
export declare function formatInitNextSteps(result: LocalAgentSkillResult): string;
|
|
9
10
|
export declare const initCommand: Command;
|
|
10
11
|
export {};
|
package/dist/commands/init.js
CHANGED
|
@@ -35,8 +35,26 @@ export function installLocalAgentSkills(skillSource, jsonOutput, home = homedir(
|
|
|
35
35
|
codex_skill_installed: codexSkill.installed,
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
+
export function formatInitNextSteps(result) {
|
|
39
|
+
const lines = ["", "Ready to go."];
|
|
40
|
+
const installedSkills = [];
|
|
41
|
+
if (result.skill_installed) {
|
|
42
|
+
installedSkills.push("Claude Code: use the /peekable skill");
|
|
43
|
+
}
|
|
44
|
+
if (result.codex_skill_installed) {
|
|
45
|
+
installedSkills.push("Codex: use the $peekable skill");
|
|
46
|
+
}
|
|
47
|
+
if (installedSkills.length > 0) {
|
|
48
|
+
lines.push("", "Installed agent skills:", ...installedSkills.map((skill) => `- ${skill}`));
|
|
49
|
+
lines.push("", "Example prompts:", '- "Use Peekable to share ./mockups/home.html"', '- "Use Peekable to proxy localhost:3000 for review"');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
lines.push("", "No Claude Code or Codex skill was installed, but the CLI is ready.", 'Try: peekable create "My First Session"');
|
|
53
|
+
}
|
|
54
|
+
return lines.join("\n");
|
|
55
|
+
}
|
|
38
56
|
export const initCommand = new Command("init")
|
|
39
|
-
.description("Set up peekable — install Claude Code
|
|
57
|
+
.description("Set up peekable — install Claude Code/Codex skills and verify connection")
|
|
40
58
|
.option("--json", "Output JSON")
|
|
41
59
|
.action(async (opts) => {
|
|
42
60
|
const config = requireConfig();
|
|
@@ -83,6 +101,6 @@ export const initCommand = new Command("init")
|
|
|
83
101
|
console.log(JSON.stringify(result));
|
|
84
102
|
}
|
|
85
103
|
else {
|
|
86
|
-
console.log(
|
|
104
|
+
console.log(formatInitNextSteps(result));
|
|
87
105
|
}
|
|
88
106
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { writeConfig, readConfig } from "../config.js";
|
|
3
3
|
import { apiNoAuth } from "../api.js";
|
|
4
|
+
import { printCommandError } from "../command-error.js";
|
|
4
5
|
const DEFAULT_URL = "https://peekable.fyi";
|
|
5
6
|
export const registerCommand = new Command("register")
|
|
6
7
|
.description("Register for an API key")
|
|
@@ -50,12 +51,7 @@ export const registerCommand = new Command("register")
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
catch (err) {
|
|
53
|
-
|
|
54
|
-
console.log(JSON.stringify({ error: err.message }));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
console.error(`Registration failed: ${err.message}`);
|
|
58
|
-
}
|
|
54
|
+
printCommandError("Registration failed", err, opts.json);
|
|
59
55
|
process.exit(1);
|
|
60
56
|
}
|
|
61
57
|
});
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.1.
|
|
1
|
+
export declare const CLI_VERSION = "0.1.4";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.1.
|
|
1
|
+
export const CLI_VERSION = "0.1.4";
|