Display version information about the tfcmd binary.
tfcmd versionShows the current version, build information, and git commit details.
$ tfcmd version
tfcmd version 1.2.3
Build date: 2023-12-17T10:30:00Z
Git commit: a1b2c3d4e5f6789abcdef1234567890abcdef12
Go version: go1.21.1- Version: Semantic version number (e.g., 1.2.3)
- Build date: When the binary was built
- Git commit: Full git commit hash of the source
- Go version: Go language version used to build
# Verify tfcmd is installed and working
tfcmd versionInclude version information when reporting issues:
$ tfcmd version
# Include this output in bug reportsCheck if you have the latest version:
# Compare your version with latest releases
tfcmd version
# Check: https://github.com/threefoldtech/grid_agent/releasesVersion information helps diagnose:
- Build-specific issues
- Feature availability
- Compatibility problems
The version follows semantic versioning:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Example: 1.2.3
1: Major version2: Minor version3: Patch version
To update to the latest version:
-
Check current version:
tfcmd version
-
Download latest release:
# Visit: https://github.com/threefoldtech/grid_agent/releases # Download the latest binary for your platform
-
Replace binary:
# Backup old version mv /usr/local/bin/tfcmd /usr/local/bin/tfcmd.backup # Install new version mv tfcmd /usr/local/bin/tfcmd chmod +x /usr/local/bin/tfcmd
-
Verify update:
tfcmd version
If you build from source, version information is automatically included:
# Clone repository
git clone https://github.com/threefoldtech/grid_agent.git
cd grid_agent/grid-cli
# Build
make build
# Check version
./tfcmd versionDevelopment builds may include:
- Pre-release tags (e.g.,
1.2.3-alpha.1) - Commit hash instead of version
- Build metadata
Example development output:
$ tfcmd version
tfcmd version 1.2.3-alpha.1+dev.a1b2c3d
Build date: 2023-12-17T10:30:00Z
Git commit: a1b2c3d4e5f6789abcdef1234567890abcdef12
Go version: go1.21.1$ tfcmd version
Error: version information not availableSolutions:
- Binary may be corrupted - reinstall
- Build may not include version info - rebuild with proper flags
If you have an old version and need features:
- Check current version:
tfcmd version - Download latest release
- Install as shown in update process
Multiple tfcmd installations can cause conflicts:
# Check which tfcmd is being used
which tfcmd
# Expected: /usr/local/bin/tfcmd
# Check all versions
/usrusr/local/bin/tfcmd version
~/bin/tfcmd versionUse version information in scripts for compatibility checks:
#!/bin/bash
# Check tfcmd version compatibility
REQUIRED_VERSION="1.2.0"
CURRENT_VERSION=$(tfcmd version | head -1 | cut -d' ' -f3)
if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$CURRENT_VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
echo "Error: tfcmd version $CURRENT_VERSION is too old. Required: $REQUIRED_VERSION or newer"
exit 1
fi
echo "tfcmd version $CURRENT_VERSION is compatible"Version information corresponds to official releases:
- Main releases: Stable features and bug fixes
- Pre-releases: Alpha/beta testing versions
- Development builds: Latest features (may be unstable)
Check the GitHub releases for:
- Release notes
- Breaking changes
- New features
- Bug fixes
If version-related issues occur:
- Verify you have the latest version
- Check release notes for breaking changes
- Report issues with version information included
- Consider building from source for latest features
For the most up-to-date information, always check the official ThreeFold documentation and GitHub releases.