Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- `--help` and the no-argument usage screen now print the build version (`Version: <version>`)

## [0.0.10] - 2026-06-09

### Added
Expand Down
2 changes: 2 additions & 0 deletions cmd/sshx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
var Version = "dev"

func main() {
app.Version = Version

if handleVersionFlag(os.Args) {
os.Exit(0)
}
Expand Down
7 changes: 5 additions & 2 deletions internal/app/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package app

import "fmt"

// Version is the sshx build version, set by the main package at startup
// (injected via -ldflags). Defaults to "dev" for go test / go run builds.
var Version = "dev"

// PrintUsage prints the usage information for the sshx command.
func PrintUsage() {
fmt.Printf("\nSSH & SFTP Remote Tool with Password Manager (Cross-Platform)\nVersion: %s\n", Version)
fmt.Println(`
SSH & SFTP Remote Tool with Password Manager (Cross-Platform)

Usage:
sshx -h=<host> [options] <command> # SSH mode
sshx -h=<host> [options] --upload=<file> # SFTP upload
Expand Down
Loading