diff --git a/build-release.sh b/build-release.sh new file mode 100755 index 0000000..f5d24f7 --- /dev/null +++ b/build-release.sh @@ -0,0 +1,52 @@ +#!/bin/bash +set -e + +VERSION="v0.7.0" +OUTPUT_DIR="releases/v0.7.0" + +# Build function +build() { + local GOOS=$1 + local GOARCH=$2 + local OUTPUT_NAME="ts-ssh-${VERSION}-${GOOS}-${GOARCH}" + + if [ "$GOOS" = "windows" ]; then + OUTPUT_NAME="${OUTPUT_NAME}.exe" + fi + + echo "Building $OUTPUT_NAME..." + CGO_ENABLED=0 GOOS=$GOOS GOARCH=$GOARCH go build \ + -ldflags "-X main.version=${VERSION}" \ + -o "${OUTPUT_DIR}/${OUTPUT_NAME}" \ + . + + # Create checksum + cd "${OUTPUT_DIR}" + sha256sum "${OUTPUT_NAME}" > "${OUTPUT_NAME}.sha256" + cd - > /dev/null + + echo "โœ“ Built ${OUTPUT_NAME}" +} + +# Build for all platforms +echo "Building ts-ssh ${VERSION} for all platforms..." + +# Linux +build linux amd64 +build linux arm64 + +# macOS +build darwin amd64 +build darwin arm64 + +# Windows +build windows amd64 +build windows arm64 + +# BSD +build freebsd amd64 +build openbsd amd64 + +echo "" +echo "Build complete! Artifacts in ${OUTPUT_DIR}/" +ls -lh ${OUTPUT_DIR}/ diff --git a/releases/RELEASE_NOTES_v0.7.0.md b/releases/RELEASE_NOTES_v0.7.0.md new file mode 100644 index 0000000..5e5d21b --- /dev/null +++ b/releases/RELEASE_NOTES_v0.7.0.md @@ -0,0 +1,206 @@ +# ts-ssh v0.7.0 - Major CLI Simplification + +**Release Date**: November 4, 2025 + +This release represents a **major simplification** of ts-ssh, transforming it from a complex multi-modal CLI to a simple, SSH-like command. + +## ๐ŸŽฏ Design Philosophy + +**"Simplicity over features"** - This tool does one thing well: SSH and SCP over Tailscale networks, with a familiar, SSH-like interface. + +## ๐Ÿ“Š Major Changes + +### Code Reduction +- **From**: ~15,000 lines of code +- **To**: ~4,656 lines of code +- **Reduction**: 69% smaller codebase + +### Simplified CLI +Now mimics standard SSH command syntax - no subcommands, no complexity. + +**Before** (v0.5.0): +```bash +ts-ssh connect hostname +ts-ssh --multi host1,host2,host3 +ts-ssh --exec "uptime" --list +ts-ssh --copy file.txt --list +``` + +**After** (v0.7.0): +```bash +ts-ssh hostname +ts-ssh hostname uptime +ts-ssh -scp file.txt hostname:/tmp/ +``` + +### Removed Features +- โŒ Dual CLI modes (modern/legacy) +- โŒ 11-language internationalization system +- โŒ Multi-host operations (`--list`, `--multi`, `--exec`, `--copy`, `--pick`) +- โŒ Tmux integration +- โŒ Charmbracelet UI frameworks (Fang, Lipgloss, Huh, Cobra) +- โŒ Complex subcommand structure + +## โœ… What Remains + +All core functionality is preserved: + +- โœ… SSH connections with standard syntax +- โœ… SCP file transfers +- โœ… Tailscale tsnet integration (userspace networking) +- โœ… All security features and validation +- โœ… Post-quantum cryptography support +- โœ… Host key verification +- โœ… Multiple authentication methods +- โœ… Cross-platform support (Linux, macOS, Windows, BSD) + +## ๐Ÿš€ CLI Syntax + +### SSH Operations +```bash +# Connect to a host +ts-ssh hostname +ts-ssh user@hostname +ts-ssh user@hostname:2222 + +# Execute remote command +ts-ssh hostname uptime +ts-ssh user@hostname "ls -la /tmp" + +# Options +ts-ssh -v hostname # Verbose mode +ts-ssh -p 2222 hostname # Custom port +ts-ssh -l alice hostname # Specify username +ts-ssh -i ~/.ssh/custom_key hostname # Custom key +``` + +### SCP Operations +```bash +# Upload file +ts-ssh -scp file.txt hostname:/tmp/ + +# Download file +ts-ssh -scp hostname:/tmp/file.txt ./ + +# With specific port/user +ts-ssh -p 2222 -scp file.txt user@hostname:/tmp/ +``` + +### Help & Version +```bash +ts-ssh --help +ts-ssh --version +``` + +## โš ๏ธ Breaking Changes + +This is a **BREAKING** release. If you rely on removed features: + +### Migration Guidance + +**Multi-host operations** โ†’ Use shell loops: +```bash +# Old: ts-ssh --exec "uptime" --multi host1,host2,host3 +# New: +for host in host1 host2 host3; do + ts-ssh $host uptime +done +``` + +**Parallel execution** โ†’ Use GNU parallel or xargs: +```bash +# Parallel command execution +echo "host1 host2 host3" | xargs -P 3 -n 1 ts-ssh -c uptime + +# Or with GNU parallel +parallel ts-ssh {} uptime ::: host1 host2 host3 +``` + +**Internationalization** โ†’ English only +- Non-English users should stay on v0.5.0 or use terminal translation tools + +**Tmux integration** โ†’ Use tmux directly +- Launch tmux manually and run ts-ssh within it + +## ๐Ÿ“ฆ Downloads + +### Platform-specific Binaries + +- **Linux AMD64**: `ts-ssh-v0.7.0-linux-amd64` +- **Linux ARM64**: `ts-ssh-v0.7.0-linux-arm64` +- **macOS Intel**: `ts-ssh-v0.7.0-darwin-amd64` +- **macOS Apple Silicon**: `ts-ssh-v0.7.0-darwin-arm64` +- **Windows AMD64**: `ts-ssh-v0.7.0-windows-amd64.exe` +- **Windows ARM64**: `ts-ssh-v0.7.0-windows-arm64.exe` +- **FreeBSD AMD64**: `ts-ssh-v0.7.0-freebsd-amd64` +- **OpenBSD AMD64**: `ts-ssh-v0.7.0-openbsd-amd64` + +### All Platforms Archive + +- **All platforms**: `ts-ssh-v0.7.0-all-platforms.tar.gz` (127 MB) + +### Verification + +Each binary includes a `.sha256` checksum file. Verify downloads: + +```bash +sha256sum -c ts-ssh-v0.7.0-linux-amd64.sha256 +``` + +## ๐Ÿงช Testing + +- โœ… All tests passing (440+ tests) +- โœ… Cross-platform builds verified +- โœ… Security features validated +- โœ… Test coverage: 35.5% + +## ๐Ÿ—๏ธ Technical Details + +### Removed Dependencies +- `github.com/charmbracelet/fang` +- `github.com/charmbracelet/lipgloss` +- `github.com/charmbracelet/huh` +- `github.com/spf13/cobra` +- 11-language translation files +- TUI frameworks and dependencies + +### Code Structure (Simplified) +``` +ts-ssh/ +โ”œโ”€โ”€ main.go # ~457 lines - main CLI logic +โ”œโ”€โ”€ constants.go # ~52 lines +โ”œโ”€โ”€ main_test.go # ~256 lines +โ”œโ”€โ”€ main_e2e_test.go # ~410 lines +โ””โ”€โ”€ internal/ + โ”œโ”€โ”€ client/ # SSH and SCP clients + โ”œโ”€โ”€ config/ # Configuration + โ”œโ”€โ”€ crypto/pqc/ # Post-quantum cryptography + โ”œโ”€โ”€ errors/ # Error handling + โ”œโ”€โ”€ platform/ # Platform-specific code + โ””โ”€โ”€ security/ # Security validation +``` + +**Total**: ~4,656 lines (down from ~15,000) + +## ๐Ÿ” Security + +All security features maintained: +- Host key verification +- Secure TTY handling for passwords +- Input validation (SQL injection, command injection protection) +- Post-quantum cryptography support +- Secure file transfers with atomic operations + +## ๐Ÿ“ Commits + +- `56da8af` - chore: Remove dead code and cleanup codebase (#30) +- `a600998` - Simplify CLI to mimic standard SSH command (#29) +- `8f108b4` - Design Simplified SSH Command Implementation (#28) + +## ๐Ÿ™ Acknowledgments + +This simplification was driven by the principle that **tools should do one thing well**. By focusing on core SSH/SCP functionality over Tailscale, ts-ssh is now more maintainable, easier to understand, and more aligned with Unix philosophy. + +--- + +**Full Changelog**: https://github.com/derekg/ts-ssh/compare/v0.5.0...v0.7.0