Skip to content

Commit be7321f

Browse files
committed
update readme
1 parent ea239f6 commit be7321f

2 files changed

Lines changed: 53 additions & 44 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: Build Executables
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
68
- "v*"
9+
pull_request:
10+
branches:
11+
- main
712
workflow_dispatch:
813

914
permissions:

README.md

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,81 @@
11
# semble-executable
22

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.
44

5-
## Prerequisites
5+
## Platforms
66

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` |
915

10-
## Quick Start
16+
## Download
1117

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.
2819

2920
## Usage
3021

31-
The executable works exactly like the installed `semble` CLI:
22+
The executable works exactly like the `semble` CLI:
3223

3324
```bash
25+
# Make it executable (Linux/macOS)
26+
chmod +x semble-macos-arm64
27+
3428
# Search a local repo
35-
./dist/semble search "authentication flow" ./my-project
29+
./semble-macos-arm64 search "authentication flow" ./my-project
3630

3731
# 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
3933

4034
# 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
4236

43-
# Run as MCP server (requires --with-mcp build flag)
44-
./dist/semble --content all
37+
# Run as MCP server
38+
./semble-macos-arm64
4539
```
4640

47-
## Build Options
41+
## Building Locally
4842

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/).
5244

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
5548

56-
# Include MCP server support
49+
# Build the executable
5750
uv run python build.py --with-mcp
5851

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" .
6154
```
6255

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
6957

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+
```
7164

7265
## CI/CD
7366

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.
7579

7680
## License
7781

0 commit comments

Comments
 (0)