@fabriccode/cli 7.0.74 → 7.0.75
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 +1 -1
- package/README.md +22 -22
- package/bin/fabric +5 -5
- package/bin/kilo +5 -5
- package/package.json +13 -12
- package/postinstall.mjs +5 -5
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Fabric Code CLI
|
|
2
2
|
|
|
3
3
|
The AI coding agent built for the terminal. Generate code from natural language, automate tasks, and run terminal commands -- powered by 500+ AI models.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install -g @
|
|
8
|
+
npm install -g @fabriccode/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Or run directly with npx:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx --package @
|
|
14
|
+
npx --package @fabriccode/cli fabric
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Getting Started
|
|
18
18
|
|
|
19
|
-
Run `
|
|
19
|
+
Run `fabric` in any project directory to launch the interactive TUI:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
fabric
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Run a one-off task:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
|
|
28
|
+
fabric run "add input validation to the signup form"
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Features
|
|
@@ -36,29 +36,29 @@ kilo run "add input validation to the signup form"
|
|
|
36
36
|
- **MCP servers** -- extend agent capabilities with the Model Context Protocol
|
|
37
37
|
- **Multiple modes** -- Plan with Architect, code with Coder, debug with Debugger, or create your own
|
|
38
38
|
- **Sessions** -- resume previous conversations and export transcripts
|
|
39
|
-
- **API keys optional** -- bring your own keys or use
|
|
39
|
+
- **API keys optional** -- bring your own keys or use Fabric credits
|
|
40
40
|
|
|
41
41
|
## Commands
|
|
42
42
|
|
|
43
43
|
| Command | Description |
|
|
44
44
|
| --------------------- | -------------------------- |
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
45
|
+
| `fabric` | Launch interactive TUI |
|
|
46
|
+
| `fabric run "<task>"` | Run a one-off task |
|
|
47
|
+
| `fabric auth` | Manage authentication |
|
|
48
|
+
| `fabric models` | List available models |
|
|
49
|
+
| `fabric mcp` | Manage MCP servers |
|
|
50
|
+
| `fabric session list` | List sessions |
|
|
51
|
+
| `fabric session delete` | Delete a session |
|
|
52
|
+
| `fabric export` | Export session transcripts |
|
|
53
53
|
|
|
54
|
-
Run `
|
|
54
|
+
Run `fabric --help` for the full list.
|
|
55
55
|
|
|
56
56
|
## Alternative Installation
|
|
57
57
|
|
|
58
58
|
### Homebrew (macOS/Linux)
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
brew install
|
|
61
|
+
brew install Fabric-Pro/tap/fabric
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### GitHub Releases
|
|
@@ -67,15 +67,15 @@ Download pre-built binaries from the [Releases page](https://github.com/Fabric-P
|
|
|
67
67
|
|
|
68
68
|
## Documentation
|
|
69
69
|
|
|
70
|
-
- [Docs](https://
|
|
71
|
-
- [Getting Started](https://
|
|
70
|
+
- [Docs](https://fabric.pro/docs)
|
|
71
|
+
- [Getting Started](https://fabric.pro/docs/getting-started)
|
|
72
72
|
|
|
73
73
|
## Links
|
|
74
74
|
|
|
75
75
|
- [GitHub](https://github.com/Fabric-Pro/fabric-code)
|
|
76
|
-
- [Discord](https://
|
|
77
|
-
- [VS Code Extension](https://
|
|
78
|
-
- [Website](https://
|
|
76
|
+
- [Discord](https://fabric.pro/discord)
|
|
77
|
+
- [VS Code Extension](https://fabric.pro/vscode-marketplace)
|
|
78
|
+
- [Website](https://fabric.pro)
|
|
79
79
|
|
|
80
80
|
## License
|
|
81
81
|
|
package/bin/fabric
CHANGED
|
@@ -5,7 +5,7 @@ const fs = require("fs")
|
|
|
5
5
|
const path = require("path")
|
|
6
6
|
const os = require("os")
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// fabriccode_change start
|
|
9
9
|
function code(signal) {
|
|
10
10
|
const num = os.constants.signals?.[signal]
|
|
11
11
|
if (typeof num === "number") return 128 + num
|
|
@@ -178,7 +178,7 @@ function findBinary(startDir) {
|
|
|
178
178
|
current = parent
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
//
|
|
181
|
+
// fabriccode_change start
|
|
182
182
|
function findFallback(startDir, target) {
|
|
183
183
|
if (platform !== "linux" || arch !== "x64") return
|
|
184
184
|
if (target.includes("-baseline")) return
|
|
@@ -197,7 +197,7 @@ function findFallback(startDir, target) {
|
|
|
197
197
|
current = parent
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
//
|
|
200
|
+
// fabriccode_change end
|
|
201
201
|
|
|
202
202
|
const scriptPath = fs.realpathSync(__filename)
|
|
203
203
|
const scriptDir = path.dirname(scriptPath)
|
|
@@ -219,7 +219,7 @@ if (result.error) {
|
|
|
219
219
|
console.error(result.error.message)
|
|
220
220
|
process.exit(1)
|
|
221
221
|
}
|
|
222
|
-
//
|
|
222
|
+
// fabriccode_change start
|
|
223
223
|
if (result.signal === "SIGILL") {
|
|
224
224
|
const fallback = findFallback(scriptDir, resolved)
|
|
225
225
|
if (fallback) {
|
|
@@ -227,7 +227,7 @@ if (result.signal === "SIGILL") {
|
|
|
227
227
|
run(fallback)
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
//
|
|
230
|
+
// fabriccode_change end
|
|
231
231
|
if (result.signal) fail(resolved, result)
|
|
232
232
|
const status = typeof result.status === "number" ? result.status : 1
|
|
233
233
|
process.exit(status)
|
package/bin/kilo
CHANGED
|
@@ -17,7 +17,7 @@ function run(target) {
|
|
|
17
17
|
process.exit(code)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const envPath = process.env.FABRIC_BIN_PATH
|
|
20
|
+
const envPath = process.env.FABRIC_BIN_PATH
|
|
21
21
|
if (envPath) {
|
|
22
22
|
run(envPath)
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ if (envPath) {
|
|
|
25
25
|
const scriptPath = fs.realpathSync(__filename)
|
|
26
26
|
const scriptDir = path.dirname(scriptPath)
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// fabriccode_change start - fall through to findBinary() if cached binary fails
|
|
29
29
|
const cached = path.join(scriptDir, ".kilo")
|
|
30
30
|
if (fs.existsSync(cached)) {
|
|
31
31
|
const result = childProcess.spawnSync(cached, process.argv.slice(2), {
|
|
@@ -38,7 +38,7 @@ if (fs.existsSync(cached)) {
|
|
|
38
38
|
// cached binary failed (e.g. wrong platform/arch, missing dynamic linker),
|
|
39
39
|
// fall through to findBinary() which has better variant detection
|
|
40
40
|
}
|
|
41
|
-
//
|
|
41
|
+
// fabriccode_change end
|
|
42
42
|
|
|
43
43
|
const platformMap = {
|
|
44
44
|
darwin: "darwin",
|
|
@@ -60,7 +60,7 @@ if (!arch) {
|
|
|
60
60
|
arch = os.arch()
|
|
61
61
|
}
|
|
62
62
|
const base = "@fabriccode/cli-" + platform + "-" + arch
|
|
63
|
-
const binary = platform === "windows" ? "fabric.exe" : "fabric" //
|
|
63
|
+
const binary = platform === "windows" ? "fabric.exe" : "fabric" // fabriccode_change: binary is built as "fabric" not "kilo"
|
|
64
64
|
|
|
65
65
|
function supportsAvx2() {
|
|
66
66
|
if (arch !== "x64") return false
|
|
@@ -178,7 +178,7 @@ function findBinary(startDir) {
|
|
|
178
178
|
const resolved = findBinary(scriptDir)
|
|
179
179
|
if (!resolved) {
|
|
180
180
|
console.error(
|
|
181
|
-
"It seems that your package manager failed to install the right version of the
|
|
181
|
+
"It seems that your package manager failed to install the right version of the Fabric CLI for your platform. You can try manually installing " +
|
|
182
182
|
names.map((n) => `\"${n}\"`).join(" or ") +
|
|
183
183
|
" package",
|
|
184
184
|
)
|
package/package.json
CHANGED
|
@@ -7,20 +7,21 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
9
9
|
},
|
|
10
|
-
"version": "7.0.
|
|
10
|
+
"version": "7.0.75",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@fabriccode/cli-linux-x64-musl": "7.0.
|
|
14
|
-
"@fabriccode/cli-darwin-x64": "7.0.
|
|
15
|
-
"@fabriccode/cli-darwin-x64-baseline": "7.0.
|
|
16
|
-
"@fabriccode/cli-
|
|
17
|
-
"@fabriccode/cli-linux-x64-baseline": "7.0.
|
|
18
|
-
"@fabriccode/cli-linux-
|
|
19
|
-
"@fabriccode/cli-linux-arm64
|
|
20
|
-
"@fabriccode/cli-
|
|
21
|
-
"@fabriccode/cli-
|
|
22
|
-
"@fabriccode/cli-
|
|
23
|
-
"@fabriccode/cli-
|
|
13
|
+
"@fabriccode/cli-linux-x64-musl": "7.0.75",
|
|
14
|
+
"@fabriccode/cli-darwin-x64": "7.0.75",
|
|
15
|
+
"@fabriccode/cli-darwin-x64-baseline": "7.0.75",
|
|
16
|
+
"@fabriccode/cli-windows-arm64": "7.0.75",
|
|
17
|
+
"@fabriccode/cli-linux-x64-baseline-musl": "7.0.75",
|
|
18
|
+
"@fabriccode/cli-linux-x64-baseline": "7.0.75",
|
|
19
|
+
"@fabriccode/cli-linux-arm64": "7.0.75",
|
|
20
|
+
"@fabriccode/cli-linux-arm64-musl": "7.0.75",
|
|
21
|
+
"@fabriccode/cli-windows-x64": "7.0.75",
|
|
22
|
+
"@fabriccode/cli-darwin-arm64": "7.0.75",
|
|
23
|
+
"@fabriccode/cli-windows-x64-baseline": "7.0.75",
|
|
24
|
+
"@fabriccode/cli-linux-x64": "7.0.75"
|
|
24
25
|
},
|
|
25
26
|
"repository": {
|
|
26
27
|
"type": "git",
|
package/postinstall.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { createRequire } from "module"
|
|
|
10
10
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
11
11
|
const require = createRequire(import.meta.url)
|
|
12
12
|
|
|
13
|
-
//
|
|
13
|
+
// fabriccode_change start - variant detection matching bin/fabric logic
|
|
14
14
|
const platformMap = {
|
|
15
15
|
darwin: "darwin",
|
|
16
16
|
linux: "linux",
|
|
@@ -105,7 +105,7 @@ function getPackageNames() {
|
|
|
105
105
|
|
|
106
106
|
function findBinary() {
|
|
107
107
|
const { platform } = detectPlatformAndArch()
|
|
108
|
-
const binaryName = platform === "windows" ? "fabric.exe" : "fabric" //
|
|
108
|
+
const binaryName = platform === "windows" ? "fabric.exe" : "fabric" // fabriccode_change: binary is built as "fabric" not "fabric"
|
|
109
109
|
const names = getPackageNames()
|
|
110
110
|
|
|
111
111
|
for (const packageName of names) {
|
|
@@ -124,7 +124,7 @@ function findBinary() {
|
|
|
124
124
|
|
|
125
125
|
throw new Error(`Could not find any binary package. Tried: ${names.map((n) => `"${n}"`).join(", ")}`)
|
|
126
126
|
}
|
|
127
|
-
//
|
|
127
|
+
// fabriccode_change end
|
|
128
128
|
|
|
129
129
|
function main() {
|
|
130
130
|
if (os.platform() === "win32") {
|
|
@@ -134,7 +134,7 @@ function main() {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
const { binaryPath } = findBinary()
|
|
137
|
-
const target = path.join(__dirname, "bin", ".
|
|
137
|
+
const target = path.join(__dirname, "bin", ".fabric") // fabriccode_change
|
|
138
138
|
if (fs.existsSync(target)) fs.unlinkSync(target)
|
|
139
139
|
try {
|
|
140
140
|
fs.linkSync(binaryPath, target)
|
|
@@ -147,6 +147,6 @@ function main() {
|
|
|
147
147
|
try {
|
|
148
148
|
void main()
|
|
149
149
|
} catch (error) {
|
|
150
|
-
console.error("Failed to setup fabric binary:", error.message) //
|
|
150
|
+
console.error("Failed to setup fabric binary:", error.message) // fabriccode_change
|
|
151
151
|
process.exit(1)
|
|
152
152
|
}
|