Getting Started¶
This guide walks you through installing the LEADR CLI and setting up your first game and leaderboard.
Installation¶
Quick Install (macOS/Linux)¶
curl -sSL https://raw.githubusercontent.com/LEADR-official/leadr-cli-releases/main/install.sh | bash
Manual Download¶
Download binaries from the Releases page.
Verify Installation¶
After installation, verify the CLI is working:
leadr --version
Create Your Account¶
Register a new LEADR account using the interactive registration command:
leadr register
This will prompt you for:
- Email address - Your account email
- Display name - Your name as shown in the dashboard
- Account name - Your organization or studio name
- Account slug - A URL-friendly identifier (e.g.,
my-studio)
After registration, an API key will be generated and automatically saved to your local configuration.
Verify Your Setup¶
Check that your API key is configured correctly:
leadr auth admin status
View your account information:
leadr me
Create Your First Game¶
Create a game to start adding leaderboards:
leadr game create --name "My Awesome Game"
The command outputs the game details including its UUID. Save this ID for the next steps.
List your games to see all registered games:
leadr game list
Create Your First Leaderboard¶
Create a leaderboard for your game:
leadr board create \
--game-id <game-uuid> \
--name "High Scores" \
--short-code highscores \
--sort-direction desc
Options explained:
--game-id- The UUID of your game--name- Display name for the leaderboard--short-code- A unique identifier used in your game's API calls--sort-direction-descfor highest-first (default),ascfor lowest-first
Additional Leaderboard Options¶
leadr board create \
--game-id <game-uuid> \
--name "Speedrun Times" \
--short-code speedrun \
--sort-direction asc \
--unit "seconds" \
--keep-strategy best
--unit- Label for the score value (e.g., "points", "seconds", "kills")--keep-strategy- How to handle multiple submissions from the same player:all- Keep all scores (default)best- Keep only the best scorefirst- Keep only the first scorelast- Keep only the latest score
Submit a Test Score¶
Submit a score to your leaderboard:
leadr score create \
--board-id <board-uuid> \
--player-name "TestPlayer" \
--value 1000
With a formatted display value:
leadr score create \
--board-id <board-uuid> \
--player-name "SpeedRunner" \
--value 125.5 \
--value-display "2:05.500"
View Leaderboard Scores¶
List scores on a leaderboard:
leadr score list --board-id <board-uuid>
With pagination:
leadr score list --board-id <board-uuid> --limit 50
Fetch all pages:
leadr score list --board-id <board-uuid> --all
Next Steps¶
- Authentication Guide - Learn about API keys and authentication
- Command Reference - Explore all available commands
- Board Templates - Set up recurring leaderboards (daily, weekly, etc.)
- Anti-Cheat Flags - Manage flagged suspicious scores