usepilot 0.12.0 → 0.14.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 +43 -21
- package/cli/index.js +2723 -39246
- package/dist/{mount-Bj7L7fi9.js → mount-BiOBwGgJ.js} +3057 -3285
- package/dist/pilot-auto.js +1 -1
- package/dist/pilot.js +1 -1
- package/package.json +4 -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
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
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.
|
|
12
|
-
|
|
13
11
|
> **Early preview (0.x).** It works, and things will change between versions.
|
|
14
12
|
|
|
15
13
|
## Install
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Pilot runs your coding agent for each change you send: **Claude Code**, **Codex** or **Cursor**. It needs the agent's command-line tool, installed and signed in (once per machine; skip it if you already use it in a terminal):
|
|
16
|
+
|
|
17
|
+
| Agent | Install | Sign in |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| Claude Code | `curl -fsSL https://claude.ai/install.sh \| bash` | `claude auth login` |
|
|
20
|
+
| Codex | `npm install -g @openai/codex` | `codex login` |
|
|
21
|
+
| Cursor | `curl https://cursor.com/install -fsS \| bash` | `cursor-agent login` |
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
It uses your agent's plan, as when you use it yourself.
|
|
24
|
+
|
|
25
|
+
1. **Add Pilot to your project.** Paste this into your agent, 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 installs Pilot, loads it in your app in development only, and checks your agent's command-line tool.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
2. **Run Pilot**, in the project's folder, in a terminal beside your dev server:
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
```bash
|
|
36
|
+
npx usepilot
|
|
37
|
+
```
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
Open your app: Pilot opens on every page. Design and press Send, or comment on an element: Pilot runs your agent for each job, and the terminal shows what it does. No chat needs to stay open. The first time, if several agents are signed in, it asks which to use; `npx usepilot --agent codex` changes it.
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
**What the agent may do:** edit your project's files. Nothing else on your machine, and no internet: each agent runs in its own restricted mode or sandbox.
|
|
34
42
|
|
|
35
|
-
|
|
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.
|
|
44
|
+
|
|
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 this site".** Run `npx usepilot` in your project's folder, and keep it running.
|
|
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
|
|
|
@@ -72,8 +84,18 @@ mountPilot({
|
|
|
72
84
|
});
|
|
73
85
|
```
|
|
74
86
|
|
|
87
|
+
## Working on Pilot
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pnpm install
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pnpm dev
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
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).
|
|
98
|
+
|
|
75
99
|
## License
|
|
76
100
|
|
|
77
|
-
[FSL-1.1-MIT](
|
|
78
|
-
for anything except a competing commercial product. Each version becomes MIT
|
|
79
|
-
two years after its release.
|
|
101
|
+
[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.
|