framer-dalton 0.0.28 → 0.0.29
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 +3 -3
- package/dist/cli.js +9 -9
- package/dist/start-relay-server.js +73 -29
- package/docs/skills/framer-project.md +16 -16
- package/docs/skills/framer.md +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ CLI and agent skills for interacting with Framer projects via the Framer Server
|
|
|
7
7
|
Install or refresh the globally available skills:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx framer
|
|
10
|
+
npx @framer/agent@latest setup
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
That installs skills into `~/.agents/skills` and `~/.claude/skills`.
|
|
@@ -20,9 +20,9 @@ The CLI and the installed skills are meant to work together. There are three ski
|
|
|
20
20
|
- `framer-code-components` - explains specific prompts for how to write code components and provides examples.
|
|
21
21
|
- `framer-project-<project id>` - a dynamically-created skill for interacting with a specific project.
|
|
22
22
|
|
|
23
|
-
1. Running `npx framer
|
|
23
|
+
1. Running `npx @framer/agent@latest setup` will install the base `framer` and `framer-code-components` skills.
|
|
24
24
|
2. The frontmatter of `framer-code-components` tells agents to always load `framer` and the generated project skill first.
|
|
25
|
-
3. The frontmatter of `framer` tells agents to run `npx framer
|
|
25
|
+
3. The frontmatter of `framer` tells agents to run `npx @framer/agent@latest setup` BEFORE loading the skill. This command will auto-update the cli and update the skill files.
|
|
26
26
|
4. Creating a new session for a project will create a `framer-project-<project id>` file. This file contains the latest agent system prompt from `framer.agent.getSystemPrompt` and the latest project context from `framer.agent.getContext`. Agents must load this project-specific skill immediately after creating a session before doing any connected-project work.
|
|
27
27
|
|
|
28
28
|
## Local Development
|
package/dist/cli.js
CHANGED
|
@@ -12,12 +12,12 @@ import net from 'net';
|
|
|
12
12
|
import { fileURLToPath } from 'url';
|
|
13
13
|
import { createTRPCClient, httpLink } from '@trpc/client';
|
|
14
14
|
|
|
15
|
-
/* @framer/ai CLI v0.0.
|
|
15
|
+
/* @framer/ai CLI v0.0.29 */
|
|
16
16
|
var __defProp = Object.defineProperty;
|
|
17
17
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
18
18
|
|
|
19
19
|
// package.json
|
|
20
|
-
var name = "framer
|
|
20
|
+
var name = "@framer/agent";
|
|
21
21
|
|
|
22
22
|
// src/check-node-version.ts
|
|
23
23
|
var MINIMUM_NODE_VERSION = 22;
|
|
@@ -375,7 +375,7 @@ __name(markTelemetryNoticeShown, "markTelemetryNoticeShown");
|
|
|
375
375
|
// src/version.ts
|
|
376
376
|
var VERSION = (
|
|
377
377
|
// typeof is used to ensure this can be used just via tsx or node etc. without build
|
|
378
|
-
"0.0.
|
|
378
|
+
"0.0.29"
|
|
379
379
|
);
|
|
380
380
|
var trackingEndpoint = "https://events.framer.com/track";
|
|
381
381
|
var inProgressTrackings = /* @__PURE__ */ new Set();
|
|
@@ -592,7 +592,7 @@ function formatErrorForUser(error, opts) {
|
|
|
592
592
|
const rehydrated = rehydrateFramerAPIError(error);
|
|
593
593
|
if (rehydrated) return rehydrated.toString();
|
|
594
594
|
if (!opts?.fromExecResult && isRelayConnectionLost(error))
|
|
595
|
-
return "Connection to the Framer server was lost. Run `framer session new` to reconnect.";
|
|
595
|
+
return "Connection to the Framer server was lost. Run `npx @framer/agent@latest session new` to reconnect.";
|
|
596
596
|
const ref = getErrorRef(error);
|
|
597
597
|
return ref ? `${error.message} [ref: ${ref}]` : error.message;
|
|
598
598
|
}
|
|
@@ -855,7 +855,7 @@ function runBrowserAuthFlow(options) {
|
|
|
855
855
|
printError(` 1. Open Site Settings \u2192 General: ${settingsUrl}`);
|
|
856
856
|
printError(" 2. Scroll to API Keys and create a new key");
|
|
857
857
|
printError(
|
|
858
|
-
` 3. In another terminal, run: framer project auth ${pollProjectId} <your-api-key>`
|
|
858
|
+
` 3. In another terminal, run: npx @framer/agent@latest project auth ${pollProjectId} <your-api-key>`
|
|
859
859
|
);
|
|
860
860
|
print("");
|
|
861
861
|
print("Waiting for authorization in browser...");
|
|
@@ -869,7 +869,7 @@ function runBrowserAuthFlow(options) {
|
|
|
869
869
|
});
|
|
870
870
|
reject(
|
|
871
871
|
new Error(
|
|
872
|
-
pollProjectId ? "Browser authorization timed out. Use `framer project auth <projectUrlOrId> <apiKey>` instead." : "Browser authorization timed out."
|
|
872
|
+
pollProjectId ? "Browser authorization timed out. Use `npx @framer/agent@latest project auth <projectUrlOrId> <apiKey>` instead." : "Browser authorization timed out."
|
|
873
873
|
)
|
|
874
874
|
);
|
|
875
875
|
});
|
|
@@ -16197,7 +16197,7 @@ function renderDocs(queries) {
|
|
|
16197
16197
|
const suggestion = findClosestMatch(query, methodNames);
|
|
16198
16198
|
const hint = suggestion ? ` Did you mean '${suggestion}'?` : "";
|
|
16199
16199
|
errors.push(
|
|
16200
|
-
`Method '${query}' not found.${hint} Use 'framer docs' to list all.`
|
|
16200
|
+
`Method '${query}' not found.${hint} Use 'npx @framer/agent@latest docs' to list all.`
|
|
16201
16201
|
);
|
|
16202
16202
|
return { lines, errors };
|
|
16203
16203
|
}
|
|
@@ -16246,7 +16246,7 @@ ${typeDef}`);
|
|
|
16246
16246
|
const suggestion = findClosestMatch(query, bareNames);
|
|
16247
16247
|
const hint = suggestion ? ` Did you mean '${suggestion}'?` : "";
|
|
16248
16248
|
errors.push(
|
|
16249
|
-
`'${query}' not found.${hint} Use 'framer docs' to list all.`
|
|
16249
|
+
`'${query}' not found.${hint} Use 'npx @framer/agent@latest docs' to list all.`
|
|
16250
16250
|
);
|
|
16251
16251
|
return { lines, errors };
|
|
16252
16252
|
}
|
|
@@ -16639,7 +16639,7 @@ function installSkills(options = { type: "base" }) {
|
|
|
16639
16639
|
__name(installSkills, "installSkills");
|
|
16640
16640
|
|
|
16641
16641
|
// src/cli.ts
|
|
16642
|
-
var PROGRAM_NAME = "framer
|
|
16642
|
+
var PROGRAM_NAME = "@framer/agent";
|
|
16643
16643
|
var program = new Command();
|
|
16644
16644
|
program.name(PROGRAM_NAME).version(VERSION).description("Framer Server API CLI").option("--debug", "Enable debug logging").hook("preAction", (thisCommand) => {
|
|
16645
16645
|
const opts = thisCommand.opts();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs4 from 'fs';
|
|
2
2
|
import os5 from 'os';
|
|
3
|
-
import
|
|
3
|
+
import path5 from 'path';
|
|
4
4
|
import { execFileSync } from 'child_process';
|
|
5
5
|
import 'net';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
@@ -14,7 +14,7 @@ import { z } from 'zod';
|
|
|
14
14
|
import { createRequire } from 'module';
|
|
15
15
|
import * as vm from 'vm';
|
|
16
16
|
|
|
17
|
-
/* @framer/ai relay server v0.0.
|
|
17
|
+
/* @framer/ai relay server v0.0.29 */
|
|
18
18
|
var __defProp = Object.defineProperty;
|
|
19
19
|
var __knownSymbol = (name2, symbol) => (symbol = Symbol[name2]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name2);
|
|
20
20
|
var __typeError = (msg) => {
|
|
@@ -60,7 +60,7 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
// package.json
|
|
63
|
-
var name = "framer
|
|
63
|
+
var name = "@framer/agent";
|
|
64
64
|
|
|
65
65
|
// src/check-node-version.ts
|
|
66
66
|
var MINIMUM_NODE_VERSION = 22;
|
|
@@ -79,16 +79,16 @@ var maxLogFileBytes = DEFAULT_MAX_LOG_FILE_BYTES;
|
|
|
79
79
|
var retainedLogFileBytes = DEFAULT_RETAINED_LOG_FILE_BYTES;
|
|
80
80
|
function getLogPath() {
|
|
81
81
|
if (process.env.XDG_STATE_HOME) {
|
|
82
|
-
return
|
|
82
|
+
return path5.join(process.env.XDG_STATE_HOME, "framer", "relay.log");
|
|
83
83
|
}
|
|
84
84
|
if (process.platform === "win32") {
|
|
85
|
-
return
|
|
85
|
+
return path5.join(
|
|
86
86
|
process.env.APPDATA || os5.homedir(),
|
|
87
87
|
"framer",
|
|
88
88
|
"relay.log"
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
return
|
|
91
|
+
return path5.join(os5.homedir(), ".local", "state", "framer", "relay.log");
|
|
92
92
|
}
|
|
93
93
|
__name(getLogPath, "getLogPath");
|
|
94
94
|
var logPath = getLogPath();
|
|
@@ -96,7 +96,7 @@ var initialized = false;
|
|
|
96
96
|
var logEntriesSinceTrimCheck = LOG_TRIM_CHECK_INTERVAL - 1;
|
|
97
97
|
function ensureLogDir() {
|
|
98
98
|
if (initialized) return;
|
|
99
|
-
const dir =
|
|
99
|
+
const dir = path5.dirname(logPath);
|
|
100
100
|
fs4.mkdirSync(dir, { recursive: true });
|
|
101
101
|
initialized = true;
|
|
102
102
|
}
|
|
@@ -143,12 +143,12 @@ function log(message) {
|
|
|
143
143
|
__name(log, "log");
|
|
144
144
|
function getConfigDir() {
|
|
145
145
|
if (process.env.XDG_CONFIG_HOME) {
|
|
146
|
-
return
|
|
146
|
+
return path5.join(process.env.XDG_CONFIG_HOME, "framer");
|
|
147
147
|
}
|
|
148
148
|
if (process.platform === "win32") {
|
|
149
|
-
return
|
|
149
|
+
return path5.join(process.env.APPDATA || os5.homedir(), "framer");
|
|
150
150
|
}
|
|
151
|
-
return
|
|
151
|
+
return path5.join(os5.homedir(), ".config", "framer");
|
|
152
152
|
}
|
|
153
153
|
__name(getConfigDir, "getConfigDir");
|
|
154
154
|
function ensureConfigDir() {
|
|
@@ -159,7 +159,7 @@ __name(ensureConfigDir, "ensureConfigDir");
|
|
|
159
159
|
|
|
160
160
|
// src/config/relay-token.ts
|
|
161
161
|
function getRelayTokenPath() {
|
|
162
|
-
return
|
|
162
|
+
return path5.join(getConfigDir(), "relay-token");
|
|
163
163
|
}
|
|
164
164
|
__name(getRelayTokenPath, "getRelayTokenPath");
|
|
165
165
|
function generateRelayToken() {
|
|
@@ -199,12 +199,12 @@ __name(debug, "debug");
|
|
|
199
199
|
// src/version.ts
|
|
200
200
|
var VERSION = (
|
|
201
201
|
// typeof is used to ensure this can be used just via tsx or node etc. without build
|
|
202
|
-
"0.0.
|
|
202
|
+
"0.0.29"
|
|
203
203
|
);
|
|
204
204
|
|
|
205
205
|
// src/relay-client.ts
|
|
206
206
|
var __filename$1 = fileURLToPath(import.meta.url);
|
|
207
|
-
|
|
207
|
+
path5.dirname(__filename$1);
|
|
208
208
|
var RELAY_PORT = Number(process.env.FRAMER_CLI_PORT) || 19988;
|
|
209
209
|
createTRPCClient({
|
|
210
210
|
links: [
|
|
@@ -303,30 +303,74 @@ var ScopedFS = class {
|
|
|
303
303
|
static {
|
|
304
304
|
__name(this, "ScopedFS");
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
allowedRoots;
|
|
307
307
|
constructor(allowedDirs) {
|
|
308
308
|
const defaultDirs = [process.cwd(), "/tmp", os5.tmpdir()];
|
|
309
309
|
const dirs = allowedDirs ?? defaultDirs;
|
|
310
|
-
this.
|
|
310
|
+
this.allowedRoots = [
|
|
311
|
+
...new Set(dirs.map((dir) => this.canonicalizePath(dir)))
|
|
312
|
+
];
|
|
311
313
|
}
|
|
312
|
-
isPathAllowed(
|
|
313
|
-
return this.
|
|
314
|
-
return
|
|
314
|
+
isPathAllowed(candidatePath) {
|
|
315
|
+
return this.allowedRoots.some((allowedRoot) => {
|
|
316
|
+
return candidatePath === allowedRoot || candidatePath.startsWith(allowedRoot + path5.sep);
|
|
315
317
|
});
|
|
316
318
|
}
|
|
317
319
|
resolvePath(filePath) {
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
const resolvedPath = path5.resolve(filePath);
|
|
321
|
+
const canonicalPath = this.canonicalizePath(resolvedPath);
|
|
322
|
+
if (!this.isPathAllowed(canonicalPath)) {
|
|
323
|
+
this.throwOutsideAllowedRoots(filePath);
|
|
324
|
+
}
|
|
325
|
+
return resolvedPath;
|
|
326
|
+
}
|
|
327
|
+
canonicalizePath(inputPath) {
|
|
328
|
+
const resolvedPath = path5.resolve(inputPath);
|
|
329
|
+
const missingSegments = [];
|
|
330
|
+
let ancestorPath = resolvedPath;
|
|
331
|
+
while (true) {
|
|
332
|
+
const realPath = this.resolveRealPath(ancestorPath);
|
|
333
|
+
if (realPath !== null) {
|
|
334
|
+
return path5.resolve(realPath, ...missingSegments);
|
|
335
|
+
}
|
|
336
|
+
if (this.isSymbolicLink(ancestorPath)) {
|
|
337
|
+
this.throwOutsideAllowedRoots(inputPath);
|
|
338
|
+
}
|
|
339
|
+
const parentPath = path5.dirname(ancestorPath);
|
|
340
|
+
if (parentPath === ancestorPath) {
|
|
341
|
+
return resolvedPath;
|
|
342
|
+
}
|
|
343
|
+
missingSegments.unshift(path5.basename(ancestorPath));
|
|
344
|
+
ancestorPath = parentPath;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
resolveRealPath(targetPath) {
|
|
348
|
+
try {
|
|
349
|
+
return path5.resolve(fs4.realpathSync.native(targetPath));
|
|
350
|
+
} catch (error) {
|
|
351
|
+
const errnoError = error;
|
|
352
|
+
if (errnoError.code === "ENOENT") {
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
327
355
|
throw error;
|
|
328
356
|
}
|
|
329
|
-
|
|
357
|
+
}
|
|
358
|
+
isSymbolicLink(targetPath) {
|
|
359
|
+
try {
|
|
360
|
+
return fs4.lstatSync(targetPath).isSymbolicLink();
|
|
361
|
+
} catch {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
throwOutsideAllowedRoots(filePath) {
|
|
366
|
+
const error = new Error(
|
|
367
|
+
`EPERM: operation not permitted, access outside allowed directories: ${filePath}`
|
|
368
|
+
);
|
|
369
|
+
error.code = "EPERM";
|
|
370
|
+
error.errno = -1;
|
|
371
|
+
error.syscall = "access";
|
|
372
|
+
error.path = filePath;
|
|
373
|
+
throw error;
|
|
330
374
|
}
|
|
331
375
|
// Sync methods
|
|
332
376
|
readFileSync = /* @__PURE__ */ __name((filePath, options) => {
|
|
@@ -776,7 +820,7 @@ var SettingsFileSchema = z.object({
|
|
|
776
820
|
telemetryNoticeShown: z.boolean().optional()
|
|
777
821
|
});
|
|
778
822
|
function getSettingsPath() {
|
|
779
|
-
return
|
|
823
|
+
return path5.join(getConfigDir(), "settings.json");
|
|
780
824
|
}
|
|
781
825
|
__name(getSettingsPath, "getSettingsPath");
|
|
782
826
|
var settings;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: {{SKILL_NAME}}
|
|
3
3
|
description: "Project-scoped Framer skill for project {{PROJECT_ID}}. Covers project reads, edits, change review, publishing, image sourcing, component operations, and canvas editing. Very important: never load this skill without having already read the `framer` skill and without having already run `session new`, which will dynamically update this skill."
|
|
4
|
-
allowed-tools: ["Bash(npx framer
|
|
4
|
+
allowed-tools: ["Bash(npx @framer/agent:*)", "Bash(npx @framer/agent@latest:*)", "Read({{FRAMER_TEMPORARY_DIR}}/*)", "Write({{FRAMER_TEMPORARY_DIR}}/*)"]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Project Scope
|
|
@@ -15,11 +15,11 @@ Every connected-project task follows these steps:
|
|
|
15
15
|
|
|
16
16
|
### 1. Look up the API (before EVERY new use of an API method)
|
|
17
17
|
|
|
18
|
-
**You MUST run `npx framer
|
|
18
|
+
**You MUST run `npx @framer/agent@latest docs` before writing any code.** Do not guess method names or signatures.
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npx framer
|
|
22
|
-
npx framer
|
|
21
|
+
npx @framer/agent@latest docs Collection # What methods exist?
|
|
22
|
+
npx @framer/agent@latest docs Collection.getItems # What are the parameters and return type?
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### 2. Execute code
|
|
@@ -27,7 +27,7 @@ npx framer-dalton docs Collection.getItems # What are the parameters and return
|
|
|
27
27
|
Only after checking docs, use your write tool to write your code to a unique file under `{{FRAMER_TEMPORARY_DIR}}/`, then execute it with `-f`. Do not create code files with shell heredocs or `cat`. Name each file `<sessionId>-<short-summary>.js` where `<short-summary>` is a brief kebab-case description (e.g., `1-read-collections.js`, `1-add-team-member.js`).
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx framer
|
|
30
|
+
npx @framer/agent@latest exec -s 1 -f {{FRAMER_TEMPORARY_DIR}}/1-read-collections.js
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### 3. Store results in `state`
|
|
@@ -38,7 +38,7 @@ Always save results you'll need again. Don't repeat API calls.
|
|
|
38
38
|
|
|
39
39
|
Choose the highest-priority interface available for the task:
|
|
40
40
|
|
|
41
|
-
1. Subcommands, such as `framer
|
|
41
|
+
1. Subcommands, such as `npx @framer/agent@latest read-project` and `npx @framer/agent@latest apply-changes`
|
|
42
42
|
2. Agent-specific methods, such as `framer.agent.readProject`, `framer.agent.applyChanges`, and `framer.agent.publish`
|
|
43
43
|
3. Generic plugin API methods, such as top-level `framer.*` methods
|
|
44
44
|
|
|
@@ -87,7 +87,7 @@ state.collections = await framer.getCollections();
|
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
npx framer
|
|
90
|
+
npx @framer/agent@latest exec -s 1 -f {{FRAMER_TEMPORARY_DIR}}/1-get-collections.js
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
```js
|
|
@@ -97,7 +97,7 @@ console.log(state.teamItems.length);
|
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
|
-
npx framer
|
|
100
|
+
npx @framer/agent@latest exec -s 1 -f {{FRAMER_TEMPORARY_DIR}}/1-get-team-items.js
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
Store anything you'll reference again.
|
|
@@ -141,7 +141,7 @@ Prompting may take a while to complete, so set the command timeout to 10 minutes
|
|
|
141
141
|
Prefer using your write tool to write code to a unique file under `{{FRAMER_TEMPORARY_DIR}}/` and executing it with `-f`. Do not create code files with shell heredocs or `cat`:
|
|
142
142
|
|
|
143
143
|
```bash
|
|
144
|
-
npx framer
|
|
144
|
+
npx @framer/agent@latest exec -s <sessionId> -f {{FRAMER_TEMPORARY_DIR}}/<sessionId>-<short-summary>.js
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
For short snippets, `exec` also accepts `-e <code>` or code piped on stdin.
|
|
@@ -154,24 +154,24 @@ In Windows PowerShell, if an argument contains nested quotes, use a single-quote
|
|
|
154
154
|
$value = @'
|
|
155
155
|
[{"key":"value","filter":["text","$rect"]}]
|
|
156
156
|
'@
|
|
157
|
-
npx framer
|
|
157
|
+
npx @framer/agent@latest <command> --option $value
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
## API Documentation
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
|
-
npx framer
|
|
164
|
-
npx framer
|
|
165
|
-
npx framer
|
|
166
|
-
npx framer
|
|
167
|
-
npx framer
|
|
163
|
+
npx @framer/agent@latest docs # List all available methods
|
|
164
|
+
npx @framer/agent@latest docs framer.getCollections # Show top level method
|
|
165
|
+
npx @framer/agent@latest docs Collection # Show class with all method signatures
|
|
166
|
+
npx @framer/agent@latest docs Collection.addItems # Show method + recursively expand all referenced types
|
|
167
|
+
npx @framer/agent@latest docs ScreenshotOptions # Show type + recursively expand all referenced types
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
`docs` with no arguments lists available methods. Looking up a class shows its full definition without expanding referenced types. Looking up a specific method or type automatically expands all referenced types recursively.
|
|
171
171
|
|
|
172
172
|
## API Examples
|
|
173
173
|
|
|
174
|
-
**STOP: These are patterns only. Before using any method below, run `npx framer
|
|
174
|
+
**STOP: These are patterns only. Before using any method below, run `npx @framer/agent@latest docs <ClassName>` to verify the current signature.**
|
|
175
175
|
|
|
176
176
|
### Working with Collections (CMS)
|
|
177
177
|
|
package/docs/skills/framer.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
name: framer
|
|
3
3
|
description: >
|
|
4
4
|
Use when the user wants to design, edit, or publish a website or web page — creating layouts, editing sections, updating text or images, managing CMS collections and content, syncing external data, creating or modifying code components, managing color and text styles, handling localization, or publishing deployments. Trigger when the user mentions Framer, references their website or web pages, asks to edit designs, update site content, or work with any Framer project — even if they don't explicitly say 'Framer'.
|
|
5
|
-
**Mandatory precondition**: run `npx framer
|
|
6
|
-
allowed-tools: ["Bash(npx framer
|
|
5
|
+
**Mandatory precondition**: run `npx @framer/agent@latest setup` and let it complete **BEFORE** loading this skill.
|
|
6
|
+
allowed-tools: ["Bash(npx @framer/agent:*)", "Bash(npx @framer/agent@latest:*)", "Read({{FRAMER_TEMPORARY_DIR}}/*)", "Write({{FRAMER_TEMPORARY_DIR}}/*)"]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
If you didn't run this command before loading the skill, run it now:
|
|
10
10
|
```bash
|
|
11
|
-
npx framer
|
|
11
|
+
npx @framer/agent@latest setup
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Capabilities
|
|
@@ -29,14 +29,14 @@ What you can do with the Framer CLI:
|
|
|
29
29
|
|
|
30
30
|
### Permissions
|
|
31
31
|
|
|
32
|
-
The Framer CLI requires network access (to download packages and connect to Framer servers) and file-system access outside the project directory (to install skills into `~/.agents/skills/` and `~/.claude/skills/`). In sandboxed environments, you must execute `npx framer
|
|
32
|
+
The Framer CLI requires network access (to download packages and connect to Framer servers) and file-system access outside the project directory (to install skills into `~/.agents/skills/` and `~/.claude/skills/`). In sandboxed environments, you must execute `npx @framer/agent@latest` commands with elevated permissions from the get-go. Do not try to execute them with the default sandboxed permissions; they will hang or fail.
|
|
33
33
|
|
|
34
34
|
### Session Management
|
|
35
35
|
|
|
36
36
|
If the user refers to a project by name or description rather than giving a URL, first inspect the recent projects:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
npx framer
|
|
39
|
+
npx @framer/agent@latest project list
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Use that list to infer the likely project from the names and recency. If the right project is already known, use its project ID with `session new`. If there are multiple possible matches, clarify with the user. Only ask the user for a Project URL if there is no clear match. Avoid talking about the technical contents of returned data like IDs.
|
|
@@ -46,7 +46,7 @@ Each session maintains a persistent connection to a Framer project. Use sessions
|
|
|
46
46
|
Create a session against an existing project:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
npx framer
|
|
49
|
+
npx @framer/agent@latest session new "<url or id>"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
This prints the session ID. You must always use that session ID with `-s <id>` for all subsequent commands. Using the same session preserves your `state` between calls.
|
|
@@ -54,15 +54,15 @@ This prints the session ID. You must always use that session ID with `-s <id>` f
|
|
|
54
54
|
To create a brand new empty project and connect to it:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npx framer
|
|
58
|
-
npx framer
|
|
57
|
+
npx @framer/agent@latest project new
|
|
58
|
+
npx @framer/agent@latest session new "<returned project id>"
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
To remix (duplicate) an existing project and connect to the copy:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npx framer
|
|
65
|
-
npx framer
|
|
64
|
+
npx @framer/agent@latest project remix "<url, project id, or remix link>"
|
|
65
|
+
npx @framer/agent@latest session new "<returned project id>"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
Note that during beta, you cannot connect to non-beta projects. If creating a session errors with a message about this, you need to move your project to beta.
|
|
@@ -70,7 +70,7 @@ Note that during beta, you cannot connect to non-beta projects. If creating a se
|
|
|
70
70
|
List active sessions:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
npx framer
|
|
73
|
+
npx @framer/agent@latest session list
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
## Project-scoped skill
|