@astrofoundry/pi-astro 0.2.12 → 0.3.0

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.
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: raycast-script-creator
3
+ description: Create and install a Raycast script command in /Users/astronaute/.config/raycast/script-commands, then register it with chezmoi after the user confirms it works in Raycast. Trigger whenever the user asks to make, add, build, or scaffold a Raycast script, Raycast command, Raycast shortcut, or any shell/zsh command they want to launch from Raycast — even if they don't use the word "script". Use this for ANY request about automating something through Raycast from the keyboard.
4
+ ---
5
+
6
+ # Raycast Script Creator
7
+
8
+ Create a Raycast script command in zsh, drop it in the user's script-commands folder, let the user confirm it works in Raycast, then track it with `chezmoi add`.
9
+
10
+ ## Defaults
11
+
12
+ - **Language**: `zsh` (shebang `#!/usr/bin/env zsh`). Only switch if the user explicitly asks.
13
+ - **Location**: `/Users/astronaute/.config/raycast/script-commands/` (flat, no subfolders).
14
+ - **Filename**: kebab-case of the title + extension matching the language (`.sh` for zsh/bash, `.py` for python, `.applescript` for AppleScript, `.js` for node…).
15
+ - **Author**: `astronaute`.
16
+ - **Icon**: `🤖` unless overridden.
17
+ - **authorURL**: omit.
18
+
19
+ ## Workflow
20
+
21
+ ### 1. Gather intent
22
+
23
+ From the user prompt, decide:
24
+ - **Behavior** — what the script does.
25
+ - **Title** — human-readable, Apple-Style-Guide-ish (`Toggle Hidden Files`, `Open Today's Journal`).
26
+ - **Mode** — `silent` (fire-and-forget), `compact` (short result line), `fullOutput` (long output window), `inline` (live in root search, needs `refreshTime`).
27
+ - **Arguments** — up to 3 positional args, each with `name`, `placeholder`, optional `optional`/`secure`.
28
+ - **needsConfirmation** — true for destructive commands.
29
+
30
+ If anything is ambiguous, ask ONE concise question with a recommended default — never ask blind.
31
+
32
+ ### 2. Verify metadata spec via grimoire
33
+
34
+ Before writing, confirm the current Raycast metadata keys. Do not rely on memory:
35
+
36
+ grimoire search "script command metadata headers" --source raycast-script-commands --top 3
37
+
38
+ Run follow-up searches for edge cases (arguments, icons, refreshTime, packageName).
39
+
40
+ ### 3. Write the script
41
+
42
+ Use the **Write** tool (MCP file-writing is disallowed in this project).
43
+
44
+ Template — **follow the exact section structure below**. Raycast's own template (`templates/script-command.template.sh` in `raycast/script-commands`) groups metadata into three commented sections. Missing `packageName` or skipping these section headers has caused scripts not to appear in Raycast root search even when the required keys are all present.
45
+
46
+ #!/usr/bin/env zsh
47
+
48
+ # Required parameters:
49
+ # @raycast.schemaVersion 1
50
+ # @raycast.title <Title>
51
+ # @raycast.mode <mode>
52
+ # @raycast.packageName <Package>
53
+
54
+ # Optional parameters:
55
+ # @raycast.icon 🤖
56
+ # @raycast.argument1 { "type": "text", "placeholder": "..." }
57
+ # @raycast.currentDirectoryPath ~ # only if needed
58
+ # @raycast.needsConfirmation true # only if true
59
+
60
+ # Documentation:
61
+ # @raycast.description <one-sentence description>
62
+ # @raycast.author astronaute
63
+
64
+ set -euo pipefail
65
+
66
+ <script body>
67
+
68
+ Rules:
69
+ - **Always include `@raycast.packageName`** — e.g. `Security`, `System`, `Developer`, `Network`. It's the root-search subtitle and empirically required for the command to be discovered reliably.
70
+ - **Keep the three section header comments** (`# Required parameters:`, `# Optional parameters:`, `# Documentation:`) — they match the official template and the working scripts already in the folder.
71
+ - **Keep the argument `placeholder` simple text**: no parentheses, no quotes, no JSON-breaking characters. `"prefix"` is fine; `"prefix (e.g. foo)"` is risky.
72
+ - `set -euo pipefail` on every zsh/bash script — fail fast aligns with the user's anti-defensive-programming philosophy.
73
+ - Double quotes around every string literal (project Rule 12).
74
+ - No useless comments (project Rule 5).
75
+ - Blank line separating metadata block from script body; Raycast needs a contiguous comment block at the top.
76
+
77
+ ### 4. Make it executable
78
+
79
+ chmod +x /Users/astronaute/.config/raycast/script-commands/<filename>
80
+
81
+ ### 5. Ask the user to test
82
+
83
+ Say exactly:
84
+
85
+ > Open Raycast, search for **"<Title>"**, run it, and confirm it works as expected. Reply `ok` to track it with chezmoi, or describe the issue.
86
+
87
+ Wait. Do **not** run `chezmoi add` before the user confirms.
88
+
89
+ ### 6. Track with chezmoi
90
+
91
+ On confirmation:
92
+
93
+ chezmoi add /Users/astronaute/.config/raycast/script-commands/<filename>
94
+
95
+ Surface any chezmoi error verbatim — no silent retries. Do **not** run `chezmoi apply`.
96
+
97
+ ## Output modes — quick reference
98
+
99
+ | Mode | Use when |
100
+ |------|----------|
101
+ | `silent` | Side-effect commands (toggle, copy, open). HUD only. |
102
+ | `compact` | Short success/error message or one-liner result. |
103
+ | `fullOutput` | Long / multi-line output (logs, lists). |
104
+ | `inline` | Live result in root search (system info). Requires `refreshTime`. |
105
+
106
+ ## Arguments — quick reference
107
+
108
+ # @raycast.argument1 { "type": "text", "placeholder": "name" }
109
+ # @raycast.argument2 { "type": "dropdown", "placeholder": "env", "data": [{ "title": "Prod", "value": "prod" }] }
110
+
111
+ Positional inside the script: `$1`, `$2`, `$3`.
112
+
113
+ ## Example
114
+
115
+ User: *"Create a Raycast script to copy my public IP to the clipboard."*
116
+
117
+ 1. Title `Copy Public IP`, mode `silent`, icon `🌐`, no args.
118
+ 2. Confirm any uncertain fields with the user.
119
+ 3. `grimoire search "script command metadata headers" --source raycast-script-commands`.
120
+ 4. Write `/Users/astronaute/.config/raycast/script-commands/copy-public-ip.sh`.
121
+ 5. `chmod +x`.
122
+ 6. Ask user to test in Raycast.
123
+ 7. On `ok`, `chezmoi add <path>`.
124
+
125
+ ## Avoid
126
+
127
+ - Writing via MCP tools — use Write.
128
+ - Env-var fallbacks unless user asks (project Rule 9).
129
+ - Disabling shell errors (`set +e`) without confirmation.
130
+ - Running `chezmoi apply` — only `add`.
131
+ - Creating subfolders inside `script-commands/`.
132
+ - Committing or pushing anything — out of scope.
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "astro",
4
+ "vars": {
5
+ "bg": "#0D1117",
6
+ "bgLift": "#161B22",
7
+ "bgSelect": "#1C2128",
8
+ "border": "#30363D",
9
+ "accent": "#FFD700",
10
+ "text": "#E6EDF3",
11
+ "muted": "#8B949E",
12
+ "dim": "#6E7681",
13
+ "success": "#3FB950",
14
+ "error": "#F85149",
15
+ "warning": "#DB6D28"
16
+ },
17
+ "colors": {
18
+ "accent": "accent",
19
+ "border": "border",
20
+ "borderAccent": "accent",
21
+ "borderMuted": "#21262D",
22
+ "success": "success",
23
+ "error": "error",
24
+ "warning": "warning",
25
+ "muted": "muted",
26
+ "dim": "dim",
27
+ "text": "text",
28
+ "thinkingText": "muted",
29
+
30
+ "selectedBg": "bgSelect",
31
+ "userMessageBg": "bgLift",
32
+ "userMessageText": "text",
33
+ "customMessageBg": "#1F1D2E",
34
+ "customMessageText": "#C9D1D9",
35
+ "customMessageLabel": "accent",
36
+ "toolPendingBg": "#21262D",
37
+ "toolSuccessBg": "#0E2818",
38
+ "toolErrorBg": "#2D0E11",
39
+ "toolTitle": "accent",
40
+ "toolOutput": "#C9D1D9",
41
+
42
+ "syntaxComment": "muted",
43
+ "syntaxKeyword": "#FF7B72",
44
+ "syntaxFunction": "#D2A8FF",
45
+ "syntaxVariable": "#FFA657",
46
+ "syntaxString": "#A5D6FF",
47
+ "syntaxNumber": "#79C0FF",
48
+ "syntaxType": "#7EE787",
49
+ "syntaxOperator": "#FF7B72",
50
+ "syntaxPunctuation": "#C9D1D9",
51
+
52
+ "mdHeading": "accent",
53
+ "mdLink": "#58A6FF",
54
+ "mdLinkUrl": "dim",
55
+ "mdCode": "#FF7B72",
56
+ "mdCodeBlock": "text",
57
+ "mdCodeBlockBorder": "border",
58
+ "mdQuote": "muted",
59
+ "mdQuoteBorder": "#B58900",
60
+ "mdHr": "border",
61
+ "mdListBullet": "muted",
62
+
63
+ "toolDiffAdded": "success",
64
+ "toolDiffRemoved": "error",
65
+ "toolDiffContext": "muted",
66
+
67
+ "thinkingOff": "#3D2F0A",
68
+ "thinkingMinimal": "#5C4713",
69
+ "thinkingLow": "#8B6914",
70
+ "thinkingMedium": "#B58900",
71
+ "thinkingHigh": "#DAA520",
72
+ "thinkingXhigh": "accent",
73
+
74
+ "bashMode": "#39C5CF"
75
+ }
76
+ }
package/skills/.gitkeep DELETED
File without changes
package/themes/.gitkeep DELETED
File without changes