A beautiful terminal user interface (TUI) for viewing FACEIT player profiles and match history, built with Go and Bubble Tea.
- ๐ Search for players by nickname
- ๐ค View player profiles with CS2 stats (ELO, skill level, region)
- ๐ Browse recent match history with detailed statistics and pagination
- ๐ View comprehensive statistics over last 20 matches
- ๐ Detailed match analysis with advanced metrics
- ๐ฎ Search matches by ID with full team statistics
- ๐ View detailed match statistics from player profile
- โ๏ธ Compare your stats with friends over last 20 matches
- ๐ Switch between players without restarting
- ๐พ Remember default player via environment variable
- ๐ Centralized logging with configurable levels
- ๐ Kafka integration for log aggregation (optional)
- โก Fast and responsive with API caching
# Install the latest version
go install github.com/armitageee/faceit-cli@latest
# Initialize configuration
faceit-cli init
# Edit the config file and add your API key
# ~/.config/faceit-cli/config.yml
# Run the application
faceit-cliDownload the latest release from the Releases page and extract the binary for your platform.
# Clone the repository
git clone https://github.com/armitageee/faceit-cli.git
cd faceit-cli
# Set up environment
cp .env.example .env
# Edit .env and add your FACEIT_API_KEY
# Build and run with Docker
make docker-build
make docker-run# Clone the repository
git clone https://github.com/armitageee/faceit-cli.git
cd faceit-cli
# Build the application
make build
# Or build for all platforms
make build-all# Install dependencies
make deps
# Run the application
make run
# Run with caching enabled
make run-cache
# Run with all optimizations
make run-optimized
# Run with Kafka logging
make run-kafka
# Run in production mode
make run-productionThe application uses a flexible configuration system with the following priority order:
- Environment Variables (highest priority)
- YAML Configuration (
~/.config/faceit-cli/config.yml) - Default Values (lowest priority)
The application supports YAML configuration files for better user experience:
# Initialize default config
faceit-cli init
# Edit the config file
# ~/.config/faceit-cli/config.ymlEnvironment variables always take priority over YAML configuration. This is useful for:
- Production deployments
- CI/CD pipelines
- Temporary overrides
- Security-sensitive values
Example:
# YAML config has: log_level: "info", cache_enabled: true
# Environment variable overrides it:
export LOG_LEVEL="debug"
export CACHE_ENABLED="false"
# Result: log_level="debug", cache_enabled=falseYou can use environment variables or a .env file in the project root:
# Required
FACEIT_API_KEY=your_api_key_here
# Optional - Player Settings
FACEIT_DEFAULT_PLAYER=your_nickname_here
COMPARISON_MATCHES=20
MATCHES_PER_PAGE=10
MAX_MATCHES_TO_LOAD=100
# Optional - Logging
LOG_LEVEL=info
LOG_TO_STDOUT=true
# Optional - Caching
CACHE_ENABLED=true
CACHE_TTL=30
# Optional - Kafka Integration
KAFKA_ENABLED=false
KAFKA_BROKERS=localhost:9092
KAFKA_TOPIC=faceit-cli-logs
# Optional - Production Mode
PRODUCTION_MODE=falseRequired:
FACEIT_API_KEY(required): Your FACEIT API key
Player Settings:
FACEIT_DEFAULT_PLAYER(optional): Default player nickname to load on startupCOMPARISON_MATCHES(optional): Number of matches to use for player comparison (default: 20)MATCHES_PER_PAGE(optional): Matches per page (default: 10)MAX_MATCHES_TO_LOAD(optional): Maximum matches to load (default: 100)
Match Search:
- Match search supports both typing and pasting match IDs
- Clipboard paste works with
Ctrl+V,Cmd+V,F2, orPkeys - Cross-platform clipboard support (macOS, Linux, Windows)
Logging:
LOG_LEVEL(optional): Log level - debug/info/warn/error (default: info)LOG_TO_STDOUT(optional): Log to stdout - true/false (default: true)
Caching:
CACHE_ENABLED(optional): Enable API response caching - true/false (default: false)CACHE_TTL(optional): Cache TTL in minutes (default: 30)
Kafka Integration:
KAFKA_ENABLED(optional): Enable Kafka logging - true/false (default: false)KAFKA_BROKERS(optional): Kafka brokers - comma-separated (default: localhost:9092)KAFKA_TOPIC(optional): Kafka topic for logs (default: faceit-cli-logs)
Production Mode:
PRODUCTION_MODE(optional): Enable production mode - true/false (default: false)
- Search for a player: Enter a nickname and press Enter
- View profile: See player stats, ELO, skill level, and lifetime statistics
- Browse matches: Press
Mto view recent matches with pagination - View statistics: Press
Sto see comprehensive stats over last 20 matches - Compare players: Press
Cto compare with a friend - Switch players: Press
Pto switch to another player - Search matches by ID: Press
2from main menu to search for a specific match - View match details: Press
Enteron any match for detailed player analysis - View match statistics: Press
Don any match to see full team statistics
โโorKJ- Navigate up/downโโorHL- Change pages (in matches view)Esc- Go backCtrl+CorQ- Quit
Enter- View detailed player analysis for selected matchD- View full team statistics for selected matchCtrl+V,Cmd+V,F2,P- Paste match ID from clipboard
1- Search player by nickname2- Search match by ID
The application now supports searching for specific matches by their FACEIT match ID:
- From main menu: Press
2to access match search - Enter match ID: Type or paste the match ID (e.g.,
1-e2e2f23c-31f7-48d1-baec-025077812cfa) - Paste support: Use
Ctrl+V,Cmd+V,F2, orPto paste from clipboard - View results: See complete match statistics with all players
When viewing match statistics, you'll see:
- Match Information: ID, map, final score, status
- Winner: Clearly displayed winning team
- Team Statistics: Complete player stats for both teams
- Player Details: K/D/A, HS%, ADR for each player
- Navigation: Easy return to search with
EscorQ
From the player profile matches view:
- Enter: View detailed analysis of the selected match (player-focused)
- D: View complete team statistics for the selected match
- Two modes: Switch between player analysis and team overview
Reduce API calls and improve response times with intelligent caching:
- In-memory caching with configurable TTL
- Automatic expiration of stale data
- Background cleanup of expired entries
Smart loading strategy for optimal user experience:
- Initial Load - First 20 matches load quickly (30s timeout)
- Background Loading - Remaining matches load in background (120s timeout)
- Seamless Updates - UI updates automatically when more data arrives
Optional centralized logging with Kafka:
# Start Kafka infrastructure
make kafka-up
# Run with Kafka logging
make run-kafka
# View Kafka UI
make kafka-ui
# Stop Kafka infrastructure
make kafka-downmake help # Show all available commands
make fmt # Format code
make clean # Clean build artifacts
make deps # Install dependencies
make install-tools # Install development tools
make run # Build and run the application
make run-cache # Run with caching enabled
make run-optimized # Run with all optimizations
make test # Run tests
make lint # Run linter
make build # Build binary
make build-all # Build for all platformsโโโ internal/
โ โโโ app/ # Application logic
โ โโโ cache/ # API response caching
โ โโโ config/ # Configuration management
โ โโโ entity/ # Data models
โ โโโ logger/ # Centralized logging
โ โโโ repository/ # API client
โ โโโ ui/ # TUI components
โโโ assets/ # Demo GIF and other assets
โโโ .github/workflows/ # CI/CD pipelines
โโโ main.go # Application entry point
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test - Run linter:
make lint - Submit a pull request
The application includes full Docker support with multi-stage builds and automatic image publishing.
# Build Docker image
make docker-build
# Run in Docker
make docker-run- Multi-stage builds for optimized image size (~20MB)
- Distroless base image for security
- Multi-architecture support (amd64, arm64)
- Automatic publishing to GitHub Container Registry
- Environment file support for easy configuration
For detailed Docker documentation, see DOCKER.md.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Bubble Tea TUI framework
- Uses Lip Gloss for styling
- Powered by FACEIT Data API
