A comprehensive command-line interface tool for managing TigerGraph Cloud instances and server operations. TigerGraph CLI provides seamless integration with TigerGraph Cloud services and local server management capabilities.
- Authentication: Secure login to TigerGraph Cloud with credential management
- Instance Control: Start, stop, terminate, and archive cloud instances
- Monitoring: List and monitor all cloud instances with status tracking
- Configuration: Save and manage cloud credentials
- GSQL Terminal: Interactive GSQL command execution with session management
- Service Management: Start and stop TigerGraph services (GPE/GSE/RESTPP)
- Backup Operations: Create comprehensive backups of TigerGraph databases
- Multi-Version Support: Compatible with TigerGraph versions 3.0.0 through 3.6.2
- Server Aliases: Create and manage server connection profiles
- Credential Storage: Secure storage of authentication credentials
- Default Settings: Set default configurations for streamlined operations
- Cross-Platform: Support for Windows, macOS, and Linux
- Go 1.24 or higher
- TigerGraph Cloud account (for cloud operations)
- TigerGraph server access (for server operations)
# Clone the repository
git clone https://github.com/zrougamed/tgCli.git
cd tgCli
# Build the binary
make build
# Install globally (optional)
make install
Pre-built binaries are available for multiple platforms:
- Linux (AMD64/ARM64)
- macOS (Intel/Apple Silicon)
- Windows (AMD64/ARM64)
# Display help
tg --help
# Check version
tg version
# Login to TigerGraph Cloud
tg cloud login -e your@email.com -p yourpassword
# List cloud instances
tg cloud list
# Add server configuration
tg conf add -a myserver -u tigergraph -p mypassword --host http://localhost
# Start GSQL session
tg server gsql -a myserver
# Login with interactive prompts
tg cloud login
# Login with credentials and save
tg cloud login -e user@domain.com -p password -s y
# List active instances only
tg cloud list -a y
# Start a cloud instance
tg cloud start -i INSTANCE_ID
# Stop a cloud instance
tg cloud stop -i INSTANCE_ID
# Terminate a cloud instance
tg cloud terminate -i INSTANCE_ID
# Archive a cloud instance
tg cloud archive -i INSTANCE_ID
# Connect to GSQL using server alias
tg server gsql -a myserver
# Connect to GSQL with direct credentials
tg server gsql -u username -p password --host http://server:14240
# Create database backup
tg server backup -a myserver -t ALL
# Backup schema only
tg server backup -a myserver -t SCHEMA
# Backup data only
tg server backup -a myserver -t DATA
# Start TigerGraph services
tg server services --ops start
# Stop TigerGraph services
tg server services --ops stop
# Add new server configuration
tg conf add -a production \
-u tigergraph \
-p mypassword \
--host https://mycluster.i.tgcloud.io \
--gsPort 14240 \
--restPort 9000 \
-d y
# List all configurations
tg conf list
# Delete server configuration
tg conf delete -a myserver
# Configure TigerGraph Cloud credentials
tg conf tgcloud -e user@domain.com -p password
TigerGraph CLI stores configuration in ~/.tgcli/config.yml
and credentials in ~/.tgcli/creds.bank
.
tgcloud:
user: "your@email.com"
password: "encrypted_password"
machines:
production:
host: "https://cluster.i.tgcloud.io"
user: "tigergraph"
password: "encrypted_password"
gsPort: "14240"
restPort: "9000"
development:
host: "http://localhost"
user: "tigergraph"
password: "tigergraph"
gsPort: "14240"
restPort: "9000"
default: "production"
-d, --debug
: Enable debug mode for verbose output
tg cloud login
: Authenticate with TigerGraph Cloudtg cloud list
: List all cloud instancestg cloud start
: Start a cloud instancetg cloud stop
: Stop a cloud instancetg cloud terminate
: Terminate a cloud instancetg cloud archive
: Archive a cloud instance
tg server gsql
: Launch interactive GSQL terminaltg server backup
: Create database backupstg server services
: Manage TigerGraph services
tg conf add
: Add server configurationtg conf delete
: Remove server configurationtg conf list
: Display all configurationstg conf tgcloud
: Configure cloud credentials
# Build for current platform
make build
# Build for all platforms
make build-all
# Create release packages
make package
# Run tests
make test
# Run tests with coverage
make test-coverage
# Format code
make fmt
# Run linter
make lint
# Show all available targets
make help
tgCli/
├── cmd/
│ ├── main.go # Application entry point
│ └── main_test.go # Main application tests
├── internal/
│ ├── cloud/
│ │ ├── cloud.go # Cloud operations
│ │ └── cloud_test.go # Cloud operations tests
│ ├── config/
│ │ ├── config.go # Configuration management
│ │ └── config_test.go # Configuration tests
│ ├── helpers/
│ │ ├── helpers.go # Utility functions
│ │ └── helpers_test.go # Helper function tests
│ ├── models/
│ │ ├── models.go # Data structures
│ │ └── models_test.go # Model tests
│ └── server/
│ ├── server.go # Server operations
│ └── server_test.go # Server operation tests
├── pkg/
│ └── constants/
│ ├── constants.go # Application constants
│ └── constants_test.go # Constants tests
├── LICENSE # Software license
├── Makefile # Build automation with comprehensive targets
├── README.md # Project documentation
├── go.mod # Go module definition
└── go.sum # Dependency checksums
- TigerGraph 3.0.0 through 3.6.2
- TigerGraph Cloud (all current versions)
- Linux (AMD64, ARM64)
- macOS (Intel, Apple Silicon)
- Windows (AMD64, ARM64)
- Credentials are stored securely with appropriate file permissions
- Authentication tokens are managed automatically
- Password input uses secure terminal input methods
- Configuration files use restricted access permissions (0600)
Authentication Failed
# Re-login to refresh credentials
tg cloud login
Connection Timeout
# Check server connectivity and ports
tg server gsql --host http://your-server:14240
Configuration Not Found
# List available configurations
tg conf list
# Add new configuration
tg conf add -a myserver
This project uses a restrictive license. Please contact the author for contribution guidelines and licensing terms.
This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited. See LICENSE file for complete terms.
- Documentation: TigerGraph Documentation
- Community: TigerGraph Community
- Discord: TigerGraph Discord
Mohamed Zrouga
- Website: zrouga.email
- Linkedin: linkedin.com/in/zrouga-mohamed/
- GitHub: @zrougamed
- Repository: tgCli
Current Version: 0.1.1
Copyright (c) 2025 Mohamed Zrouga. All rights reserved.