Install guides for Nix, Ubuntu, and Windows + release workflow for static binaries#9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The README only had a NixOS dev-shell quickstart — no way for someone on Ubuntu, Windows, or any non-Nix machine to install the platform, and the flake's package + NixOS module were undocumented despite already working.
What
## Installsection, split by role — hosting the server vs using the CLI:nix profile install github:sdelcore/shared, plus a copy-pasteservices.sharedNixOS module example (the module already existed in the flake, just wasn't documented).CGO_ENABLED=0 go install(with a note that Go 1.24+ is newer than Ubuntu 24.04's apt package), plus a systemd unit mirroring the NixOS module (DynamicUser, StateDirectory,/var/lib/shared).go install .../cmd/shared@latest.shared.exe; point it at the server withSHARED_SERVER.×delete button alongside the sites list.skills/install-shared-cli/: an agent skill (Claude Code or any SKILL.md-compatible agent) that installs the CLI on whatever OS it's running on — Nix → Go → release binary, then setsSHARED_SERVERand smoke-tests withshared list. README shows the one-liner to copy it into~/.claude/skills/..github/workflows/release.yml: onv*tags, cross-compiles static binaries (CGO_ENABLED=0 -trimpath -ldflags "-s -w"): linux amd64/arm64 tarballs withsharedd+shared, windows amd64/arm64 zips withshared.exeonly. Publishes withgh release create --generate-notes.shared opennow picks the opener per OS (rundll32on Windows,openon macOS,xdg-openelsewhere) instead of hardcodingxdg-open— the only Windows-incompatible code in the repo.Verified
go build,go vet,go test ./...pass; cross-compiles clean for linux, windows, and darwin (pure Go, no cgo).shared initscaffolds correctly and skips existing files on re-run.fileconfirms — no glibc coupling, unlike the nix-built binary); the windows zip contains a single valid PE32+shared.exe.actionlint..github/workflows/ci.yml: on pushes to main and PRs —go vet,go test, cross-compile check for linux/windows/darwin, andnix build(catches stalevendorHashwhen deps change). Both jobs green on this PR.