peekable 0.1.2 → 0.1.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/README.md CHANGED
@@ -95,6 +95,6 @@ peekable uninstall
95
95
  npm uninstall -g peekable
96
96
  ```
97
97
 
98
- `peekable uninstall` removes local config at `~/.peekable` and the installed
99
- Claude Code skill at `~/.claude/skills/peekable`. It does not delete hosted
100
- sessions or account data.
98
+ `peekable uninstall` removes local config at `~/.peekable` and installed agent
99
+ skills at `~/.claude/skills/peekable` and `~/.codex/skills/peekable`. It does
100
+ not delete hosted sessions or account data.
@@ -1,2 +1,10 @@
1
1
  import { Command } from "commander";
2
+ type LocalAgentSkillResult = {
3
+ claude_code: boolean;
4
+ skill_installed: boolean;
5
+ codex: boolean;
6
+ codex_skill_installed: boolean;
7
+ };
8
+ export declare function installLocalAgentSkills(skillSource: string, jsonOutput: boolean, home?: string): LocalAgentSkillResult;
2
9
  export declare const initCommand: Command;
10
+ export {};
@@ -1,11 +1,40 @@
1
1
  import { Command } from "commander";
2
2
  import { existsSync, mkdirSync, cpSync } from "fs";
3
+ import { homedir } from "os";
3
4
  import { join, dirname } from "path";
4
5
  import { fileURLToPath } from "url";
5
6
  import { requireConfig } from "../config.js";
6
7
  import { api } from "../api.js";
7
- import { getClaudeDir, getClaudePeekableSkillDir } from "../paths.js";
8
+ import { getClaudeDir, getClaudePeekableSkillDir, getCodexDir, getCodexPeekableSkillDir, } from "../paths.js";
8
9
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ function installPeekableSkill(appName, appDir, skillDir, skillSource, jsonOutput) {
11
+ const detected = existsSync(appDir);
12
+ if (!detected) {
13
+ if (!jsonOutput)
14
+ console.log(`${appName} not detected — skipping skill install.`);
15
+ return { detected, installed: false };
16
+ }
17
+ if (!existsSync(skillSource)) {
18
+ if (!jsonOutput)
19
+ console.log(`${appName} detected but skill template not found.`);
20
+ return { detected, installed: false };
21
+ }
22
+ mkdirSync(skillDir, { recursive: true });
23
+ cpSync(skillSource, join(skillDir, "SKILL.md"));
24
+ if (!jsonOutput)
25
+ console.log(`${appName} /peekable skill installed.`);
26
+ return { detected, installed: true };
27
+ }
28
+ export function installLocalAgentSkills(skillSource, jsonOutput, home = homedir()) {
29
+ const claudeSkill = installPeekableSkill("Claude Code", getClaudeDir(home), getClaudePeekableSkillDir(home), skillSource, jsonOutput);
30
+ const codexSkill = installPeekableSkill("Codex", getCodexDir(home), getCodexPeekableSkillDir(home), skillSource, jsonOutput);
31
+ return {
32
+ claude_code: claudeSkill.detected,
33
+ skill_installed: claudeSkill.installed,
34
+ codex: codexSkill.detected,
35
+ codex_skill_installed: codexSkill.installed,
36
+ };
37
+ }
9
38
  export const initCommand = new Command("init")
10
39
  .description("Set up peekable — install Claude Code skill and verify connection")
11
40
  .option("--json", "Output JSON")
@@ -30,32 +59,9 @@ export const initCommand = new Command("init")
30
59
  }
31
60
  if (!opts.json)
32
61
  console.log("Connection verified.");
33
- // 2. Detect Claude Code and install skill
34
- const claudeDir = getClaudeDir();
35
- const claudeCodeDetected = existsSync(claudeDir);
36
- result.claude_code = claudeCodeDetected;
37
- if (claudeCodeDetected) {
38
- const skillDir = getClaudePeekableSkillDir();
39
- // Resolve skill source relative to compiled output location
40
- const skillSource = join(__dirname, "..", "..", "skill", "SKILL.md");
41
- if (existsSync(skillSource)) {
42
- mkdirSync(skillDir, { recursive: true });
43
- cpSync(skillSource, join(skillDir, "SKILL.md"));
44
- result.skill_installed = true;
45
- if (!opts.json)
46
- console.log("Claude Code /peekable skill installed.");
47
- }
48
- else {
49
- result.skill_installed = false;
50
- if (!opts.json)
51
- console.log("Claude Code detected but skill template not found.");
52
- }
53
- }
54
- else {
55
- result.skill_installed = false;
56
- if (!opts.json)
57
- console.log("Claude Code not detected — skipping skill install.");
58
- }
62
+ // 2. Detect local agent tools and install skill
63
+ const skillSource = join(__dirname, "..", "..", "skill", "SKILL.md");
64
+ Object.assign(result, installLocalAgentSkills(skillSource, opts.json));
59
65
  // 3. Test push
60
66
  try {
61
67
  const session = await api(config, "POST", "/sessions", { name: "__share_init_test__" });
@@ -1,7 +1,7 @@
1
1
  import { Command } from "commander";
2
2
  import { existsSync, rmSync } from "fs";
3
3
  import { homedir } from "os";
4
- import { getClaudePeekableSkillDir, getPeekableConfigDir } from "../paths.js";
4
+ import { getClaudePeekableSkillDir, getCodexPeekableSkillDir, getPeekableConfigDir } from "../paths.js";
5
5
  function getUninstallTargets(home = homedir()) {
6
6
  return [
7
7
  {
@@ -12,6 +12,10 @@ function getUninstallTargets(home = homedir()) {
12
12
  label: "Claude Code skill",
13
13
  path: getClaudePeekableSkillDir(home),
14
14
  },
15
+ {
16
+ label: "Codex skill",
17
+ path: getCodexPeekableSkillDir(home),
18
+ },
15
19
  ];
16
20
  }
17
21
  export function removeLocalPeekableFiles(home = homedir(), removeTarget = rmSync) {
package/dist/paths.d.ts CHANGED
@@ -2,3 +2,5 @@ export declare function getPeekableConfigDir(home?: string): string;
2
2
  export declare function getPeekableConfigFile(home?: string): string;
3
3
  export declare function getClaudeDir(home?: string): string;
4
4
  export declare function getClaudePeekableSkillDir(home?: string): string;
5
+ export declare function getCodexDir(home?: string): string;
6
+ export declare function getCodexPeekableSkillDir(home?: string): string;
package/dist/paths.js CHANGED
@@ -12,3 +12,9 @@ export function getClaudeDir(home = homedir()) {
12
12
  export function getClaudePeekableSkillDir(home = homedir()) {
13
13
  return join(getClaudeDir(home), "skills", "peekable");
14
14
  }
15
+ export function getCodexDir(home = homedir()) {
16
+ return join(home, ".codex");
17
+ }
18
+ export function getCodexPeekableSkillDir(home = homedir()) {
19
+ return join(getCodexDir(home), "skills", "peekable");
20
+ }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const CLI_VERSION = "0.1.2";
1
+ export declare const CLI_VERSION = "0.1.3";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.1.2";
1
+ export const CLI_VERSION = "0.1.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peekable",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Share HTML mockups with collaborators — CLI for peekable-server",
6
6
  "bin": {
package/skill/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: peekable
3
- description: Share HTML mockups with collaborators via public URLs. Push from Claude Code, collect structured feedback and element-level annotations. Use when the user says "share this", "share with", "/share", "/peekable", "peekable", or wants to get a collaborator's feedback on a mockup.
3
+ description: Share HTML mockups with collaborators via public URLs. Push from Claude Code or Codex, collect structured feedback and element-level annotations. Use when the user says "share this", "share with", "/share", "/peekable", "peekable", or wants to get a collaborator's feedback on a mockup.
4
4
  ---
5
5
 
6
6
  # Peekable