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.
@@ -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 {};
@@ -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 skill and verify connection")
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("\nReady to go! Try: peekable create \"My First Session\"");
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
- if (opts.json) {
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.3";
1
+ export declare const CLI_VERSION = "0.1.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.1.3";
1
+ export const CLI_VERSION = "0.1.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peekable",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Share HTML mockups with collaborators — CLI for peekable-server",
6
6
  "bin": {