usepilot 0.2.0 → 0.4.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.
package/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  Pilot is a dev-only design overlay for your real app. Select an element,
6
6
  search a property the way you'd type a Tailwind class (`pt`, `gap-x`,
7
- `size`), adjust it in a visual editor and see the change live. Then copy your
8
- changes as a prompt for your coding agent: plain-CSS intent it translates into
7
+ `size`), adjust it in a visual editor and see the change live. Then send your
8
+ changes to your coding agent: plain-CSS intent it translates into
9
9
  your project's own conventions (Tailwind classes, CSS modules, design tokens…).
10
10
  Pilot never edits your files.
11
11
 
@@ -51,6 +51,30 @@ export function Pilot() {
51
51
  **Anything else**: import `usepilot/auto` from code that only runs in the
52
52
  browser, in development.
53
53
 
54
+ ## Hand the page over from your agent
55
+
56
+ Pilot works with your coding agent: type `/pilot` in a chat, and Pilot opens
57
+ in your app. Design, press **Send**, and the agent applies your edits while
58
+ you keep going. Pilot shows each change until it's really in your code, and
59
+ sends back to the agent what didn't land.
60
+
61
+ **For a repo you share**: from its root folder, then commit the two files it
62
+ writes (`.claude/skills/pilot/SKILL.md` and `.mcp.json`), so everyone working
63
+ in the repo gets `/pilot`:
64
+
65
+ ```bash
66
+ npx usepilot setup --project
67
+ ```
68
+
69
+ **Just for you, in every project** (nothing goes in the repo):
70
+
71
+ ```bash
72
+ npx usepilot setup
73
+ claude mcp add --scope user pilot -- npx -y usepilot mcp
74
+ ```
75
+
76
+ (Other agents: add `npx -y usepilot mcp` as an MCP server in their settings.)
77
+
54
78
  ## Use
55
79
 
56
80
  1. **Launch**: press **Option+P** (Alt+P) on any page of your app.
@@ -58,10 +82,11 @@ browser, in development.
58
82
  3. **Search and edit**: type a property (`p`, `pt`, `w`, `gap`, `display`,
59
83
  `aspect`…), Tab into its editor, type or drag a value. Cmd/Ctrl+Z undoes.
60
84
  Type `from-768 ` first to make the change for some viewport widths only.
61
- 4. **Copy prompt**: the second toolbar button copies your changes as a
62
- prompt. Paste it to your coding agent.
63
- 5. **Clear changes**: once the agent has applied them, the eraser removes your
64
- changes so you see the real result (Cmd/Ctrl+Z brings them back).
85
+ 4. **Send**: with an agent in `/pilot` mode, the second toolbar button sends
86
+ your changes to it. Keep designing meanwhile; each change stops being
87
+ previewed once it's in your code. Without an agent, the button copies
88
+ your changes as a prompt to paste anywhere (Cmd/Ctrl+Z undoes them once
89
+ they're applied).
65
90
 
66
91
  Your changes survive reloads in the same browser tab. Quit with the toolbar's
67
92
  last button.