aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-12 22:51:23 +0200
committeruser <user@clank>2026-08-12 22:51:23 +0200
commitf8f035713f29676348602246036aba840468cc5f (patch)
treec14f2298d9771cd9b6215f8a40743627c4412ca2 /Makefile
parentcli: init and doctor, and stop one bad project breaking a root (diff)
downloadsl0ppi-f8f035713f29676348602246036aba840468cc5f.tar.gz
sl0ppi-f8f035713f29676348602246036aba840468cc5f.tar.xz
sl0ppi-f8f035713f29676348602246036aba840468cc5f.zip
build: ship the sl0ppi CLI in the tarball
The artifact was stale twice over: it predated the protobuf fix and did not contain the CLI at all. Both fixed, and the whole chain re-verified from the tarball rather than assumed. The CLI ships as a single 31K file (`bun build --target=bun`) run by the bundled bun, rather than a source tree or a second `--compile`d binary that would embed another 90M copy of bun. `install.sh` generates the wrapper and pins SL0PPI_BIN to the sl0ppij it just installed, so the orchestrator can never end up driving some other zellij that happens to come first on PATH. Verified in a throwaway HOME with node, npm, bun, cargo, rustc and python3 all replaced by poison stubs that fail loudly if invoked: sl0ppij --version -> 0.45.0+sl0p1 (static musl, no libc dependency) pi --version -> 0.84.1 (bundled bun) sl0ppi doctor -> all good sl0ppi init x2 -> two projects scaffolded sl0ppi up -> session "dev", 2 tabs, agents suspended sl0ppi ls -> agent:suspended, 1 pane each sl0ppi up (again) -> "up to date" And the promise the whole thing exists for, end to end: attach a client, press Enter in the suspended agent pane, and pi starts on the bundled runtime -- while the other project's agent stays suspended, because only the focused pane got the key. `make test` now runs the CLI suite alongside the Rust ones, so the two halves cannot drift apart unnoticed.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1298a31..fe216e7 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ PKG := sl0ppi-$(VERSION)-x86_64-linux
ROOT := $(CURDIR)
FORK := $(ROOT)/sl0ppij
STATUS := $(ROOT)/sl0pstatus
+CLI := $(ROOT)/cli
STAGE := $(ROOT)/packaging/stage/$(PKG)
OUT := $(ROOT)/packaging/out
VENDOR := $(ROOT)/vendor/cache
@@ -42,6 +43,7 @@ help: ## Show this help
.PHONY: version
version: ## Print the sl0ppi version and what it is built from
@echo "sl0ppi $(VERSION)"
+ @echo "sl0ppi-cli $$(grep -m1 '"version"' $(CLI)/package.json | cut -d'"' -f4)"
@echo "sl0ppij $$(grep -m1 '^version = ' $(FORK)/Cargo.toml | cut -d'"' -f2)"
@echo "sl0pstatus $$(grep -m1 '^version = ' $(STATUS)/Cargo.toml | cut -d'"' -f2)"
@echo "pi (pinned) $(PI_VERSION)"
@@ -77,6 +79,14 @@ plugins: ## Build the in-tree wasm plugins (pane-finder, sl0pstatus)
cd $(FORK)/sl0p/zj-pane-finder && cargo build --release --target wasm32-wasip1
cd $(STATUS) && cargo build --release --target wasm32-wasip1
+.PHONY: cli
+cli: ## Bundle the sl0ppi CLI to a single file (runs on the bundled bun)
+ cd $(CLI) && bun build src/index.ts --target=bun --outfile=dist/sl0ppi.js
+
+.PHONY: cli-test
+cli-test: ## Run the CLI test suite
+ cd $(CLI) && bun test
+
.PHONY: check
check: ## Cheap compile gate
cd $(FORK) && cargo check -p zellij-server
@@ -86,7 +96,7 @@ check: ## Cheap compile gate
--features vendored_curl,web_server_capability
.PHONY: test
-test: ## Unit tests for the crates we actually modify
+test: cli-test ## All tests: the CLI, plus the crates we actually modify
cd $(FORK) && cargo test -p zellij-server --lib && cargo test -p zellij-utils --lib
##@ Package
@@ -96,7 +106,7 @@ vendor: ## Fetch pinned bun + pi into vendor/cache (network)
packaging/fetch-vendor.sh "$(VENDOR)" "$(BUN_VERSION)" "$(PI_VERSION)"
.PHONY: stage
-stage: build plugins vendor ## Assemble the install tree under packaging/stage
+stage: build plugins cli vendor ## Assemble the install tree under packaging/stage
SL0PPI_TARGET="$(TARGET)" packaging/stage.sh "$(STAGE)" "$(VERSION)" "$(BIN_NAME)" "$(CARGO_BIN)"
.PHONY: package