|
1 | 1 | # semble-executable |
2 | 2 |
|
3 | | -Packages [semble](https://github.com/MinishLab/semble) as a standalone executable binary using PyInstaller. No Python installation required to run the resulting binary. |
| 3 | +Packages [semble](https://github.com/MinishLab/semble) into standalone executables using PyInstaller. No Python installation required to run the resulting binaries. |
4 | 4 |
|
5 | | -## Prerequisites |
| 5 | +## Platforms |
6 | 6 |
|
7 | | -- Python 3.10+ (for building only) |
8 | | -- [uv](https://docs.astral.sh/uv/getting-started/installation/) (recommended) or pip |
| 7 | +| Platform | Architecture | Artifact | |
| 8 | +|----------|-------------|----------| |
| 9 | +| Linux | x64 | `semble-linux-x64` | |
| 10 | +| Linux | ARM64 | `semble-linux-arm64` | |
| 11 | +| macOS | Intel (x64) | `semble-macos-x64` | |
| 12 | +| macOS | Apple Silicon (ARM64) | `semble-macos-arm64` | |
| 13 | +| Windows | x64 | `semble-windows-x64.exe` | |
| 14 | +| Windows | ARM64 | `semble-windows-arm64.exe` | |
9 | 15 |
|
10 | | -## Quick Start |
| 16 | +## Download |
11 | 17 |
|
12 | | -```bash |
13 | | -# Install dependencies |
14 | | -uv sync |
15 | | - |
16 | | -# Build the executable |
17 | | -uv run python build.py |
18 | | - |
19 | | -# The binary is at: dist/semble |
20 | | -``` |
21 | | - |
22 | | -## What Gets Built |
23 | | - |
24 | | -The output is a single `semble` binary (or `semble.exe` on Windows) in `dist/` that includes: |
25 | | -- The semble CLI and all its dependencies (model2vec, tree-sitter, bm25s, etc.) |
26 | | -- Tree-sitter language grammars |
27 | | -- The potion-code-16M model (downloaded at first run if not bundled) |
| 18 | +Grab the latest binary from the [Releases](../../releases) page, or download the build artifact from the Actions tab. |
28 | 19 |
|
29 | 20 | ## Usage |
30 | 21 |
|
31 | | -The executable works exactly like the installed `semble` CLI: |
| 22 | +The executable works exactly like the `semble` CLI: |
32 | 23 |
|
33 | 24 | ```bash |
| 25 | +# Make it executable (Linux/macOS) |
| 26 | +chmod +x semble-macos-arm64 |
| 27 | + |
34 | 28 | # Search a local repo |
35 | | -./dist/semble search "authentication flow" ./my-project |
| 29 | +./semble-macos-arm64 search "authentication flow" ./my-project |
36 | 30 |
|
37 | 31 | # Search a remote repo |
38 | | -./dist/semble search "save model" https://github.com/MinishLab/model2vec |
| 32 | +./semble-macos-arm64 search "save model" https://github.com/MinishLab/model2vec |
39 | 33 |
|
40 | 34 | # Find related code |
41 | | -./dist/semble find-related src/auth.py 42 ./my-project |
| 35 | +./semble-macos-arm64 find-related src/auth.py 42 ./my-project |
42 | 36 |
|
43 | | -# Run as MCP server (requires --with-mcp build flag) |
44 | | -./dist/semble --content all |
| 37 | +# Run as MCP server |
| 38 | +./semble-macos-arm64 |
45 | 39 | ``` |
46 | 40 |
|
47 | | -## Build Options |
| 41 | +## Building Locally |
48 | 42 |
|
49 | | -```bash |
50 | | -# One-file mode (default) - single portable binary |
51 | | -uv run python build.py --onefile |
| 43 | +Requires Python 3.10+ and [uv](https://docs.astral.sh/uv/getting-started/installation/). |
52 | 44 |
|
53 | | -# One-dir mode - faster startup, directory with all files |
54 | | -uv run python build.py --onedir |
| 45 | +```bash |
| 46 | +# Install dependencies |
| 47 | +uv sync --extra mcp |
55 | 48 |
|
56 | | -# Include MCP server support |
| 49 | +# Build the executable |
57 | 50 | uv run python build.py --with-mcp |
58 | 51 |
|
59 | | -# Specify output name |
60 | | -uv run python build.py --name semble-search |
| 52 | +# Binary is at dist/semble (~29 MB) |
| 53 | +./dist/semble search "query" . |
61 | 54 | ``` |
62 | 55 |
|
63 | | -## Platform Support |
64 | | - |
65 | | -Build on each target platform to get a native binary: |
66 | | -- macOS (Intel & Apple Silicon) |
67 | | -- Linux (x86_64) |
68 | | -- Windows (x86_64) |
| 56 | +### Build options |
69 | 57 |
|
70 | | -Cross-compilation is not supported by PyInstaller; build on the target OS. |
| 58 | +```bash |
| 59 | +uv run python build.py --onefile # Single portable binary (default) |
| 60 | +uv run python build.py --onedir # Directory mode (faster startup) |
| 61 | +uv run python build.py --name my-semble # Custom binary name |
| 62 | +uv run python build.py --with-mcp # Include MCP server support |
| 63 | +``` |
71 | 64 |
|
72 | 65 | ## CI/CD |
73 | 66 |
|
74 | | -See `.github/workflows/build.yml` for automated builds on all platforms. |
| 67 | +The GitHub Actions workflow (`.github/workflows/build.yml`) builds on every push to `main` and on PRs. To create a release with downloadable binaries: |
| 68 | + |
| 69 | +```bash |
| 70 | +git tag v0.1.0 |
| 71 | +git push --tags |
| 72 | +``` |
| 73 | + |
| 74 | +This triggers the release job which uploads all 6 platform binaries plus SHA-256 checksums. |
| 75 | + |
| 76 | +## How It Works |
| 77 | + |
| 78 | +PyInstaller bundles the CPython interpreter, semble, and all dependencies (model2vec, tree-sitter grammars, numpy, etc.) into a single self-contained binary. The code runs at the same speed as a normal Python install — the benefit is zero-install portability. |
75 | 79 |
|
76 | 80 | ## License |
77 | 81 |
|
|
0 commit comments