Skip to content

Commit bb96a34

Browse files
committed
Add README and LICENSE
1 parent e359cb5 commit bb96a34

3 files changed

Lines changed: 90 additions & 0 deletions

File tree

CODE_MINIMAP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- PROJECT_PLAN.md: high-level milestones and objective
66
- CODE_MINIMAP.md: overview of important files and their purpose
77
- .gitignore: ignored paths for build outputs and local indexes
8+
- README.md: usage, build, and configuration overview
9+
- LICENSE: MIT license
810
- flake.lock: pinned Nix inputs for reproducible dev shell
911
- ZIG_RECENT_API_CHANGES_2025.md: Zig 0.14–0.15 API quick reference
1012
- flake.nix: Nix flake providing dev dependencies (zig_0_15) + sqlite amalgamation env vars

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Peter Marreck
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# codescan
2+
3+
Semantic code search for local repositories.
4+
5+
- Zig CLI + HTTP API
6+
- Ollama embeddings (default: `bge-large`)
7+
- sqlite-vec vector storage
8+
- Hybrid search (vector + lexical)
9+
- Language plugins (Zig, Elixir, C via tree-sitter)
10+
11+
## Build
12+
13+
```bash
14+
nix develop -c zig build -Doptimize=ReleaseFast
15+
```
16+
17+
## Test
18+
19+
```bash
20+
./test
21+
```
22+
23+
## Run (CLI)
24+
25+
```bash
26+
# index
27+
nix develop -c ./zig-out/bin/codescan index --root <path>
28+
29+
# update (full reindex)
30+
nix develop -c ./zig-out/bin/codescan update --root <path>
31+
32+
# search
33+
nix develop -c ./zig-out/bin/codescan search "hash functions" --root <path>
34+
```
35+
36+
## Run (HTTP)
37+
38+
```bash
39+
nix develop -c ./zig-out/bin/codescan serve --root <path> --http-host 127.0.0.1 --http-port 8123
40+
```
41+
42+
## Config
43+
44+
Create `<root>/.codescan/config` to override defaults. Example:
45+
46+
```
47+
# output=json|human
48+
output=human
49+
50+
# search tuning
51+
search_mode=hybrid
52+
weight_vector=0.7
53+
weight_lexical=0.3
54+
55+
# ignores
56+
ignore=**/.git/**, **/.codescan/**
57+
ignore.zig=**/.zig-cache/**,**/zig-out/**
58+
```
59+
60+
## Notes
61+
62+
- SQLite vector extension is statically linked (no runtime extension loading).
63+
- On macOS, fully static userland binaries are not supported by the OS; `libSystem` remains dynamic.
64+
65+
## License
66+
67+
MIT. See `LICENSE`.

0 commit comments

Comments
 (0)