docs
Installation

Installation

Prerequisites

Before installing GSwarm, ensure you have the following prerequisites:

  • Go 1.24+ (for building the Telegram monitoring service)
  • Network connectivity for blockchain queries and Telegram API
  • Telegram Bot Token (from @BotFather)
  • Telegram Chat ID (your chat ID or group chat ID)

System Requirements

Operating Systems

  • macOS 10.15+ (Catalina and later)
  • Linux (Ubuntu 18.04+, CentOS 7+, Debian 9+)
  • Windows 10+ (with WSL2 recommended)

Hardware Requirements

  • RAM: 512MB minimum, 1GB recommended
  • Storage: 100MB free space
  • Network: Stable internet connection for blockchain queries and Telegram API

Installation Methods

Option 1: Install with Go (Recommended)

The easiest way to install GSwarm is using Go's built-in install command:

go install github.com/Deep-Commit/gswarm/cmd/gswarm@latest

This command will:

  • Download the latest version of GSwarm
  • Compile it for your system
  • Install the gswarm binary to your Go bin directory

Verify the installation:

gswarm --version

You should see output similar to:

gswarm version 1.0.0

Option 2: Build from Source

If you prefer to build from source or need a specific version:

# Clone the repository
git clone https://github.com/Deep-Commit/gswarm.git
cd gswarm
 
# Build the application
make build
 
# Install to your system
make install

Alternative build commands:

# Build for current platform
go build -o gswarm cmd/gswarm/main.go
 
# Build for all platforms
make build-all
 
# Build with specific version
go build -ldflags="-X main.version=1.0.0" -o gswarm cmd/gswarm/main.go

PATH Configuration

After installation, you need to ensure the gswarm command is available in your PATH.

Find Your Go Bin Directory

go env GOPATH

This will show you where Go installed the binary. The gswarm executable will be in the bin subdirectory.

Add to PATH

For bash/zsh:

export PATH=$PATH:$(go env GOPATH)/bin

For fish:

set -gx PATH $PATH (go env GOPATH)/bin

For Windows (PowerShell):

$env:PATH += ";$(go env GOPATH)\bin"

Make PATH Permanent

For bash/zsh (add to ~/.bashrc or ~/.zshrc):

echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
source ~/.bashrc

For fish (add to ~/.config/fish/config.fish):

echo 'set -gx PATH $PATH (go env GOPATH)/bin' >> ~/.config/fish/config.fish

For Windows (add to System Environment Variables):

  1. Open System Properties → Advanced → Environment Variables
  2. Edit the PATH variable
  3. Add the Go bin directory path

Common PATH locations

If go env GOPATH doesn't work, try these common locations:

  • macOS/Linux: $HOME/go/bin
  • Windows: %USERPROFILE%\go\bin

Verify Go installation

If you're having trouble, verify Go is properly installed:

go version
go env GOPATH
go env GOROOT

Development Setup

If you're developing GSwarm or want to build specific versions:

git clone https://github.com/Deep-Commit/gswarm.git
cd gswarm
 
# Build the application
make build
 
# Build all platforms
make build-all
 
# Install to your system
make install
 
# Run tests
make test
 
# Run tests with coverage
make test-coverage
 
# Format code
make fmt
 
# Lint code
make lint

Troubleshooting Installation

Common Issues

"gswarm command not found"

  • Ensure Go 1.24+ is installed and $GOPATH/bin is in your PATH
  • Reinstall with: go install github.com/Deep-Commit/gswarm/cmd/gswarm@latest
  • Follow the PATH configuration instructions above

"Go version too old"

"Permission denied"

  • Make sure all files are executable as needed
  • Ensure proper file permissions

"Network connectivity issues"

  • Check your internet connection
  • Verify you can access GitHub and Go modules
  • Check firewall settings if applicable

PATH Configuration

If you're having trouble with the gswarm command not being found, you may need to add Go's bin directory to your PATH:

For bash/zsh:

export PATH=$PATH:$(go env GOPATH)/bin

For fish:

set -gx PATH $PATH (go env GOPATH)/bin

Add this to your shell configuration file (.bashrc, .zshrc, config.fish) to make it permanent.

Next Steps

Once GSwarm is installed, you can:

  1. Run gswarm to start the Telegram monitoring service
  2. Follow the interactive setup prompts
  3. Check out the Getting Started guide for detailed usage instructions
  4. Read the Telegram Monitoring documentation for setup details

Good luck in the Swarm! GSwarm!