Guepard / Features / Guepard CLI

Guepard CLI Commands

Complete Command Reference for Database Management

The Guepard CLI (guepard) provides comprehensive database management capabilities through a Git-like interface. This reference covers all available commands, their options, and practical examples.

πŸš€ Getting Started

Installation & Setup

Before using the CLI, you need to install it on your system. See the Installation Guide for detailed instructions for Windows, macOS, and Linux.

Essential Commands Overview

The CLI follows a Git-like structure with these main command categories:

  • Core Commands: deploy, commit, branch, checkout, log
  • Management Commands: compute, list, usage
  • Authentication: login, logout
  • Configuration: config

Core Commands

guepard deploy β€” πŸš€ Database Deployment Management

Purpose: Create, manage, and configure database instances with full lifecycle control.

Syntax

guepard deploy [OPTIONS]

Options

OptionShortDescriptionRequired
--database-provider-pDatabase type: PostgreSQL, MySQL, MongoDBFor creation
--database-version-vDatabase version (e.g., 16 for PostgreSQL)For creation
--region-rRegion: us-west, us-east, eu-west, asia-pacificFor creation
--instance-type-iType: REPOSITORY (for versioning) or F2 (for compute)For creation
--datacenter-dCloud provider: aws, gcp, azureFor creation
--repository-name-nRepository name (auto-generated if not provided)For creation
--database-password-wDatabase passwordFor creation
--deployment-id-xDeployment IDFor get/update/delete
--user-uDatabase username (default: guepard)No
--yes-ySkip confirmation promptsNo
--performance-profile-fPerformance profile: gp.g1.xsmall, gp.g1.small, etcNo
--interactive-IInteractive mode - guided setupNo

Examples

Create a new deployment:

guepard deploy \
  --database-provider PostgreSQL \
  --database-version 16 \
  --region us-west \
  --instance-type REPOSITORY \
  --datacenter aws \
  --repository-name myapp \
  --database-password secret123

Interactive deployment (recommended for beginners):

guepard deploy --interactive

Get deployment details:

guepard deploy --deployment-id 12345678-1234-1234-1234-123456789abc

Update deployment:

guepard deploy \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --repository-name new-name

Delete deployment:

guepard deploy \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --yes

guepard commit β€” πŸ“Έ Create Database Snapshots

Purpose: Create snapshots (commits) of your database state for version control and recovery.

Syntax

guepard commit --message <message> --deployment-id <id> --branch-id <id>

Options

OptionShortDescriptionRequired
--message-mCommit message describing the changesYes
--deployment-id-xDeployment IDYes
--branch-id-bBranch ID to commit toYes

Examples

Create a snapshot:

guepard commit \
  --message "Add user authentication tables" \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --branch-id a7d373a3-4244-47b7-aacb-ad366f2520f6

Create multiple snapshots:

# Initial setup
guepard commit -m "Initial schema" -x <deployment_id> -b <branch_id>

# Add features
guepard commit -m "Add user profiles" -x <deployment_id> -b <branch_id>
guepard commit -m "Add payment tables" -x <deployment_id> -b <branch_id>

guepard branch β€” 🌿 Branch Management

Purpose: List and create branches for isolated development and testing environments.

Syntax

guepard branch [OPTIONS] [NAME]

Options

OptionShortDescriptionRequired
--deployment-id-xDeployment IDFor listing/creating
--snapshot-id-sSnapshot ID to branch fromFor creation
--name-nBranch nameFor creation
--checkout-kCheckout after creationNo
--ephemeral-eCreate ephemeral branchNo
--source-branch-id-bSource branch IDNo
--discard-changes-dDiscard changesNo

Examples

List branches:

guepard branch --deployment-id 12345678-1234-1234-1234-123456789abc

Create a new branch:

guepard branch \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --snapshot-id abc12345-6789-1234-5678-123456789abc \
  --name feature-auth \
  --checkout \
  --ephemeral

Git-like usage (shows helpful messages):

guepard branch feature-auth  # Shows helpful message
guepard branch              # Shows helpful message

guepard checkout β€” πŸ”„ Switch Branches

Purpose: Switch between branches or checkout specific snapshots.

Syntax

guepard checkout [OPTIONS] <target>

Options

OptionShortDescriptionRequired
--deployment-id-xDeployment IDYes
--branch-id-cBranch ID to checkoutFor branch checkout
--snapshot-id-sSnapshot ID to checkoutFor snapshot checkout
--checkout-kPerform checkoutNo
--discard-changes-dDiscard changesNo

Examples

Checkout a branch:

guepard checkout \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --branch-id def67890-1234-5678-9012-345678901234

List available branches:

guepard checkout --deployment-id 12345678-1234-1234-1234-123456789abc

Git-like usage (shows helpful message):

guepard checkout develop  # Shows helpful message

guepard log β€” πŸ“‹ View Deployment Logs

Purpose: View and monitor deployment logs with filtering and real-time streaming.

Syntax

guepard log --deployment-id <id> [OPTIONS]

Options

OptionShortDescriptionRequired
--deployment-id-xDeployment IDYes
--lines-nNumber of lines to show (default: 50)No
--follow-fFollow logs in real-timeNo
--stdout-onlyShow only stdout logsNo
--stderr-onlyShow only stderr logsNo
--timestamps-tShow timestampsNo
--sinceFilter logs from dateNo
--untilFilter logs until dateNo

Examples

View recent logs:

guepard log --deployment-id 12345678-1234-1234-1234-123456789abc

Follow logs in real-time:

guepard log --deployment-id 12345678-1234-1234-1234-123456789abc --follow

