@halfagiraf/clawx 0.2.1 → 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.
Files changed (2) hide show
  1. package/README.md +103 -12
  2. 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/ CLI entry point and REPL
607
- config/ Configuration loading (.env, JSON)
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 Agent orchestrator (wires pi-agent-core loop)
610
- provider.ts Model/provider resolution for local endpoints
611
- session.ts JSON-file session persistence
612
- streaming.ts Terminal output renderer
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 TUI extension: /chat toggle, auto-detection, prompt swap
699
+ chat-mode.ts TUI extension: /chat toggle, auto-detection, prompt swap
615
700
  tools/
616
- sshRun.ts SSH execution (ssh2)
617
- gitStatus.ts Git status wrapper
618
- gitDiff.ts Git diff wrapper
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
- types/ TypeScript type definitions
621
- utils/ Logger, system prompt builder
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halfagiraf/clawx",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Terminal-first coding agent — runs locally with Ollama, DeepSeek, OpenAI, or any OpenAI-compatible endpoint",
5
5
  "type": "module",
6
6
  "bin": {