Skip to content

Commit 0eb3e4c

Browse files
committed
Add aether-cli skill for CLI usage guidance
1 parent aa64bc9 commit 0eb3e4c

1 file changed

Lines changed: 111 additions & 0 deletions

File tree

.claude/skills/aether-cli/SKILL.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
name: aether-cli
3+
description: >
4+
Use when the user wants to drive Aether from the command line — generating
5+
themes from wallpapers, applying or managing blueprints, importing Base16 or
6+
colors.toml schemes, inspecting the running editor, or scripting palette/
7+
color operations. Covers both the standalone CLI (works without the GUI) and
8+
the IPC remote-control commands (require the GUI to be running). Invoke when
9+
the user mentions `aether --generate`, `aether status`, `aether apply`,
10+
blueprints from the shell, shell/JSON scripting against Aether, or asks
11+
"how do I do X from the CLI".
12+
---
13+
14+
# Aether CLI
15+
16+
Aether's CLI has **two operating modes**. Knowing which you need is the entire mental model.
17+
18+
## 1. Standalone (works without GUI)
19+
20+
Flags start with `--`. Read/write files directly, no running process required.
21+
22+
```bash
23+
aether --generate ~/wallpapers/forest.jpg # extract + apply theme
24+
aether --extract-palette ~/wallpapers/forest.jpg # extract only, no apply
25+
aether --list-blueprints
26+
aether --apply-blueprint my-theme
27+
aether --color-info '#8b3a62' # all reps of a color
28+
aether --contrast '#8b3a62' '#ffffff' # WCAG ratio + grade
29+
aether --palette-from-color '#8b3a62' # derive 16-color palette
30+
aether --import-base16 ./catppuccin-mocha.yaml
31+
```
32+
33+
Exits 0 on success, 1 on error. Errors go to stderr unless `--json` is set (then `{"error": "..."}` on stdout).
34+
35+
## 2. Remote control (requires running GUI)
36+
37+
Subcommands **without** leading `--`. Talk to the GUI over a Unix socket.
38+
39+
```bash
40+
aether status # live editor state — palette, lightMode, mode, wallpaper
41+
aether extract ~/w/forest.jpg # load wallpaper into the editor
42+
aether set-color 4 '#89b4fa' # change palette slot 4
43+
aether adjust --vibrance 0.3 --saturation -0.1
44+
aether set-mode pastel
45+
aether apply # write theme files and reload apps
46+
aether toggle-light-mode
47+
aether load-blueprint my-theme # load into editor (does NOT apply)
48+
aether apply-blueprint my-theme # load AND apply in one step
49+
aether set-wallpaper ~/w/forest.jpg
50+
```
51+
52+
If the GUI isn't running, these fail with a socket error. Launch `aether` first or run the non-dash variants.
53+
54+
**`aether status` returns what the editor currently shows** (as of the state-sync feature) — edits in the GUI propagate to the Go state within ~300ms of the last change. Before that feature, status was stale after GUI edits; don't write scripts assuming the old behavior.
55+
56+
## Extraction modes
57+
58+
The mode controls the palette-generation strategy in `extraction/`. Pass with `--extract-mode` to the standalone commands or `set-mode` via IPC:
59+
60+
- `normal` (default) — dominant-color median-cut
61+
- `monochromatic` — shades/tints of a single hue
62+
- `analogous` — neighbours on the color wheel
63+
- `pastel`, `muted`, `colorful`, `bright`, `material`
64+
65+
List at runtime: `aether --list-modes`.
66+
67+
## JSON for scripting
68+
69+
Append `--json` to most read-oriented standalone commands for stable machine-readable output:
70+
71+
```bash
72+
aether --color-info '#8b3a62' --json
73+
aether --palette-info my-theme --json # blueprint name or JSON array
74+
aether --list-favorites --json
75+
aether --current-theme --json
76+
```
77+
78+
`--json` is *not* honoured by the IPC remote-control subcommands — those always print a human status block. Parse the output or use `aether --current-theme --json` instead.
79+
80+
## Palette-as-argument
81+
82+
Commands that take "a palette" accept either:
83+
- A blueprint name: `aether --palette-info my-theme`
84+
- A raw JSON array of 16 hex strings: `aether --palette-info '["#000000", ...]'`
85+
86+
## Common one-liners
87+
88+
```bash
89+
# Pick a random wallpaper and theme from it
90+
aether --generate "$(aether --random-wallpaper)"
91+
92+
# Apply every saved blueprint in a rotation (cron)
93+
aether --apply-blueprint "$(aether --list-blueprints --json | jq -r '.[].name' | shuf -n1)"
94+
95+
# Diff current editor palette against a blueprint
96+
diff <(aether status) <(aether --show-blueprint my-theme)
97+
```
98+
99+
## Pitfalls
100+
101+
- **`aether --generate` vs `aether extract`** — the dashed version runs the full extract-and-apply pipeline offline; the undashed one just *loads into the editor* of a running GUI. Easy to confuse.
102+
- **Blueprint name matching is exact.** `aether --show-blueprint my-theme` fails silently with a different message than `my_theme`. Use `aether --list-blueprints` to confirm names.
103+
- **`~/` expansion** is handled by the CLI for path args (`expandHome` in `cli/cli.go`), but only for arguments it knows are paths. Trust the shell to expand it when in doubt.
104+
- **No global config for the CLI.** `--light-mode` and `--extract-mode <mode>` must be passed every invocation; they're not persisted across calls.
105+
- **The Wails GUI writes its own config at `~/.config/aether/`** — the CLI reads from it (for blueprints, favorites) but doesn't mutate it through `--generate`. To change default extraction mode, use the GUI or set it in the appropriate JSON file there.
106+
107+
## Reference
108+
109+
Full exhaustive list: `aether --help`. This skill covers the patterns the help text doesn't — don't re-read `--help` verbatim to the user.
110+
111+
Source of truth: `cli/cli.go` (dispatch), `cli/ipc_commands.go` (remote-control), `cli/output.go` (JSON + palette-name parsing).

0 commit comments

Comments
 (0)