framer-dalton 0.0.4 → 0.0.6
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 +65 -11
- package/dist/cli.js +495 -79
- package/dist/start-relay-server.js +72 -50
- package/docs/skills/framer-canvas-editing-project.md +69 -0
- package/docs/{property-controls.md → skills/framer-code-components.md} +991 -0
- package/docs/{server-api.md → skills/framer.md} +103 -123
- package/package.json +2 -5
- package/docs/all-skills.md +0 -6
- package/docs/code-components.md +0 -115
- package/docs/component-examples.md +0 -869
package/README.md
CHANGED
|
@@ -1,25 +1,79 @@
|
|
|
1
1
|
# Framer Agent CLI
|
|
2
2
|
|
|
3
|
-
CLI and
|
|
3
|
+
CLI and agent skills for interacting with Framer projects via the Framer Server API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
+
Install or refresh the globally available skills:
|
|
8
|
+
|
|
7
9
|
```bash
|
|
8
|
-
npx
|
|
10
|
+
npx framer-dalton@latest setup
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
That installs skills into `~/.agents/skills` and `~/.claude/skills`.
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
The CLI and the installed skills are meant to work together. There are three skills:
|
|
18
|
+
|
|
19
|
+
- `framer` - the base skill that explains how to use the CLI and the API in general.
|
|
20
|
+
- `framer-code-components` - explains specific prompts for how to write code components and provides examples.
|
|
21
|
+
- `framer-canvas-editing-project-<project id>` - a dynamically-created skill that explains how to canvas edit and includes project context.
|
|
22
|
+
|
|
23
|
+
1. Running `npx framer-dalton@latest setup` will install the base `framer` and `framer-code-component` skills.
|
|
24
|
+
2. The frontmatter of `framer-code-components` tells agents to always load `framer` first.
|
|
25
|
+
3. The frontmatter of `framer` tells agents to run `npx framer-dalton@latest setup` BEFORE loading the skill. This command will auto-update the cli and update the skill files.
|
|
26
|
+
4. Creating a new session for a project will create a `framer-canvas-editing-project-<project id>` file. This file contains the latest agent system prompt from `framer.getAgentSystemPrompt` and the latest project context from `framer.getAgentContext`. Agents are told not to load this skill until after creating a session.
|
|
27
|
+
|
|
28
|
+
## Local Development
|
|
29
|
+
|
|
30
|
+
### Running a development build against production headless api server
|
|
31
|
+
|
|
32
|
+
1. Run `make install-dev` in this repo.
|
|
33
|
+
|
|
34
|
+
2. Run your agent in this directory and specifically load the `framer-dev` skill:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Claude:
|
|
38
|
+
> /framer-dev
|
|
39
|
+
|
|
40
|
+
# Codex:
|
|
41
|
+
> $framer-dev
|
|
42
|
+
```
|
|
12
43
|
|
|
13
|
-
|
|
44
|
+
### Running with the local headless plugin server
|
|
45
|
+
|
|
46
|
+
Use this when you change something in the Server API implementation.
|
|
47
|
+
|
|
48
|
+
1. Start FramerStudio with `make dev`.
|
|
49
|
+
2. Start FramerHeadlessAPI against the local tunnel with `make dev-tunnel`.
|
|
50
|
+
3. Run `make install-dev` in this repo.
|
|
51
|
+
4. Run your agent in this directory and specifically load the `framer-dev-local` skill:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Claude:
|
|
55
|
+
> /framer-dev-local
|
|
56
|
+
|
|
57
|
+
# Codex:
|
|
58
|
+
> $framer-dev-local
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Using a local `framer-api` package
|
|
62
|
+
|
|
63
|
+
Use this when you change the server API interface itself, such as adding or changing API methods.
|
|
64
|
+
|
|
65
|
+
1. Publish or otherwise make your updated `framer-api` package available.
|
|
66
|
+
2. Install it locally with `npm install ...`.
|
|
67
|
+
3. Regenerate the type data:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
make generate-types
|
|
71
|
+
```
|
|
14
72
|
|
|
15
|
-
|
|
73
|
+
### Removing local builds and returning to production
|
|
16
74
|
|
|
17
|
-
|
|
75
|
+
Later, to return to the procution skills:
|
|
18
76
|
|
|
19
77
|
```bash
|
|
20
|
-
make
|
|
21
|
-
make build # Build (installs deps automatically)
|
|
22
|
-
make check # Type check + lint
|
|
23
|
-
make format # Auto-format
|
|
24
|
-
make clean # Clean build artifacts
|
|
78
|
+
make uninstall-dev
|
|
25
79
|
```
|