@lbroth/rothunter 1.0.0-rc.2 → 1.0.0-rc.4

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 +47 -45
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -32,74 +32,69 @@ Full detector list with severities + tunables: [`docs/DETECTORS.md`](./docs/DETE
32
32
  | Single-workspace | All 24 |
33
33
  | Multi-workspace (cross-repo via `rothunter.config.json`) | 9 cross-repo always-on (duplicate-type, duplicate-function, dead-module, dead-export, dead-api, long-function, deep-nesting, public-any, hot-hub-file) + the remaining 15 looped per workspace with workspace-namespaced fingerprints |
34
34
 
35
- ## Quick start
36
-
37
- Three paths. Pick one — they all end at <http://localhost:3000>.
35
+ ## What you actually get
38
36
 
39
- ### 1. Docker (fastest, no clone)
37
+ rothunter has TWO independent pieces:
40
38
 
41
- ```bash
42
- # scan the repo in $(pwd) — needs an LLM endpoint
43
- docker run --rm -p 3000:3000 \
44
- -v "$(pwd):/workspace" \
45
- -e ROTHUNTER_LLM_BASE_URL="$LLM_URL" \
46
- ghcr.io/lbroth/rothunter:latest
47
- ```
39
+ | Piece | What it does | Where it runs |
40
+ |---|---|---|
41
+ | **Engine + dashboard** (`rothunter`) | parses your repo, runs 24 detectors, serves the Fastify API + React UI on `:3000` | this is what the npm package / docker image ships |
42
+ | **LLM** (any OpenAI-compatible endpoint) | answers the verdict prompts ("is this finding real or intentional?") — typically `llama.cpp` with Qwen2.5-Coder-14B | runs separately, you point rothunter at it |
48
43
 
49
- No `ROTHUNTER_LLM_BASE_URL`? Use the compose stack it ships an
50
- llama.cpp sidecar that downloads a 9 GB model on first boot:
44
+ The engine runs WITHOUT the LLMthe deterministic detectors still
45
+ fire, you just don't get the verdict pass that auto-filters the FPs.
46
+ So the question every install path answers is: "do you want me to
47
+ also start an LLM, or are you bringing your own?"
51
48
 
52
- ```bash
53
- git clone https://github.com/lBroth/rothunter && cd rothunter
54
- ROTHUNTER_WORKSPACE_HOST=/path/to/your-repo npm run docker
55
- ```
49
+ ## Quick start
56
50
 
57
- ### 2. npx (no Docker)
51
+ The fastest path `cd` into the repo you want to scan and:
58
52
 
59
53
  ```bash
60
- # server + UI on :3000; point at any OpenAI-compatible LLM endpoint
61
- ROTHUNTER_LLM_BASE_URL=http://127.0.0.1:8080/v1 \
62
- npx @lbroth/rothunter
54
+ npx @lbroth/rothunter@next
63
55
  ```
64
56
 
65
- The npx flow boots only the server + dashboard. Run the LLM yourself
66
- with `brew install llama.cpp && llama-server --hf-repo bartowski/Qwen2.5-Coder-14B-Instruct-GGUF` (or aim
67
- `ROTHUNTER_LLM_BASE_URL` at vLLM / OpenRouter / LM Studio).
57
+ That boots the engine + dashboard on <http://localhost:3000>. The
58
+ current directory is auto-mounted as the workspace. Default LLM
59
+ endpoint is `http://127.0.0.1:8080/v1` (a local `llama.cpp`) set
60
+ `ROTHUNTER_LLM_BASE_URL` to point elsewhere. **No LLM is required**
61
+ for the scan to run; deterministic detectors fire either way, you
62
+ just lose the LLM-driven auto-FP routing.
68
63
 
69
- ### 3. Clone + dev mode (contributor flow)
64
+ ### Docker (no node install)
70
65
 
71
66
  ```bash
72
- git clone https://github.com/lBroth/rothunter && cd rothunter
73
- npm run setup # root + UI deps
74
- npm run dev:full # server + UI + auto-launched llama.cpp
67
+ docker run --rm -p 3000:3000 \
68
+ -v "$(pwd):/workspace" \
69
+ -e ROTHUNTER_LLM_BASE_URL="http://host.docker.internal:8080/v1" \
70
+ ghcr.io/lbroth/rothunter:latest
75
71
  ```
76
72
 
77
- `dev:full` auto-detects an LLM backend on `PATH`:
73
+ ### Docker Compose bundles llama.cpp + Qwen2.5-Coder-14B
78
74
 
79
- | # | Backend | When picked |
80
- |---|---------|-------------|
81
- | 1 | **llama.cpp native** (`llama-server`) | `llama-server` on PATH (`brew install llama.cpp`) — uses Metal / CUDA when the binary supports it |
82
- | 2 | **Docker** (`docker compose up rothunter-llm`) | Docker Desktop available |
83
-
84
- Force a backend or model:
75
+ For "one command, everything boots" (downloads 9 GB on first run):
85
76
 
86
77
  ```bash
87
- ROTHUNTER_LLM_BACKEND=llamacpp npm run dev:full
88
- ROTHUNTER_LLM_MODEL=bartowski/Qwen2.5-Coder-7B-Instruct-GGUF npm run dev:full
78
+ git clone https://github.com/lBroth/rothunter && cd rothunter
79
+ ROTHUNTER_WORKSPACE_HOST=/path/to/your-repo npm run docker
89
80
  ```
90
81
 
91
- ### Point at a remote LLM
82
+ ### Running your own LLM
92
83
 
93
- Skip the auto-launch when you already have an OpenAI-compatible endpoint:
84
+ Any OpenAI-compatible endpoint works (vLLM / Ollama / LM Studio /
85
+ OpenRouter / a colleague's box). Local llama.cpp one-liner:
94
86
 
95
87
  ```bash
96
- export ROTHUNTER_LLM_BASE_URL=https://my-llm.internal/v1
97
- export ROTHUNTER_LLM_MODEL=Qwen2.5-Coder-14B-Instruct
98
- export ROTHUNTER_LLM_API_KEY=... # if the endpoint needs auth
99
- export ROTHUNTER_LLM_CONCURRENCY=4 # raise for vLLM / llama.cpp --parallel N
100
- npx @lbroth/rothunter
88
+ brew install llama.cpp # macOS — Linux: see ggml-org/llama.cpp
89
+ llama-server \
90
+ --hf-repo bartowski/Qwen2.5-Coder-14B-Instruct-GGUF \
91
+ --hf-file Qwen2.5-Coder-14B-Instruct-Q4_K_M.gguf \
92
+ --host 127.0.0.1 --port 8080 --jinja -c 8192 -n 256
101
93
  ```
102
94
 
95
+ Then point rothunter at it via `ROTHUNTER_LLM_BASE_URL`
96
+ (default already targets `http://127.0.0.1:8080/v1`).
97
+
103
98
  ## Layout
104
99
 
105
100
  ```
@@ -144,7 +139,14 @@ See [`ROADMAP.md`](./ROADMAP.md) for planned detectors (TypeScript misuse:
144
139
 
145
140
  ## Contributing
146
141
 
147
- PRs welcome. See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for the detector-author checklist and quality bar.
142
+ PRs welcome. See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for the
143
+ detector-author checklist and quality bar. Local dev flow:
144
+
145
+ ```bash
146
+ git clone https://github.com/lBroth/rothunter && cd rothunter
147
+ npm run setup # root + UI deps
148
+ npm run dev:full # server + UI + auto-launched llama.cpp on PATH
149
+ ```
148
150
 
149
151
  ## License
150
152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lbroth/rothunter",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Self-hosted code-hygiene engine for TypeScript / JavaScript codebases. Deterministic detectors + local LLM verdicts + dashboard.",
5
5
  "license": "MIT",
6
6
  "author": "lBroth",