@fusedframes/cli 0.1.0 → 1.0.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/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/index.js +1 -1
- package/dist/lib/client.js +1 -1
- package/package.json +19 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FusedFrames
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# @fusedframes/cli
|
|
2
|
+
|
|
3
|
+
Query behavioural patterns captured by [FusedFrames](https://fusedframes.com) from the command line. Designed for AI agents to traverse pattern libraries, follow relationships between patterns and retrieve evidence.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
No installation required. Run directly with `npx`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @fusedframes/cli --help
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or install globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @fusedframes/cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
Create an API key in your FusedFrames team settings under **Integrations > API keys**, then configure the CLI:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
echo "ff_your_api_key" | fusedframes config set-key
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The key is stored at `~/.config/fusedframes/config.json` with restricted file permissions.
|
|
28
|
+
|
|
29
|
+
You can also set the key via environment variable:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
export FUSEDFRAMES_API_KEY=ff_your_api_key
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Verify your configuration:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
fusedframes config show
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
### Browse libraries
|
|
44
|
+
|
|
45
|
+
List all pattern libraries your API key has access to:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
fusedframes libraries list
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Get detail for a specific library:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
fusedframes libraries get <library-id>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Discover the vocabulary of a library:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
fusedframes libraries categories <library-id>
|
|
61
|
+
fusedframes libraries tags <library-id>
|
|
62
|
+
fusedframes libraries applications <library-id>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Query patterns
|
|
66
|
+
|
|
67
|
+
List patterns in a library with optional filters:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
fusedframes patterns list <library-id>
|
|
71
|
+
fusedframes patterns list <library-id> --category "Deployment"
|
|
72
|
+
fusedframes patterns list <library-id> --tag "rollback" --app "Terminal"
|
|
73
|
+
fusedframes patterns list <library-id> --search "failed health check"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Get full detail for a pattern, including its relationships:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
fusedframes patterns get <pattern-id>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This returns the pattern's behaviour, reasoning, trigger, outcome, category, tags, and all incoming and outgoing edges to other patterns.
|
|
83
|
+
|
|
84
|
+
Get the evidence actions that support a pattern:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
fusedframes patterns evidence <pattern-id>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Each evidence action includes the original question, response, and a formatted event timeline showing exactly what happened.
|
|
91
|
+
|
|
92
|
+
### Traverse the graph
|
|
93
|
+
|
|
94
|
+
Get the full pattern graph for a library in a single call:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
fusedframes graph <library-id>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Returns all patterns and all edges. Useful for building a complete picture of a library.
|
|
101
|
+
|
|
102
|
+
Follow relationships from a specific pattern:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
fusedframes traverse <pattern-id>
|
|
106
|
+
fusedframes traverse <pattern-id> --depth 2
|
|
107
|
+
fusedframes traverse <pattern-id> --direction outgoing --label "often next"
|
|
108
|
+
fusedframes traverse <pattern-id> --depth 3 --direction both
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Depth controls how many levels of connected patterns to follow (1-3). Direction can be `outgoing`, `incoming`, or `both`.
|
|
112
|
+
|
|
113
|
+
Edge labels describe the relationship between patterns:
|
|
114
|
+
|
|
115
|
+
| Label | Meaning |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `often next` | What typically happens after |
|
|
118
|
+
| `often previous` | What typically happens before |
|
|
119
|
+
| `variation to` | An alternative approach |
|
|
120
|
+
| `contradicts` | Conflicts with this pattern |
|
|
121
|
+
| `often occurs with` | Usually happening alongside |
|
|
122
|
+
| `exception to` | Edge case where a pattern doesn't apply |
|
|
123
|
+
|
|
124
|
+
### Search
|
|
125
|
+
|
|
126
|
+
Search across all accessible libraries:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
fusedframes search "failed deployment"
|
|
130
|
+
fusedframes search "onboarding" --category "HR"
|
|
131
|
+
fusedframes search "review" --library <library-id>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Pagination
|
|
135
|
+
|
|
136
|
+
Commands that return lists support `--page` and `--page-size`:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
fusedframes patterns list <library-id> --page 2 --page-size 50
|
|
140
|
+
fusedframes patterns evidence <pattern-id> --page 1 --page-size 10
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Defaults: page 1, 20 results per page.
|
|
144
|
+
|
|
145
|
+
## Output
|
|
146
|
+
|
|
147
|
+
All commands output JSON to stdout. Errors are also JSON:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{ "error": { "code": "unauthorised", "message": "Invalid or missing API key" } }
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Exit codes: `0` for success, `1` for errors, `2` for invalid arguments.
|
|
154
|
+
|
|
155
|
+
## Environment variables
|
|
156
|
+
|
|
157
|
+
| Variable | Purpose |
|
|
158
|
+
|---|---|
|
|
159
|
+
| `FUSEDFRAMES_API_KEY` | API key. Overrides the saved config. |
|
|
160
|
+
| `FUSEDFRAMES_API_URL` | API base URL. Defaults to `https://api.fusedframes.com`. |
|
|
161
|
+
|
|
162
|
+
## Configuration
|
|
163
|
+
|
|
164
|
+
The CLI stores its configuration at `~/.config/fusedframes/config.json`. The directory is created with `700` permissions and the file with `600` permissions.
|
|
165
|
+
|
|
166
|
+
Environment variables take precedence over the config file.
|
|
167
|
+
|
|
168
|
+
## AI agent usage
|
|
169
|
+
|
|
170
|
+
This CLI is designed to be called by AI agents (Claude Code, Cursor, Windsurf, Codex) via shell commands. Each command returns structured JSON that the agent can parse and act on.
|
|
171
|
+
|
|
172
|
+
A typical agent workflow:
|
|
173
|
+
|
|
174
|
+
1. `fusedframes search "deployment failure"` to find relevant patterns
|
|
175
|
+
2. `fusedframes patterns get <id>` to read the full pattern and its edges
|
|
176
|
+
3. `fusedframes traverse <id> --depth 2` to explore related patterns
|
|
177
|
+
4. `fusedframes patterns evidence <id>` to see the raw actions that support the pattern
|
|
178
|
+
|
|
179
|
+
The agent uses pattern edges to navigate between related behaviours and build context about how your team works.
|
|
180
|
+
|
|
181
|
+
## Requirements
|
|
182
|
+
|
|
183
|
+
- Node.js 18 or later
|
|
184
|
+
- A FusedFrames account with a Pro or Enterprise plan
|
|
185
|
+
- An API key created in your team's integration settings
|
|
186
|
+
|
|
187
|
+
## Links
|
|
188
|
+
|
|
189
|
+
- [FusedFrames](https://fusedframes.com)
|
|
190
|
+
- [API reference](https://api.fusedframes.com)
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const program = new Command();
|
|
|
12
12
|
program
|
|
13
13
|
.name("fusedframes")
|
|
14
14
|
.description("Query FusedFrames behavioural patterns")
|
|
15
|
-
.version("
|
|
15
|
+
.version("1.0.0");
|
|
16
16
|
// Register all command groups
|
|
17
17
|
registerConfigCommands(program);
|
|
18
18
|
registerLibraryCommands(program);
|
package/dist/lib/client.js
CHANGED
|
@@ -29,7 +29,7 @@ export async function request(path, params) {
|
|
|
29
29
|
headers: {
|
|
30
30
|
Authorization: `Bearer ${apiKey}`,
|
|
31
31
|
Accept: "application/json",
|
|
32
|
-
"User-Agent": "@fusedframes/cli/
|
|
32
|
+
"User-Agent": "@fusedframes/cli/1.0.0",
|
|
33
33
|
},
|
|
34
34
|
signal: AbortSignal.timeout(30_000),
|
|
35
35
|
});
|
package/package.json
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusedframes/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "CLI for querying FusedFrames
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI for querying FusedFrames",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "FusedFrames <hello@fusedframes.com> (https://fusedframes.com)",
|
|
8
|
+
"homepage": "https://fusedframes.com",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/fusedframes/fusedframes-cli.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/fusedframes/fusedframes-cli/issues"
|
|
15
|
+
},
|
|
6
16
|
"bin": {
|
|
7
17
|
"fusedframes": "dist/index.js"
|
|
8
18
|
},
|
|
9
19
|
"files": [
|
|
10
|
-
"dist"
|
|
20
|
+
"dist",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md"
|
|
11
23
|
],
|
|
12
24
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
25
|
+
"node": ">=20.0.0"
|
|
14
26
|
},
|
|
15
27
|
"scripts": {
|
|
16
28
|
"build": "tsc && chmod +x dist/index.js",
|
|
@@ -18,10 +30,10 @@
|
|
|
18
30
|
"typecheck": "tsc --noEmit"
|
|
19
31
|
},
|
|
20
32
|
"dependencies": {
|
|
21
|
-
"commander": "^
|
|
33
|
+
"commander": "^14.0.0"
|
|
22
34
|
},
|
|
23
35
|
"devDependencies": {
|
|
24
|
-
"typescript": "^
|
|
36
|
+
"typescript": "^6.0.0",
|
|
25
37
|
"@types/node": "^22.0.0"
|
|
26
38
|
},
|
|
27
39
|
"keywords": [
|
|
@@ -29,6 +41,5 @@
|
|
|
29
41
|
"cli",
|
|
30
42
|
"patterns",
|
|
31
43
|
"ai-agent"
|
|
32
|
-
]
|
|
33
|
-
"license": "MIT"
|
|
44
|
+
]
|
|
34
45
|
}
|