Skip to content

Commit 170a910

Browse files
authored
docs(search): relocate /search setup to docs and fix dead URLs (#170)
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
1 parent 760422a commit 170a910

7 files changed

Lines changed: 50 additions & 30 deletions

File tree

README.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -138,30 +138,7 @@ bun run sandbox:stop
138138

139139
For the full architecture and security philosophy behind the sandbox, see [`sandbox/README.md`](sandbox/README.md).
140140

141-
### Step 2: Setup the search sandbox (Optional, required for /search)
142-
143-
The `/search` command uses an agentic search pipeline that depends on two local Docker containers: a **SearXNG** meta-search engine and a **Trafilatura** reader. This setup ensures that your search queries and the content you read remain entirely local.
144-
145-
**Prerequisite:** [Docker Desktop](https://www.docker.com/get-started) must be running.
146-
147-
1. **Start the search services**
148-
149-
```bash
150-
bun run search-box:start
151-
```
152-
153-
2. **Verify services (Optional)**
154-
155-
```bash
156-
# Search Engine check:
157-
curl "http://127.0.0.1:25017/search?q=thuki&format=json"
158-
```
159-
160-
Without this service running, the `/search` command will be disabled in the chat, but all other features will remain available.
161-
162-
For more details on the agentic search pipeline, see [docs/agentic-search.md](docs/agentic-search.md).
163-
164-
### Step 3: Install Thuki
141+
### Step 2: Install Thuki
165142

166143
#### Download (Recommended)
167144

@@ -197,6 +174,12 @@ bun run dev
197174

198175
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full development setup guide.
199176

177+
### Optional: Enable `/search`
178+
179+
The `/search` command runs a fully local agentic search pipeline backed by two Docker services (SearXNG + a Trafilatura reader). It is **not bundled with the `.dmg`**: enabling it currently requires cloning this repository to run the local services. Every other Thuki feature works without it. First-class, out-of-box `/search` support is on the roadmap.
180+
181+
See [docs/agentic-search.md#setup](docs/agentic-search.md#setup) for the setup steps.
182+
200183
## Architecture & Security
201184

202185
<details>

docs/agentic-search.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,43 @@ A deep dive into Thuki's agentic RAG search pipeline: how retrieval-augmented ge
44

55
---
66

7+
## Setup
8+
9+
> **Roadmap:** First-class, out-of-box `/search` support (bundled native sidecars or pre-built container images shipped with the app) is planned. Today, enabling `/search` requires cloning this repository to run the local Docker services described below. Track progress and contribute in the project's [GitHub issues](https://github.com/quiet-node/thuki/issues).
10+
11+
The `/search` command depends on two local Docker containers: a **SearXNG** meta-search engine and a **Trafilatura** reader. Both run on `127.0.0.1` only, so every query and every fetched page stays on your machine.
12+
13+
**Prerequisites**
14+
15+
- [Docker Desktop](https://www.docker.com/get-started) installed and running.
16+
- [Bun](https://bun.sh) installed (used to launch the Compose stack).
17+
- A local clone of the Thuki repository.
18+
19+
**Start the services**
20+
21+
```bash
22+
git clone https://github.com/quiet-node/thuki.git
23+
cd thuki
24+
bun install
25+
bun run search-box:start
26+
```
27+
28+
**Verify (optional)**
29+
30+
```bash
31+
curl "http://127.0.0.1:25017/search?q=thuki&format=json"
32+
```
33+
34+
**Stop the services**
35+
36+
```bash
37+
bun run search-box:stop
38+
```
39+
40+
Without these services running, the `/search` command stays disabled in the chat; every other Thuki feature continues to work normally.
41+
42+
---
43+
744
## The Problem
845

946
To understand why `/search` is built the way it is, it helps to understand what simpler approaches get wrong. There are three of them.

docs/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Runs agentic web search and answers from live sources with citations.
3030

3131
**Behavior:** Routes the message through Thuki's local search pipeline instead of plain chat. Answers are grounded in retrieved web sources and typically include inline citations plus a Sources footer.
3232

33-
**Limit:** Requires the search sandbox to be running. Use it for current, changing, or cutoff-sensitive information.
33+
**Limit:** Requires the search sandbox to be running. See [agentic-search.md#setup](agentic-search.md#setup) for setup steps. Use it for current, changing, or cutoff-sensitive information.
3434

3535
---
3636

src-tauri/src/search/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ impl SearchError {
437437
Self::SandboxUnavailable => {
438438
"Thuki's search sandbox isn't running.\n\
439439
The /search command needs two local containers (SearXNG and a Trafilatura reader) to be up. \
440-
See the setup steps in the repo README:\n\
441-
https://github.com/quiet-node/thuki/blob/main/README.md#setup-the-search-sandbox-optional-required-for-search"
440+
See the setup guide:\n\
441+
https://github.com/quiet-node/thuki/blob/main/docs/agentic-search.md#setup"
442442
.to_string()
443443
}
444444
}

src/components/SandboxSetupCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { invoke } from '@tauri-apps/api/core';
88
*/
99
export function SandboxSetupCard() {
1010
const SETUP_URL =
11-
'https://github.com/quiet-node/thuki#step-2-setup-the-search-sandbox-optional-required-for-search';
11+
'https://github.com/quiet-node/thuki/blob/main/docs/agentic-search.md#setup';
1212

1313
const handleOpenGuide = () => {
1414
void invoke('open_url', { url: SETUP_URL });

src/components/__tests__/SandboxSetupCard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('SandboxSetupCard', () => {
3535
const button = screen.getByRole('button', { name: /Setup Guide/i });
3636
fireEvent.click(button);
3737
expect(invoke).toHaveBeenCalledWith('open_url', {
38-
url: 'https://github.com/quiet-node/thuki#step-2-setup-the-search-sandbox-optional-required-for-search',
38+
url: 'https://github.com/quiet-node/thuki/blob/main/docs/agentic-search.md#setup',
3939
});
4040
});
4141

src/config/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const COMMANDS: readonly Command[] = [
6969
behavior:
7070
"Routes the message through Thuki's local search pipeline instead of plain chat. Answers are grounded in retrieved web sources and typically include inline citations plus a Sources footer.",
7171
limit:
72-
'Requires the search sandbox to be running. Use it for current, changing, or cutoff-sensitive information.',
72+
'Requires the search sandbox to be running. See [agentic-search.md#setup](agentic-search.md#setup) for setup steps. Use it for current, changing, or cutoff-sensitive information.',
7373
},
7474
promptHelp: {
7575
summary: 'agentic web search for current or cutoff-sensitive questions.',

0 commit comments

Comments
 (0)