usepilot 0.13.0 → 0.15.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 +45 -22
- package/cli/index.js +2572 -39004
- package/dist/{mount-CXYeUQDv.js → mount-CLRI4wJ5.js} +3127 -3301
- package/dist/pilot-auto.js +1 -1
- package/dist/pilot.js +1 -1
- package/package.json +4 -2
- package/types/index.d.ts +7 -2
package/README.md
CHANGED
|
@@ -2,53 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
**Design in your running app. Your agents write the code.**
|
|
4
4
|
|
|
5
|
-
Pilot turns the page you're building into a design surface for your agents.
|
|
5
|
+
Pilot turns the page you're building into a design surface for your agents. You edit, ask for changes or run tasks, they write the code while you keep going, and Pilot checks the real page to show you what landed, not what the agent says it did.
|
|
6
6
|
|
|
7
|
-
- **Edit.** Select an element, type a property the way you'd type a Tailwind class (`pt`, `w`, `gap-x`), and set it with a visual control.
|
|
7
|
+
- **Edit.** Select an element, type a property the way you'd type a Tailwind class (`pt`, `w`, `gap-x`), and set it with a visual control.
|
|
8
8
|
- **Ask for a change.** Click an element with the comment tool and say what you want, in your own words, with a screenshot or a file if it helps. The agent makes the change and tells you in a line what it did.
|
|
9
|
-
- **Run a task.** Type `/` in the comment box and pick one: **Make responsive** makes the element work at every screen width, and **Break and fix** tries it with odd content (very long text, missing or odd-shaped images) and fixes what breaks.
|
|
10
|
-
|
|
11
|
-
Then press **Send**. Your agent writes the changes into your code using your project's own conventions (Tailwind classes, CSS modules, design tokens). Pilot never edits your files itself. It checks the result on the page: what landed stops being previewed, and what didn't goes back to the agent. You see what the code does, not what the agent says it did.
|
|
9
|
+
- **Run a task.** Type `/` in the comment box and pick one: **Make responsive** makes the element work at every screen width, and **Break and fix** tries it with odd content (very long text, missing or odd-shaped images) and fixes what breaks. Your agent's own skills are there too: pick one and the agent uses it for your comment.
|
|
12
10
|
|
|
13
11
|
> **Early preview (0.x).** It works, and things will change between versions.
|
|
14
12
|
|
|
15
13
|
## Install
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Pilot works with **Claude Code**, **Codex** or **Cursor**, on your agent's usual plan.
|
|
16
|
+
|
|
17
|
+
1. **Sign in to your agent in a terminal**, once per computer. Pilot uses your agent's terminal app, not its chat window. Open a terminal and run the two lines for your agent: the first installs it, the second opens your browser to sign in.
|
|
18
|
+
|
|
19
|
+
- **Claude Code:** `curl -fsSL https://claude.ai/install.sh | bash`, then `claude auth login`
|
|
20
|
+
- **Codex:** `npm install -g @openai/codex`, then `codex login`
|
|
21
|
+
- **Cursor:** `curl https://cursor.com/install -fsS | bash`, then `cursor-agent login`
|
|
22
|
+
|
|
23
|
+
Already using your agent in a terminal? Skip this step.
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
2. **Add Pilot to your project.** Paste this into your agent's chat, in the project:
|
|
20
26
|
|
|
21
27
|
```
|
|
22
|
-
Set up Pilot in this project: run `npx usepilot@latest init
|
|
28
|
+
Set up Pilot in this project: run `npx usepilot@latest init` and follow what it prints.
|
|
23
29
|
```
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
It adds Pilot to your app, only while you develop: it never ships to your live site.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
3. **Start Pilot** each time you design. In a terminal, in your project's folder:
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
```bash
|
|
36
|
+
npx usepilot
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Keep it open next to your app, and open your app: Pilot appears on every page. Edit and press Send, or leave a comment: Pilot asks your agent to make the change, and the terminal shows its progress. It uses the agent you set Pilot up with (`npx usepilot --agent codex` switches).
|
|
30
40
|
|
|
31
|
-
**
|
|
41
|
+
**What your agent can do:** edit your project's files, and anything you've already set it to always allow. Anything it would normally ask your permission for is refused, since no one is there to answer: its reply tells you.
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
Pilot needs `npx usepilot` running: without it, the toolbar says so. **Option+P** (Alt+P on Windows and Linux) opens or hides Pilot in your app.
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
### Updating
|
|
46
|
+
|
|
47
|
+
Run this in your project's folder:
|
|
36
48
|
|
|
37
49
|
```bash
|
|
38
50
|
npx usepilot@latest update
|
|
39
51
|
```
|
|
40
52
|
|
|
41
|
-
Then restart your app and
|
|
53
|
+
Then restart your app's dev server and `npx usepilot`. Updating from 0.13 or earlier also removes Pilot's old setup in your agents (its MCP server and the `/pilot` skill): Pilot no longer runs inside a chat.
|
|
42
54
|
|
|
43
55
|
### If something doesn't work
|
|
44
56
|
|
|
45
57
|
- **The toolbar doesn't appear.** Pilot only loads in development, in the browser. Ask your agent to check where `usepilot/auto` is imported. The shortcut is ignored while you're typing in a text field.
|
|
46
|
-
- **The
|
|
47
|
-
- **
|
|
58
|
+
- **The toolbar says "Pilot isn't running for …".** Run `npx usepilot` in your project's folder, and keep it running. If it is running, its terminal says why it left the page: another project's page, or a page set up before 0.15 (ask your agent to run `npx usepilot@latest update`).
|
|
59
|
+
- **The toolbar says your agent isn't signed in**, or couldn't do a job. Sign in with the command above; the terminal running `npx usepilot` shows what the agent said.
|
|
48
60
|
|
|
49
61
|
## Using Pilot
|
|
50
62
|
|
|
51
|
-
1. **
|
|
63
|
+
1. **Open your app** with `npx usepilot` running. Closed Pilot, or moved to another page? **Option+P** (Alt+P) opens it again.
|
|
52
64
|
2. **Select** with the cursor button in the toolbar, then click any element. Its property dialog opens next to it. Shift+click selects several, to edit them together.
|
|
53
65
|
3. **Search and edit.** Type a property (`p`, `pt`, `w`, `gap`, `display`, `aspect`…), press Tab to go into its editor, then type or drag a value. Cmd/Ctrl+Z undoes.
|
|
54
66
|
- Type `from-768 ` first to make the change only for some screen widths.
|
|
@@ -58,7 +70,7 @@ Then restart your app and open a new chat. In Cursor, also switch `pilot` off an
|
|
|
58
70
|
5. **Ask for a change** with the speech-bubble tool: click an element (Shift+click for several) and tell the agent what to change. Type `/` there for tasks like Make responsive and Break and fix.
|
|
59
71
|
6. **Edit text** in place: with the cursor tool on, double-click it.
|
|
60
72
|
|
|
61
|
-
Your changes survive reloads in the same browser tab.
|
|
73
|
+
Your changes survive reloads in the same browser tab. Close Pilot with the toolbar's last button.
|
|
62
74
|
|
|
63
75
|
### Options
|
|
64
76
|
|
|
@@ -69,11 +81,22 @@ mountPilot({
|
|
|
69
81
|
shortcut: "alt+p", // or "ctrl+shift+e", or false
|
|
70
82
|
launch: false, // true: open on load
|
|
71
83
|
nameAttributes: ["data-block"], // attributes your project names elements with
|
|
84
|
+
project: "my-app", // your package.json's name: npx usepilot runs for its own project's pages
|
|
72
85
|
});
|
|
73
86
|
```
|
|
74
87
|
|
|
88
|
+
## Working on Pilot
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pnpm install
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pnpm dev
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The playground opens at http://localhost:5180. Everything else is in [docs/](docs/README.md): how each part works and why, development and releasing, and the [roadmap](docs/roadmap.md).
|
|
99
|
+
|
|
75
100
|
## License
|
|
76
101
|
|
|
77
|
-
[FSL-1.1-MIT](
|
|
78
|
-
for anything except a competing commercial product. Each version becomes MIT
|
|
79
|
-
two years after its release.
|
|
102
|
+
[FSL-1.1-MIT](LICENSE.md) (Functional Source License, MIT Future License). The code is public and free to use, modify and share, including at work, for anything except a competing commercial product or service built from it. Each version becomes MIT two years after it's released.
|