@halfagiraf/clawx 0.2.0 → 0.2.2
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 +103 -12
- package/dist/cli/scout.d.ts.map +1 -1
- package/dist/cli/scout.js +10 -4
- package/dist/cli/scout.js.map +1 -1
- package/dist/config/hardware.d.ts +16 -2
- package/dist/config/hardware.d.ts.map +1 -1
- package/dist/config/hardware.js +151 -19
- package/dist/config/hardware.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ Clawx can create files, write code, run commands, execute over SSH, and iterate
|
|
|
23
23
|
- **Iterates** — reads command output, fixes errors, tries again
|
|
24
24
|
- **Streams output** — shows progress as the model works
|
|
25
25
|
- **Falls back to chat** — models without tool support switch to chat mode automatically
|
|
26
|
+
- **Scouts for models** — built-in HuggingFace researcher finds GGUF models that fit your hardware
|
|
26
27
|
|
|
27
28
|
## What it doesn't do
|
|
28
29
|
|
|
@@ -527,6 +528,8 @@ clawx chat Interactive chat (no tools — works with any model)
|
|
|
527
528
|
clawx chat -c Resume last session in chat mode
|
|
528
529
|
clawx continue Resume last session
|
|
529
530
|
clawx sessions List recent sessions
|
|
531
|
+
clawx scout AI-powered HuggingFace model researcher
|
|
532
|
+
clawx scout --setup-hardware Re-prompt hardware specs manually
|
|
530
533
|
clawx profiles List saved profiles
|
|
531
534
|
clawx add <name> Save current config as a named profile
|
|
532
535
|
clawx use <name> Switch to a saved profile
|
|
@@ -574,6 +577,80 @@ Clawx runs in two modes, shown in the TUI footer:
|
|
|
574
577
|
|
|
575
578
|
`clawx chat` (the CLI command) always starts in chat mode — it never sends tools, so it works with every model regardless of tool support.
|
|
576
579
|
|
|
580
|
+
### Scout — HuggingFace Model Researcher
|
|
581
|
+
|
|
582
|
+
Scout is an AI-powered model researcher that searches HuggingFace for GGUF models that fit your hardware. It auto-detects your GPU, VRAM, and RAM, then launches an interactive session where the agent can search, inspect, and recommend models.
|
|
583
|
+
|
|
584
|
+
> **Windows only for now.** Hardware auto-detection uses `nvidia-smi` and `wmic` which are Windows-native. Linux/macOS support is partially implemented (nvidia-smi works on Linux, macOS uses system_profiler) but hasn't been tested yet.
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
# First run — auto-detects hardware, saves to ~/.clawx/hardware.json
|
|
588
|
+
clawx scout
|
|
589
|
+
|
|
590
|
+
# Re-prompt hardware specs manually (with auto-detected defaults)
|
|
591
|
+
clawx scout --setup-hardware
|
|
592
|
+
|
|
593
|
+
# Use a specific model for the scout agent
|
|
594
|
+
clawx scout -m deepseek-chat -p deepseek
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
On first run, Scout detects your system and auto-sends a starter message with your hardware specs. The agent immediately starts researching:
|
|
598
|
+
|
|
599
|
+
```
|
|
600
|
+
╔═╗╦ ╔═╗╦ ╦═╗╔═
|
|
601
|
+
║ ║ ╠═╣║║║ ╚╝
|
|
602
|
+
╚═╝╩═╝╩ ╩╚╩╝═╝╚═
|
|
603
|
+
v0.2.1 · deepseek-chat via deepseek
|
|
604
|
+
────────────────────────────────────────
|
|
605
|
+
|
|
606
|
+
Mode: Scout (HuggingFace Model Researcher)
|
|
607
|
+
|
|
608
|
+
> My hardware: NVIDIA GeForce RTX 3060, 12GB VRAM, 64GB RAM,
|
|
609
|
+
Windows 10. What models would you recommend for local coding
|
|
610
|
+
assistance with tool calling support?
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
The agent uses three HuggingFace tools to research models:
|
|
614
|
+
|
|
615
|
+
- **hf_search** — searches HuggingFace by query, filters (gguf, text-generation), and sort order
|
|
616
|
+
- **hf_model_info** — gets detailed metadata including GGUF file sizes for VRAM estimation
|
|
617
|
+
- **hf_readme** — reads model cards for benchmarks, prompt formats, and quant details
|
|
618
|
+
|
|
619
|
+
Here's an excerpt from a real session. The agent searched for coding models, checked file sizes, read model cards, then delivered recommendations tailored to the user's 12GB VRAM:
|
|
620
|
+
|
|
621
|
+
```
|
|
622
|
+
hf_search { "search": "coder gguf", "filter": "gguf,text-generation", "sort": "downloads", "limit": 15 }
|
|
623
|
+
|
|
624
|
+
Found 15 models for "coder gguf" (sorted by downloads):
|
|
625
|
+
- unsloth/Qwen3-Coder-Next-GGUF 481,295 downloads
|
|
626
|
+
- ggml-org/Qwen3-Coder-30B-A3B-Instruct 176,570 downloads
|
|
627
|
+
- Qwen/Qwen2.5-Coder-32B-Instruct-GGUF 166,480 downloads
|
|
628
|
+
- bartowski/Qwen2.5-Coder-7B-Instruct-GGUF 104,034 downloads
|
|
629
|
+
...
|
|
630
|
+
|
|
631
|
+
hf_model_info { "model_id": "unsloth/Qwen3-Coder-Next-GGUF" }
|
|
632
|
+
hf_readme { "model_id": "unsloth/Qwen3-Coder-Next-GGUF" }
|
|
633
|
+
|
|
634
|
+
Recommended Models for Coding + Tool Calling:
|
|
635
|
+
|
|
636
|
+
1. Qwen3-Coder-Next (80B total, 3B activated) — BEST OVERALL
|
|
637
|
+
VRAM: ~4-8GB depending on quant | 256K context | Tool calling supported
|
|
638
|
+
Why: Specifically designed for coding agents, Feb 19 update improved tool-calling
|
|
639
|
+
|
|
640
|
+
2. Qwen2.5-Coder-7B-Instruct — BALANCED PERFORMANCE
|
|
641
|
+
VRAM: Q5_K_M ~5GB, Q8_0 ~7.5GB | 104K+ downloads
|
|
642
|
+
Why: Proven, reliable, good quality/size balance
|
|
643
|
+
|
|
644
|
+
3. LFM2.5-1.2B-Nova-Function-Calling — SPECIALIZED TOOL CALLING
|
|
645
|
+
VRAM: ~0.7-1.2GB | 97% syntax reliability for JSON
|
|
646
|
+
Why: Tiny but specifically fine-tuned for function calling
|
|
647
|
+
|
|
648
|
+
Would you like me to check specific file sizes or help create
|
|
649
|
+
an Ollama Modelfile for your chosen model?
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
Scout uses the same model/provider flags as the main TUI. You can run it with a local model (`-m qwen2.5-coder:7b-instruct -p ollama`) or a cloud API (`-p deepseek`). The text tool parser works in scout mode too, so models that output tool calls as text (like Qwen) will still work.
|
|
653
|
+
|
|
577
654
|
### Basic REPL commands
|
|
578
655
|
|
|
579
656
|
```
|
|
@@ -603,22 +680,36 @@ Clawx runs in two modes, shown in the TUI footer:
|
|
|
603
680
|
|
|
604
681
|
```
|
|
605
682
|
src/
|
|
606
|
-
cli/
|
|
607
|
-
|
|
683
|
+
cli/
|
|
684
|
+
main.ts CLI entry point (Commander.js commands)
|
|
685
|
+
tui.ts TUI mode (pi-coding-agent InteractiveMode)
|
|
686
|
+
scout.ts Scout mode (HuggingFace model researcher)
|
|
687
|
+
repl.ts Basic readline REPL fallback
|
|
688
|
+
banner.ts Startup banner and version
|
|
689
|
+
config/
|
|
690
|
+
index.ts Configuration loading (.env, JSON)
|
|
691
|
+
hardware.ts Hardware spec detection and management
|
|
608
692
|
core/
|
|
609
|
-
agent.ts
|
|
610
|
-
provider.ts
|
|
611
|
-
session.ts
|
|
612
|
-
streaming.ts
|
|
693
|
+
agent.ts Agent orchestrator (wires pi-agent-core loop)
|
|
694
|
+
provider.ts Model/provider resolution for local endpoints
|
|
695
|
+
session.ts JSON-file session persistence
|
|
696
|
+
streaming.ts Terminal output renderer
|
|
697
|
+
text-tool-parser.ts Text-based tool call parser (Qwen, etc.)
|
|
613
698
|
extensions/
|
|
614
|
-
chat-mode.ts
|
|
699
|
+
chat-mode.ts TUI extension: /chat toggle, auto-detection, prompt swap
|
|
615
700
|
tools/
|
|
616
|
-
sshRun.ts
|
|
617
|
-
gitStatus.ts
|
|
618
|
-
gitDiff.ts
|
|
701
|
+
sshRun.ts SSH execution (ssh2)
|
|
702
|
+
gitStatus.ts Git status wrapper
|
|
703
|
+
gitDiff.ts Git diff wrapper
|
|
619
704
|
searchFiles.ts File content search (rg/grep)
|
|
620
|
-
|
|
621
|
-
|
|
705
|
+
hfSearch.ts HuggingFace model search (Scout)
|
|
706
|
+
hfModelInfo.ts HuggingFace model details (Scout)
|
|
707
|
+
hfReadme.ts HuggingFace README reader (Scout)
|
|
708
|
+
types/ TypeScript type definitions
|
|
709
|
+
utils/
|
|
710
|
+
system-prompt.ts System prompt builder
|
|
711
|
+
scout-prompt.ts Scout system prompt builder
|
|
712
|
+
logger.ts Structured logger
|
|
622
713
|
```
|
|
623
714
|
|
|
624
715
|
### Dependencies
|
package/dist/cli/scout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scout.d.ts","sourceRoot":"","sources":["../../src/cli/scout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgErD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE;IACP,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,GACL,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"scout.d.ts","sourceRoot":"","sources":["../../src/cli/scout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgErD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE;IACP,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,GACL,OAAO,CAAC,IAAI,CAAC,CAuHf"}
|
package/dist/cli/scout.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { createAgentSession, InteractiveMode, AuthStorage, ModelRegistry, DefaultResourceLoader, SettingsManager, } from "@mariozechner/pi-coding-agent";
|
|
8
8
|
import { resolveModel } from "../core/provider.js";
|
|
9
|
-
import { loadHardwareSpec, promptHardwareSpec } from "../config/hardware.js";
|
|
9
|
+
import { loadHardwareSpec, promptHardwareSpec, autoDetectAndSave } from "../config/hardware.js";
|
|
10
10
|
import { createHfSearchTool } from "../tools/hfSearch.js";
|
|
11
11
|
import { createHfModelInfoTool } from "../tools/hfModelInfo.js";
|
|
12
12
|
import { createHfReadmeTool } from "../tools/hfReadme.js";
|
|
@@ -67,16 +67,17 @@ async function checkOllamaToolSupport(config) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
export async function startScout(config, options = {}) {
|
|
70
|
-
// Load or
|
|
70
|
+
// Load or detect hardware spec
|
|
71
71
|
let hardware = null;
|
|
72
72
|
if (options.setupHardware) {
|
|
73
|
+
// --setup-hardware: manual prompts with auto-detected defaults
|
|
73
74
|
hardware = await promptHardwareSpec();
|
|
74
75
|
}
|
|
75
76
|
else {
|
|
76
77
|
hardware = loadHardwareSpec();
|
|
77
78
|
if (!hardware) {
|
|
78
|
-
|
|
79
|
-
hardware = await
|
|
79
|
+
// First run: auto-detect and save (only prompts if detection fails)
|
|
80
|
+
hardware = await autoDetectAndSave();
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
const model = resolveModel(config);
|
|
@@ -154,9 +155,14 @@ export async function startScout(config, options = {}) {
|
|
|
154
155
|
if (allToolNames.length > 0) {
|
|
155
156
|
session.agent.streamFn = createToolParsingStreamFn(allToolNames);
|
|
156
157
|
}
|
|
158
|
+
// Build a welcome initial message so the agent introduces itself with hardware context
|
|
159
|
+
const initialMessage = `My hardware: ${hardware.gpu}, ${hardware.vram} VRAM, ${hardware.ram} RAM, ${hardware.os}` +
|
|
160
|
+
(hardware.notes ? `. ${hardware.notes}` : "") +
|
|
161
|
+
`. What models would you recommend for local coding assistance with tool calling support?`;
|
|
157
162
|
// Launch interactive mode
|
|
158
163
|
const mode = new InteractiveMode(session, {
|
|
159
164
|
modelFallbackMessage,
|
|
165
|
+
initialMessage,
|
|
160
166
|
verbose: options.verbose,
|
|
161
167
|
});
|
|
162
168
|
await mode.run();
|
package/dist/cli/scout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scout.js","sourceRoot":"","sources":["../../src/cli/scout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,eAAe,GAGhB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"scout.js","sourceRoot":"","sources":["../../src/cli/scout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,eAAe,GAGhB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAqB,MAAM,uBAAuB,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,SAAS,gBAAgB,CAAC,IAAyF;IACjH,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC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Ae,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAErF,gDAAgD;IAChD,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9D,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,yBAAyB,CAAC,YAAY,CAAkC,CAAC;IACpG,CAAC;IAED,uFAAuF;IACvF,MAAM,cAAc,GAClB,gBAAgB,QAAQ,CAAC,GAAG,KAAK,QAAQ,CAAC,IAAI,UAAU,QAAQ,CAAC,GAAG,SAAS,QAAQ,CAAC,EAAE,EAAE;QAC1F,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,0FAA0F,CAAC;IAE7F,0BAA0B;IAC1B,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC,OAAO,EAAE;QACxC,oBAAoB;QACpB,cAAc;QACd,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;AACnB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hardware spec management for Clawx Scout.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Auto-detects GPU, VRAM, RAM, and OS from the system.
|
|
5
|
+
* Falls back to manual prompts if detection fails.
|
|
6
6
|
*/
|
|
7
7
|
export interface HardwareSpec {
|
|
8
8
|
gpu: string;
|
|
@@ -13,5 +13,19 @@ export interface HardwareSpec {
|
|
|
13
13
|
}
|
|
14
14
|
export declare function loadHardwareSpec(): HardwareSpec | null;
|
|
15
15
|
export declare function saveHardwareSpec(spec: HardwareSpec): void;
|
|
16
|
+
/**
|
|
17
|
+
* Auto-detect hardware specs from the system.
|
|
18
|
+
* Returns a HardwareSpec with best-effort values.
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectHardwareSpec(): HardwareSpec;
|
|
21
|
+
/**
|
|
22
|
+
* Auto-detect hardware, save it, and print what was found.
|
|
23
|
+
* If detection gets "Unknown" for critical fields, offer manual override.
|
|
24
|
+
*/
|
|
25
|
+
export declare function autoDetectAndSave(): Promise<HardwareSpec>;
|
|
26
|
+
/**
|
|
27
|
+
* Interactive manual prompts for all fields (--setup-hardware).
|
|
28
|
+
* Pre-fills with auto-detected values so user can just press Enter.
|
|
29
|
+
*/
|
|
16
30
|
export declare function promptHardwareSpec(): Promise<HardwareSpec>;
|
|
17
31
|
//# sourceMappingURL=hardware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../../src/config/hardware.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../../src/config/hardware.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAgB,gBAAgB,IAAI,YAAY,GAAG,IAAI,CAStD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAIzD;AAqGD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAMjD;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,YAAY,CAAC,CA8B/D;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CA4BhE"}
|
package/dist/config/hardware.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hardware spec management for Clawx Scout.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Auto-detects GPU, VRAM, RAM, and OS from the system.
|
|
5
|
+
* Falls back to manual prompts if detection fails.
|
|
6
6
|
*/
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
|
+
import { execSync } from "node:child_process";
|
|
10
|
+
import os from "node:os";
|
|
9
11
|
import readline from "node:readline";
|
|
10
12
|
import { getGlobalConfigDir } from "./index.js";
|
|
11
|
-
const DEFAULTS = {
|
|
12
|
-
gpu: "Unknown GPU",
|
|
13
|
-
vram: "Unknown",
|
|
14
|
-
ram: "Unknown",
|
|
15
|
-
os: process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux",
|
|
16
|
-
};
|
|
17
13
|
function getHardwarePath() {
|
|
18
14
|
return path.join(getGlobalConfigDir(), "hardware.json");
|
|
19
15
|
}
|
|
@@ -34,24 +30,160 @@ export function saveHardwareSpec(spec) {
|
|
|
34
30
|
fs.mkdirSync(dir, { recursive: true });
|
|
35
31
|
fs.writeFileSync(getHardwarePath(), JSON.stringify(spec, null, 2), "utf-8");
|
|
36
32
|
}
|
|
33
|
+
function formatBytes(bytes) {
|
|
34
|
+
const gb = bytes / (1024 * 1024 * 1024);
|
|
35
|
+
return gb >= 1 ? `${Math.round(gb)}GB` : `${Math.round(gb * 1024)}MB`;
|
|
36
|
+
}
|
|
37
|
+
function run(cmd) {
|
|
38
|
+
try {
|
|
39
|
+
return execSync(cmd, { encoding: "utf-8", timeout: 10_000, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function detectGpu() {
|
|
46
|
+
// Try nvidia-smi first (works on Windows + Linux)
|
|
47
|
+
const nvsmi = run("nvidia-smi --query-gpu=name,memory.total --format=csv,noheader,nounits");
|
|
48
|
+
if (nvsmi) {
|
|
49
|
+
const lines = nvsmi.split("\n").filter(Boolean);
|
|
50
|
+
const gpus = [];
|
|
51
|
+
let totalVram = 0;
|
|
52
|
+
for (const line of lines) {
|
|
53
|
+
const parts = line.split(",").map((s) => s.trim());
|
|
54
|
+
gpus.push(parts[0]);
|
|
55
|
+
const mb = parseInt(parts[1], 10);
|
|
56
|
+
if (!isNaN(mb))
|
|
57
|
+
totalVram += mb;
|
|
58
|
+
}
|
|
59
|
+
const gpu = gpus.join(" + ");
|
|
60
|
+
const vram = totalVram >= 1024 ? `${Math.round(totalVram / 1024)}GB` : `${totalVram}MB`;
|
|
61
|
+
return { gpu, vram };
|
|
62
|
+
}
|
|
63
|
+
if (process.platform === "win32") {
|
|
64
|
+
// wmic fallback for Windows (covers AMD/Intel too)
|
|
65
|
+
const wmic = run("wmic path win32_VideoController get Name,AdapterRAM /format:csv");
|
|
66
|
+
if (wmic) {
|
|
67
|
+
const lines = wmic.split("\n").filter((l) => l.trim() && !l.startsWith("Node"));
|
|
68
|
+
const gpus = [];
|
|
69
|
+
let totalVram = 0;
|
|
70
|
+
for (const line of lines) {
|
|
71
|
+
const parts = line.split(",").map((s) => s.trim());
|
|
72
|
+
// CSV format: Node,AdapterRAM,Name
|
|
73
|
+
const adapterRam = parseInt(parts[1], 10);
|
|
74
|
+
const name = parts[2];
|
|
75
|
+
if (name)
|
|
76
|
+
gpus.push(name);
|
|
77
|
+
if (!isNaN(adapterRam) && adapterRam > 0)
|
|
78
|
+
totalVram += adapterRam;
|
|
79
|
+
}
|
|
80
|
+
if (gpus.length > 0) {
|
|
81
|
+
return {
|
|
82
|
+
gpu: gpus.join(" + "),
|
|
83
|
+
vram: totalVram > 0 ? formatBytes(totalVram) : "Unknown",
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (process.platform === "linux") {
|
|
89
|
+
// lspci fallback for Linux
|
|
90
|
+
const lspci = run("lspci | grep -i 'vga\\|3d\\|display'");
|
|
91
|
+
if (lspci) {
|
|
92
|
+
const match = lspci.match(/:\s+(.+)/);
|
|
93
|
+
return { gpu: match?.[1] || lspci.split("\n")[0], vram: "Unknown" };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (process.platform === "darwin") {
|
|
97
|
+
const sp = run("system_profiler SPDisplaysDataType 2>/dev/null | grep 'Chipset Model\\|VRAM'");
|
|
98
|
+
if (sp) {
|
|
99
|
+
const chipMatch = sp.match(/Chipset Model:\s+(.+)/);
|
|
100
|
+
const vramMatch = sp.match(/VRAM.*?:\s+(.+)/);
|
|
101
|
+
return {
|
|
102
|
+
gpu: chipMatch?.[1] || "Apple Silicon",
|
|
103
|
+
vram: vramMatch?.[1] || "Unified Memory",
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return { gpu: "Unknown GPU", vram: "Unknown" };
|
|
108
|
+
}
|
|
109
|
+
function detectRam() {
|
|
110
|
+
const totalBytes = os.totalmem();
|
|
111
|
+
return formatBytes(totalBytes);
|
|
112
|
+
}
|
|
113
|
+
function detectOs() {
|
|
114
|
+
if (process.platform === "win32") {
|
|
115
|
+
const ver = run("ver");
|
|
116
|
+
if (ver)
|
|
117
|
+
return ver;
|
|
118
|
+
return `Windows ${os.release()}`;
|
|
119
|
+
}
|
|
120
|
+
if (process.platform === "darwin") {
|
|
121
|
+
const ver = run("sw_vers -productVersion");
|
|
122
|
+
return ver ? `macOS ${ver}` : "macOS";
|
|
123
|
+
}
|
|
124
|
+
// Linux
|
|
125
|
+
const pretty = run("cat /etc/os-release 2>/dev/null | grep PRETTY_NAME | cut -d= -f2 | tr -d '\"'");
|
|
126
|
+
return pretty || `Linux ${os.release()}`;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Auto-detect hardware specs from the system.
|
|
130
|
+
* Returns a HardwareSpec with best-effort values.
|
|
131
|
+
*/
|
|
132
|
+
export function detectHardwareSpec() {
|
|
133
|
+
const { gpu, vram } = detectGpu();
|
|
134
|
+
const ram = detectRam();
|
|
135
|
+
const detectedOs = detectOs();
|
|
136
|
+
return { gpu, vram, ram, os: detectedOs };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Auto-detect hardware, save it, and print what was found.
|
|
140
|
+
* If detection gets "Unknown" for critical fields, offer manual override.
|
|
141
|
+
*/
|
|
142
|
+
export async function autoDetectAndSave() {
|
|
143
|
+
console.log("\n Detecting hardware...\n");
|
|
144
|
+
const spec = detectHardwareSpec();
|
|
145
|
+
console.log(` GPU: ${spec.gpu}`);
|
|
146
|
+
console.log(` VRAM: ${spec.vram}`);
|
|
147
|
+
console.log(` RAM: ${spec.ram}`);
|
|
148
|
+
console.log(` OS: ${spec.os}`);
|
|
149
|
+
const hasUnknowns = spec.gpu === "Unknown GPU" || spec.vram === "Unknown";
|
|
150
|
+
if (hasUnknowns) {
|
|
151
|
+
console.log("\n Some values couldn't be auto-detected. Fill in the blanks:\n");
|
|
152
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
153
|
+
const ask = (q, def) => new Promise((resolve) => {
|
|
154
|
+
const suffix = def ? ` [${def}]` : "";
|
|
155
|
+
rl.question(`${q}${suffix}: `, (answer) => resolve(answer.trim() || def || ""));
|
|
156
|
+
});
|
|
157
|
+
if (spec.gpu === "Unknown GPU")
|
|
158
|
+
spec.gpu = await ask(" GPU", spec.gpu);
|
|
159
|
+
if (spec.vram === "Unknown")
|
|
160
|
+
spec.vram = await ask(" VRAM (e.g. 12GB)", spec.vram);
|
|
161
|
+
rl.close();
|
|
162
|
+
}
|
|
163
|
+
saveHardwareSpec(spec);
|
|
164
|
+
console.log(`\n Hardware spec saved to ${getHardwarePath()}\n`);
|
|
165
|
+
return spec;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Interactive manual prompts for all fields (--setup-hardware).
|
|
169
|
+
* Pre-fills with auto-detected values so user can just press Enter.
|
|
170
|
+
*/
|
|
37
171
|
export async function promptHardwareSpec() {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
output: process.stdout,
|
|
41
|
-
});
|
|
172
|
+
const detected = detectHardwareSpec();
|
|
173
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
42
174
|
const ask = (q, def) => new Promise((resolve) => {
|
|
43
175
|
const suffix = def ? ` [${def}]` : "";
|
|
44
176
|
rl.question(`${q}${suffix}: `, (answer) => resolve(answer.trim() || def || ""));
|
|
45
177
|
});
|
|
46
|
-
console.log("\n Hardware Setup for Scout
|
|
47
|
-
console.log("
|
|
48
|
-
const gpu = await ask(" GPU",
|
|
49
|
-
const vram = await ask(" VRAM
|
|
50
|
-
const ram = await ask("
|
|
51
|
-
const
|
|
178
|
+
console.log("\n Hardware Setup for Scout");
|
|
179
|
+
console.log(" Auto-detected values shown in brackets — press Enter to accept.\n");
|
|
180
|
+
const gpu = await ask(" GPU", detected.gpu);
|
|
181
|
+
const vram = await ask(" VRAM", detected.vram);
|
|
182
|
+
const ram = await ask(" RAM", detected.ram);
|
|
183
|
+
const osName = await ask(" OS", detected.os);
|
|
52
184
|
const notes = await ask(" Notes (optional, e.g. 'prefer uncensored models')");
|
|
53
185
|
rl.close();
|
|
54
|
-
const spec = { gpu, vram, ram, os };
|
|
186
|
+
const spec = { gpu, vram, ram, os: osName };
|
|
55
187
|
if (notes)
|
|
56
188
|
spec.notes = notes;
|
|
57
189
|
saveHardwareSpec(spec);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware.js","sourceRoot":"","sources":["../../src/config/hardware.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,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