View logs with timestamps:

guepard log --deployment-id 12345678-1234-1234-1234-123456789abc --timestamps

Filter logs by date:

guepard log \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --since "2025-01-08" \
  --until "2025-01-09"

Management Commands

guepard compute β€” πŸ–₯️ Compute Instance Management

Purpose: Control compute resources for deployments with start/stop/status operations.

Syntax

guepard compute <action> --deployment-id <id>

Actions

  • status - Get compute status
  • start - Start compute instance
  • stop - Stop compute instance
  • restart - Restart compute instance
  • logs - View compute logs
  • list - List compute details (default)

Examples

Check compute status:

guepard compute status --deployment-id 12345678-1234-1234-1234-123456789abc

Start compute:

guepard compute start --deployment-id 12345678-1234-1234-1234-123456789abc

Stop compute:

guepard compute stop --deployment-id 12345678-1234-1234-1234-123456789abc

View compute logs:

guepard compute logs --deployment-id 12345678-1234-1234-1234-123456789abc

List compute details:

guepard compute list --deployment-id 12345678-1234-1234-1234-123456789abc

guepard list β€” πŸ“‹ List Resources

Purpose: List deployments, branches, commits, and other resources with customizable columns.

Syntax

guepard list <resource> [OPTIONS]

Resources

  • deployments - List all deployments (default)
  • branches - List branches for a deployment
  • commits - List commits for a deployment

Options

OptionShortDescriptionRequired
--deployment-id-xDeployment IDFor branches/commits
--columns-cColumns to display (comma-separated)No
--graph-gShow git graph styleFor commits
--all-aShow all commits including AUTO SNAPsFor commits
--limit-lLimit number of resultsNo

Examples

List all deployments:

guepard list deployments

List deployments with specific columns:

guepard list deployments --columns id,name,status,fqdn

List branches:

guepard list branches --deployment-id 12345678-1234-1234-1234-123456789abc

List commits with git graph:

guepard list commits \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --graph

Show all commits including AUTO SNAPs:

guepard list commits \
  --deployment-id 12345678-1234-1234-1234-123456789abc \
  --all

guepard usage β€” πŸ“Š Usage Information

Purpose: View your account usage and quotas.

Syntax

guepard usage

Example

guepard usage

Sample Output:

βœ… Usage Summary:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ Resource    β”‚ Quota β”‚ Used β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚ Deployments β”‚ 10    β”‚ 3    β”‚
β”‚ Snapshots   β”‚ 100   β”‚ 15   β”‚
β”‚ Clones      β”‚ 50    β”‚ 8    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

Authentication Commands

guepard login β€” πŸ” Authentication

Purpose: Authenticate with your Guepard account using interactive or direct token methods.

Syntax

guepard login [OPTIONS]

Options

OptionShortDescriptionRequired
--code-cDirect access token inputNo

Examples

Interactive login (recommended):

guepard login

Direct token login:

guepard login --code your-access-token-here

guepard logout β€” πŸšͺ Sign Out

Purpose: Log out and clear stored credentials.

Syntax

guepard logout

Example

guepard logout

Configuration Commands

guepard config β€” βš™οΈ Configuration Management

Purpose: Configure API endpoints and other CLI settings.

Syntax

guepard config [OPTIONS]

Options

OptionShortDescriptionRequired
--getGet current configurationNo
--api-url-aSet API endpoint URLNo
--showShow current configurationNo

Examples

Show current configuration:

guepard config --show

Set API endpoint:

guepard config --api-url https://api.guepard.run

Command Aliases and Shortcuts

Common Aliases

  • Use -x instead of --deployment-id
  • Use -m instead of --message
  • Use -n instead of --name
  • Use -c instead of --code

Git-like Shortcuts

Many commands support Git-like syntax for familiarity:

# These show helpful messages
guepard branch develop
guepard checkout develop
guepard commit -m "message"

Output Formats

Beautiful Tables

All commands use colorized, rounded tables for better readability:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Deployment ID β”‚ Name    β”‚ Repository β”‚ Provider β”‚ Version β”‚ Status β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 12345678...   β”‚ myapp   β”‚ myapp      β”‚ PostgreSQLβ”‚ 16     β”‚ active β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Status Indicators

  • βœ… Green: Success, active, healthy
  • ❌ Red: Error, failed, unhealthy
  • ℹ️ Blue: Information, neutral
  • πŸ’‘ Yellow: Tips, warnings
  • πŸ† Cyan: Guepard branding

Best Practices

Command Organization

  1. Use interactive mode for complex operations (--interactive)
  2. Store deployment IDs in environment variables
  3. Use descriptive commit messages for better tracking
  4. Create branches for experiments using ephemeral branches
  5. Monitor usage regularly with guepard usage

Error Handling

  • All commands provide clear error messages
  • Use --help for command-specific help
  • Check authentication with guepard login
  • Verify deployment IDs with guepard list deployments

Workflow Examples

Development Workflow:

# 1. Create a feature branch
guepard branch -x <deployment_id> -s <snapshot_id> -n feature-auth -k -e

# 2. Make changes to your database (via your application)
# 3. Create a snapshot
guepard commit -m "Add user authentication tables" -x <deployment_id> -b <branch_id>

# 4. Switch back to main
guepard checkout -x <deployment_id> -c <main_branch_id>

Production Deployment:

# 1. Create production branch from stable snapshot
guepard branch -x <deployment_id> -s <stable_snapshot_id> -n production

# 2. Deploy to production environment
guepard compute start -x <deployment_id>

# 3. Monitor logs
guepard log -x <deployment_id> --follow

Previous
CLI Installation