Skip to content

Commit a5901a3

Browse files
committed
add onedir
1 parent 8beb7eb commit a5901a3

2 files changed

Lines changed: 94 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 77 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,37 +50,81 @@ jobs:
5050
- name: Install dependencies
5151
run: uv sync --extra mcp
5252

53-
- name: Build executable
53+
- name: Build onefile executable
5454
run: uv run python build.py --name semble --with-mcp
5555

56-
- name: Smoke test (Unix)
56+
- name: Rename onefile artifact (Unix)
57+
if: runner.os != 'Windows'
58+
run: mv dist/semble dist/${{ matrix.artifact }}
59+
60+
- name: Rename onefile artifact (Windows)
61+
if: runner.os == 'Windows'
62+
run: mv dist/semble.exe dist/${{ matrix.artifact }}
63+
64+
- name: Build onedir executable
65+
run: uv run python build.py --onedir --name semble --with-mcp
66+
67+
- name: Smoke test onefile (Unix)
5768
if: runner.os != 'Windows'
5869
run: |
59-
chmod +x dist/semble
60-
./dist/semble search --help
61-
./dist/semble init --help
70+
chmod +x dist/${{ matrix.artifact }}
71+
./dist/${{ matrix.artifact }} search --help
72+
./dist/${{ matrix.artifact }} init --help
6273
63-
- name: Smoke test (Windows)
74+
- name: Smoke test onefile (Windows)
6475
if: runner.os == 'Windows'
6576
run: |
66-
dist\semble.exe search --help
67-
dist\semble.exe init --help
77+
dist\${{ matrix.artifact }} search --help
78+
dist\${{ matrix.artifact }} init --help
6879
69-
- name: Rename artifact (Unix)
80+
- name: Smoke test onedir (Unix)
7081
if: runner.os != 'Windows'
71-
run: mv dist/semble dist/${{ matrix.artifact }}
82+
run: |
83+
chmod +x dist/semble/semble
84+
./dist/semble/semble search --help
85+
./dist/semble/semble init --help
7286
73-
- name: Rename artifact (Windows)
87+
- name: Smoke test onedir (Windows)
7488
if: runner.os == 'Windows'
75-
run: mv dist/semble.exe dist/${{ matrix.artifact }}
89+
run: |
90+
dist\semble\semble.exe search --help
91+
dist\semble\semble.exe init --help
92+
93+
- name: Package onedir as archive (Unix)
94+
if: runner.os != 'Windows'
95+
run: |
96+
cd dist/semble
97+
tar -czf ../semble-${{ matrix.target }}-fast.tar.gz .
7698
77-
- name: Upload artifact
99+
- name: Package onedir as archive (Windows)
100+
if: runner.os == 'Windows'
101+
run: |
102+
cd dist/semble
103+
Compress-Archive -Path * -DestinationPath ../semble-${{ matrix.target }}-fast.zip
104+
105+
- name: Upload onefile artifact
78106
uses: actions/upload-artifact@v4
79107
with:
80108
name: ${{ matrix.artifact }}
81109
path: dist/${{ matrix.artifact }}
82110
retention-days: 30
83111

