You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
semble search "save model to disk" ./my-project --top-k 10
64
64
```
65
65
66
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "authentication" ./my-project --content all
72
+
```
73
+
66
74
Use `semble find-related` to discover code similar to a known location (pass `file_path` and `line` from a prior search result):
67
75
68
76
```bash
@@ -76,9 +84,10 @@ If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its plac
76
84
### Workflow
77
85
78
86
1. Start with `semble search` to find relevant chunks.
79
-
2. Inspect full files only when the returned chunk is not enough context.
80
-
3. Optionally use `semble find-related` with a promising result's `file_path` and `line` to discover related implementations.
81
-
4. Use grep only when you need exhaustive literal matches or quick confirmation of an exact string.
87
+
2. Use `--content docs` for documentation, `--content config` for config files, or `--content all` for everything.
88
+
3. Inspect full files only when the returned chunk is not enough context.
89
+
4. Optionally use `semble find-related` with a promising result's `file_path` and `line` to discover related implementations.
90
+
5. Use grep only when you need exhaustive literal matches or quick confirmation of an exact string.
82
91
```
83
92
84
93
</details>
@@ -287,6 +296,8 @@ Add to `~/.config/zed/settings.json` (or `.zed/settings.json` in your project):
287
296
|`search`| Search a codebase with a natural-language or code query. Pass `repo` as a local directory path or an https:// git URL. |
288
297
|`find_related`| Given a file path and line number, return chunks semantically similar to the code at that location. |
289
298
299
+
By default the MCP server indexes only code files. To also index documentation, config, or everything, append `--content docs`, `--content config`, or `--content all` to the server command, or a combination, e.g. `--content code docs`. For example, in Claude Code: `claude mcp add semble -s user -- uvx --from "semble[mcp]" semble --content all`.
semble search "save model to disk" ./my-project --top-k 10
308
319
```
309
320
321
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "authentication" ./my-project --content all
388
+
360
389
# Find code similar to a known location
361
390
semble find-related src/auth.py 42 ./my-project
362
391
```
363
392
364
-
`path` defaults to the current directory when omitted; git URLs are accepted. If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its place.
393
+
`--content` accepts `code` (default), `docs`, `config`, or `all`. `path` defaults to the current directory when omitted; git URLs are accepted. If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its place.
365
394
366
395
<details>
367
396
<summary>Savings</summary>
@@ -395,11 +424,20 @@ Stats are stored in `~/.semble/savings.jsonl`.
395
424
Semble can also be used as a Python library for programmatic access, useful when building custom tooling or integrating search directly into your own code.
396
425
397
426
```python
398
-
from semble import SembleIndex
427
+
from semble importContentType, SembleIndex
399
428
400
-
# Index a local directory
429
+
# Index a local directory (code only, the default)
401
430
index = SembleIndex.from_path("./my-project")
402
431
432
+
# Index docs and prose (markdown, rst, etc.)
433
+
index = SembleIndex.from_path("./my-project", content=ContentType.DOCS)
434
+
435
+
# Index everything (code, docs, and config)
436
+
index = SembleIndex.from_path("./my-project", content=[ContentType.CODE, ContentType.DOCS, ContentType.CONFIG])
437
+
438
+
# Index code and docs together
439
+
index = SembleIndex.from_path("./my-project", content=[ContentType.CODE, ContentType.DOCS])
440
+
403
441
# Index a remote git repository
404
442
index = SembleIndex.from_git("https://github.com/MinishLab/model2vec")
semble search "save model to disk" ./my-project --top-k 10
13
13
```
14
14
15
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "save model to disk" ./my-project --top-k 10
13
13
```
14
14
15
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "save model to disk" ./my-project --top-k 10
12
12
```
13
13
14
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "save model to disk" ./my-project --top-k 10
15
15
```
16
16
17
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "save model to disk" ./my-project --top-k 10
15
15
```
16
16
17
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
semble search "save model to disk" ./my-project --top-k 10
16
16
```
17
17
18
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
0 commit comments