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 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. It runs inside your app in development, so you work on the real page with real data, not on a separate canvas:
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. You see the change live.
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
- Works with any agent that supports MCP: Claude Code, Codex, Cursor, VS Code and others.
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
- 1. **Paste this into your agent**, in your project. It installs Pilot and loads it in your app, in development only.
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 --agent <you>`, where <you> is the agent you are (claude-code, cursor, codex, vscode or other), and follow what it prints.
28
+ Set up Pilot in this project: run `npx usepilot@latest init` and follow what it prints.
23
29
  ```
24
30
 
25
- 2. **Open a new chat.** Pilot doesn't work in the chat that installed it. In the new one, ask the agent to **launch Pilot**, or run `/pilot` (`$pilot` in Codex).
31
+ It adds Pilot to your app, only while you develop: it never ships to your live site.
26
32
 
27
- To work on several things at once, launch Pilot in more chats on the same project: each Send or comment goes to a chat that's free, and two chats never work on the same element at once.
33
+ 3. **Start Pilot** each time you design. In a terminal, in your project's folder:
28
34
 
29
- Your agent is connected once for this machine, with nothing added to the repo. In another project, the same prompt only adds Pilot to that app. Teammates paste it in their own agent. To keep the setup in the repo instead, for a team to commit, the agent adds `--project`.
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
- **No agent?** Run `npx usepilot@latest init --agent other` yourself and do the step it prints for loading Pilot. Then press **Option+P** (Alt+P on Windows and Linux) in your app, and **Copy prompt** hands your changes to any chat.
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
- ### Updating Pilot
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
- Ask your agent to **update Pilot**, or run this in your project's folder:
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 open a new chat. In Cursor, also switch `pilot` off and on in Cursor Settings → MCP.
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 agent doesn't know Pilot.** Start a new chat: agents load their MCP servers when a chat starts. Some ask once to approve the project's server: say yes. In Cursor, if `pilot` shows switched off in Cursor Settings (MCP section), switch it on: Cursor keeps servers set up in a repo off until you do.
47
- - **Pilot doesn't open, and another project's chat runs an older Pilot.** Pilots before 0.7.0 all used one port, so two projects on different versions blocked each other. Update Pilot in the older project (`npx usepilot@latest update` there), or close that chat. From 0.7.0, each version has its own port, and projects on different versions run side by side.
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. **Launch:** ask your agent to launch Pilot, or run `/pilot`. Pilot opens in your app, connected to the agent: everything you send goes to it, and it writes the code while you keep designing. Closed Pilot, or moved to another page? **Option+P** (Alt+P) opens it again, still connected while the agent's chat runs Pilot.
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. Quit with the toolbar's last button.
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](./LICENSE.md): free to use, modify and share, including at work,
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.