112+
- name: Upload onedir artifact (Unix)
113+
if: runner.os != 'Windows'
114+
uses: actions/upload-artifact@v4
115+
with:
116+
name: semble-${{ matrix.target }}-fast.tar.gz
117+
path: dist/semble-${{ matrix.target }}-fast.tar.gz
118+
retention-days: 30
119+
120+
- name: Upload onedir artifact (Windows)
121+
if: runner.os == 'Windows'
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: semble-${{ matrix.target }}-fast.zip
125+
path: dist/semble-${{ matrix.target }}-fast.zip
126+
retention-days: 30
127+
84128
integration-test:
85129
needs: [build]
86130
runs-on: ubuntu-22.04
@@ -163,19 +207,38 @@ jobs:
163207
164208
No Python installation required. Download the binary for your platform and run it directly.
165209
210+
### Single-file binaries (portable, slower startup)
211+
166212
| Platform | Architecture | File |
167213
|----------|-------------|------|
168214
| Linux | x64 | `semble-linux-x64` |
169215
| Linux | ARM64 | `semble-linux-arm64` |
170216
| macOS | Apple Silicon (ARM64) | `semble-macos-arm64` |
171217
| Windows | x64 | `semble-windows-x64.exe` |
172218
219+
### Fast-start archives (extract and run, ~20x faster startup)
220+
221+
| Platform | Architecture | File |
222+
|----------|-------------|------|
223+
| Linux | x64 | `semble-linux-x64-fast.tar.gz` |
224+
| Linux | ARM64 | `semble-linux-arm64-fast.tar.gz` |
225+
| macOS | Apple Silicon (ARM64) | `semble-macos-arm64-fast.tar.gz` |
226+
| Windows | x64 | `semble-windows-x64-fast.zip` |
227+
173228
### Usage
229+
230+
**Single-file (portable):**
174231
```bash
175-
chmod +x semble-*
232+
chmod +x semble-linux-x64
176233
./semble-linux-x64 search "authentication flow" ./my-project
177234
```
178235
236+
**Fast-start (recommended for repeated use):**
237+
```bash
238+
tar -xzf semble-linux-x64-fast.tar.gz -C semble/
239+
./semble/semble search "authentication flow" ./my-project
240+
```
241+
179242
### Verify checksums
180243
```bash
181244
sha256sum -c checksums-sha256.txt

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ Packages [semble](https://github.com/MinishLab/semble) into standalone executabl
44

55
## Platforms
66

7-
| Platform | Architecture | Artifact |
8-
|----------|-------------|----------|
9-
| Linux | x64 | `semble-linux-x64` |
10-
| Linux | ARM64 | `semble-linux-arm64` |
11-
| macOS | Apple Silicon (ARM64) | `semble-macos-arm64` |
12-
| Windows | x64 | `semble-windows-x64.exe` |
7+
| Platform | Architecture | Single-file | Fast-start archive |
8+
|----------|-------------|-------------|-------------------|
9+
| Linux | x64 | `semble-linux-x64` | `semble-linux-x64-fast.tar.gz` |
10+
| Linux | ARM64 | `semble-linux-arm64` | `semble-linux-arm64-fast.tar.gz` |
11+
| macOS | Apple Silicon (ARM64) | `semble-macos-arm64` | `semble-macos-arm64-fast.tar.gz` |
12+
| Windows | x64 | `semble-windows-x64.exe` | `semble-windows-x64-fast.zip` |
13+
14+
**Single-file** — one portable binary, no extraction needed. Slower startup (~6s) due to decompression on each run.
15+
16+
**Fast-start** — a compressed archive containing the binary + pre-extracted dependencies. ~20x faster startup, recommended for repeated use or MCP server mode.
1317

1418
## Download
1519

@@ -20,20 +24,22 @@ Grab the latest binary from the [Releases](../../releases) page, or download the
2024
The executable works exactly like the `semble` CLI:
2125

2226
```bash
23-
# Make it executable (Linux/macOS)
27+
# Single-file: make it executable and run (Linux/macOS)
2428
chmod +x semble-macos-arm64
25-
26-
# Search a local repo
2729
./semble-macos-arm64 search "authentication flow" ./my-project
2830

31+
# Fast-start: extract and run
32+
tar -xzf semble-macos-arm64-fast.tar.gz -C semble/
33+
./semble/semble search "authentication flow" ./my-project
34+
2935
# Search a remote repo
3036
./semble-macos-arm64 search "save model" https://github.com/MinishLab/model2vec
3137

3238
# Find related code
3339
./semble-macos-arm64 find-related src/auth.py 42 ./my-project
3440

35-
# Run as MCP server
36-
./semble-macos-arm64
41+
# Run as MCP server (fast-start recommended)
42+
./semble/semble
3743
```
3844

3945
## Building Locally

0 commit comments

Comments
 (0)