@halfagiraf/clawx 0.2.1 → 0.2.3

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 +146 -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,123 @@ 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
+ Ask it to create a Modelfile and it does the rest — inspects the model's GGUF files, reads the README for the prompt format, and generates a complete Ollama setup:
653
+
654
+ ```
655
+ > Yes, create an Ollama Modelfile for NovachronoAI/LFM2.5-1.2B-Nova-Function-Calling-GGUF
656
+
657
+ hf_model_info { "model_id": "NovachronoAI/LFM2.5-1.2B-Nova-Function-Calling-GGUF" }
658
+
659
+ GGUF files (6):
660
+ LFM2.5-1.2B-Nova-Function-Calling.Q2_K.gguf
661
+ LFM2.5-1.2B-Nova-Function-Calling.Q4_K_M.gguf
662
+ LFM2.5-1.2B-Nova-Function-Calling.Q8_0.gguf
663
+ ...
664
+
665
+ hf_readme { "model_id": "NovachronoAI/LFM2.5-1.2B-Nova-Function-Calling-GGUF" }
666
+
667
+ ChatML Native: Uses the standard <|im_start|> format
668
+ JSON Reliability: 97% syntax accuracy
669
+ Expected output: <tool_call>{"name": "...", "arguments": {...}}</tool_call>
670
+
671
+ [writes Modelfile]
672
+ FROM ./LFM2.5-1.2B-Nova-Function-Calling.Q4_K_M.gguf
673
+ TEMPLATE """<|im_start|>system
674
+ {{ .System }}<|im_end|>
675
+ {{ range .Messages }}<|im_start|>{{ .Role }}
676
+ {{ .Content }}<|im_end|>
677
+ {{ end }}<|im_start|>assistant
678
+ """
679
+ PARAMETER temperature 0.1
680
+ PARAMETER num_ctx 4096
681
+ PARAMETER stop <|im_end|>
682
+ PARAMETER stop <|im_start|>
683
+
684
+ [writes download_model.ps1] — PowerShell script to download the GGUF
685
+ [writes test_function_calling.py] — Python test script to verify it works
686
+
687
+ Quick Start:
688
+ .\download_model.ps1
689
+ ollama create lfm-nova -f Modelfile
690
+ ollama run lfm-nova "Calculate area of circle with radius 5"
691
+
692
+ Expected VRAM: ~0.8GB — plenty of room on your 12GB RTX 3060
693
+ ```
694
+
695
+ 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.
696
+
577
697
  ### Basic REPL commands
578
698
 
579
699
  ```
@@ -603,22 +723,36 @@ Clawx runs in two modes, shown in the TUI footer:
603
723
 
604
724
  ```
605
725
  src/
606
- cli/ CLI entry point and REPL
607
- config/ Configuration loading (.env, JSON)
726
+ cli/
727
+ main.ts CLI entry point (Commander.js commands)
728
+ tui.ts TUI mode (pi-coding-agent InteractiveMode)
729
+ scout.ts Scout mode (HuggingFace model researcher)
730
+ repl.ts Basic readline REPL fallback
731
+ banner.ts Startup banner and version
732
+ config/
733
+ index.ts Configuration loading (.env, JSON)
734
+ hardware.ts Hardware spec detection and management
608
735
  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
736
+ agent.ts Agent orchestrator (wires pi-agent-core loop)
737
+ provider.ts Model/provider resolution for local endpoints
738
+ session.ts JSON-file session persistence
739
+ streaming.ts Terminal output renderer
740
+ text-tool-parser.ts Text-based tool call parser (Qwen, etc.)
613
741
  extensions/
614
- chat-mode.ts TUI extension: /chat toggle, auto-detection, prompt swap
742
+ chat-mode.ts TUI extension: /chat toggle, auto-detection, prompt swap
615
743
  tools/
616
- sshRun.ts SSH execution (ssh2)
617
- gitStatus.ts Git status wrapper
618
- gitDiff.ts Git diff wrapper
744
+ sshRun.ts SSH execution (ssh2)
745
+ gitStatus.ts Git status wrapper
746
+ gitDiff.ts Git diff wrapper
619
747
  searchFiles.ts File content search (rg/grep)
620
- types/ TypeScript type definitions
621
- utils/ Logger, system prompt builder
748
+ hfSearch.ts HuggingFace model search (Scout)
749
+ hfModelInfo.ts HuggingFace model details (Scout)
750
+ hfReadme.ts HuggingFace README reader (Scout)
751
+ types/ TypeScript type definitions
752
+ utils/
753
+ system-prompt.ts System prompt builder
754
+ scout-prompt.ts Scout system prompt builder
755
+ logger.ts Structured logger
622
756
  ```
623
757
 
624
758
  ### 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.3",
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": {