A Terminal User Interface (TUI) recreation of a popular bomb defusal game served over SSH.
Play now:
$ ssh defuse.party -p 2222This project provides a text-based interface for playing defuse.party, connectable via SSH. It connects to the existing Go gRPC backend for game logic.
- Go 1.21+
- The gRPC backend server running
Note: This TUI imports protocol buffer definitions from the backend repository as a Go module dependency. Proto files are not duplicated in this repository - they are consumed directly from the backend's pkg/proto package.
make buildThis creates the tui-server binary.
# Set the gRPC server address if not localhost:50051
export TUI_GRPC_ADDR=localhost:50051
# Run the server (default SSH port: 2222)
./tui-serverOr use the Makefile:
TUI_GRPC_ADDR=localhost:50051 make runssh -p 2222 localhost
# Or from another machine:
ssh -p 2222 <server-ip>On first run, SSH host keys will be generated in .ssh/.
docker build -t defuse-party:latest .The Dockerfile uses go get to fetch the backend proto package from GitHub. Ensure the backend changes are committed and pushed before building.
docker run -p 2222:2222 -e TUI_GRPC_ADDR=host.docker.internal:50051 defuse-party:latestBy default, the TUI fetches proto definitions from the published backend repository on GitHub:
# Update to latest backend version
go get -u github.com/ZaneH/defuse.party-go@latest
go mod tidyThis mode is used for:
- Docker builds
- Production environments
For rapid local development with proto changes, you can use the local backend:
-
Edit
go.modand uncomment thereplacedirective:replace github.com/ZaneH/defuse.party-go => ../keep-talking
-
Make changes to proto files in
../keep-talking/proto/ -
Regenerate proto files in the backend:
cd ../keep-talking buf generate -
Test locally (TUI will use your local backend changes)
-
When ready to deploy:
- Commit and push backend changes
- Re-comment the
replacedirective ingo.mod - Run
go get -u github.com/ZaneH/defuse.party-go@latest - Commit TUI with updated
go.mod
Important: Never commit with the replace directive uncommented - it breaks production deployments.
| Variable | Default | Description |
|---|---|---|
TUI_SSH_PORT |
2222 |
SSH listen port |
TUI_GRPC_ADDR |
localhost:50051 |
gRPC backend address |