Skip to content

wyre-technology/liongard-cli

Repository files navigation

Liongard CLI

Command-line interface for the Liongard API.

Installation

npm install -g @wyre-technology/liongard-cli

Configuration

Set the following environment variables:

export LIONGARD_API_KEY=your-api-key
export LIONGARD_INSTANCE=yourcompany  # Your Liongard instance subdomain

Usage

Environments

# List environments
liongard environments list
liongard environments list --format table
liongard environments list --page 1 --page-size 100

# Get environment by ID
liongard environments get 123

# Create environment
liongard environments create --name "Acme Corp" --description "Acme Corporation"

# Get environment count
liongard environments count

# Get related entities
liongard environments related 123

Agents

# List agents
liongard agents list

# Delete agents
liongard agents delete 123 456 789

# Generate agent installer
liongard agents installer

Inspections

# List inspectors (inspection types)
liongard inspections list-inspectors

# List launchpoints (configured inspection instances)
liongard inspections list-launchpoints

# Create launchpoint
liongard inspections create-launchpoint \
  --name "My Inspection" \
  --inspector-id 10 \
  --environment-id 123 \
  --agent-id 456

# Run inspection
liongard inspections run 789

Systems

# List systems
liongard systems list

# Get system by ID
liongard systems get 123

Detections

# List detections
liongard detections list

Alerts

# List alerts
liongard alerts list

# Get alert by ID
liongard alerts get 123

Metrics

# List available metrics
liongard metrics list

# Evaluate metrics
liongard metrics evaluate

# Evaluate metrics with filters
liongard metrics evaluate --metric-ids 1 2 3 --environment-ids 10 20

# Evaluate metrics per system
liongard metrics evaluate-per-system

Timeline

# List timeline events
liongard timeline list

Inventory

# List identities (users, accounts)
liongard inventory list-identities

# Get identity by ID
liongard inventory get-identity 123

# List device profiles
liongard inventory list-devices

# Get device profile by ID
liongard inventory get-device 456

Output Formats

By default, all commands output JSON. Use the --format table flag for tabular output:

liongard environments list --format table

Global Options

  • -f, --format <format> - Output format (json|table), default: json
  • -p, --page <number> - Page number (1-indexed), default: 1
  • -s, --page-size <number> - Number of items per page, default: 50
  • -h, --help - Display help for command
  • -V, --version - Output the version number

Development

# Clone the repository
git clone https://github.com/wyre-technology/liongard-cli.git
cd liongard-cli

# Install dependencies
npm install

# Build
npm run build

# Run locally
node dist/index.js

Contributing

See CONTRIBUTING.md for contribution guidelines.

License

MIT License - see LICENSE for details.

Links

About

CLI for Liongard — manage agents, alerts, environments, inspections, inventory, and metrics from the terminal

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors