Documentation

CLI Reference

Command-line interface for TigerIdentity. Manage identities, policies, and access controls directly from your terminal.

Installation

npm

npm install -g @tigeridentity/cli

Homebrew (macOS)

brew tap tigeridentity/tap
brew install tiger

Binary Download

curl -L https://cli.tigeridentity.com/install.sh | sh

Verify installation: Run tiger --version to confirm the CLI is installed correctly.

Getting Started

Configure the CLI with your API credentials:

# Login with API key
tiger login --api-key YOUR_API_KEY

# Or configure interactively
tiger configure

# Verify authentication
tiger whoami

Multiple Environments

Manage multiple environments using contexts:

# Create contexts for different environments
tiger context create production --api-key prod_key_xxx
tiger context create staging --api-key staging_key_xxx

# Switch between contexts
tiger context set production

# View current context
tiger context current

Command Reference

Authentication

Manage authentication and sessions

tiger login

Authenticate with TigerIdentity

tiger login --api-key YOUR_API_KEY
tiger logout

Log out and clear credentials

tiger logout
tiger whoami

Display current user and organization

tiger whoami

Principals

Manage identities and entities

tiger principals list

List all principals

tiger principals list --type user --limit 50
tiger principals get

Get principal details

tiger principals get user-123
tiger principals create

Create a new principal

tiger principals create --type user --id alice --file principal.yaml
tiger principals delete

Delete a principal

tiger principals delete user-123

Policies

Manage access policies

tiger policies list

List all policies

tiger policies list --status active
tiger policies get

Get policy details

tiger policies get policy-123
tiger policies create

Create a new policy

tiger policies create --file policy.yaml
tiger policies update

Update an existing policy

tiger policies update policy-123 --file policy.yaml
tiger policies delete

Delete a policy

tiger policies delete policy-123
tiger policies simulate

Simulate policy evaluation

tiger policies simulate policy-123 --principal user-alice --action read --resource doc:123

Connectors

Manage data connectors

tiger connectors list

List all connectors

tiger connectors list
tiger connectors create

Create a new connector

tiger connectors create --type okta --file connector.yaml
tiger connectors status

Check connector status

tiger connectors status connector-123
tiger connectors sync

Trigger connector sync

tiger connectors sync connector-123

Decisions

Evaluate access decisions

tiger decisions evaluate

Evaluate an access request

tiger decisions evaluate --principal user-123 --action read --resource doc:456

Configuration

Manage CLI configuration

tiger configure

Configure CLI settings

tiger configure --api-url https://api.tigeridentity.com
tiger context

Manage configuration contexts

tiger context set production

Advanced Usage

Creating Policies from YAML

Define policies in YAML files for version control and easy management:

# policy.yaml
name: business-hours-access
description: Allow access only during business hours
rules:
  - effect: allow
    conditions:
      - field: context.time.hour
        operator: between
        value: [9, 17]
      - field: context.time.weekday
        operator: in
        value: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']
resources:
  - project:*
actions:
  - read
  - write
tiger policies create --file policy.yaml

Bulk Operations

Process multiple operations using JSON or YAML files:

# Create multiple principals from a file
tiger principals create --file principals.yaml --batch

# Import policies from a directory
tiger policies import --directory ./policies

# Export all policies
tiger policies export --output ./backup/policies.yaml

Policy Simulation

Test policies before deploying them to production:

# Simulate a policy evaluation
tiger policies simulate policy-123 \
  --principal user-alice \
  --action read \
  --resource document:sensitive \
  --context '{"ip_address": "203.0.113.42", "mfa_verified": true}'

# Output:
# ✓ Access Allowed
# Matched Policy: policy-123 (business-hours-access)
# Reason: All conditions satisfied
# Evaluated in: 12ms

Output Formatting

The CLI supports multiple output formats for integration with other tools:

Table (default)

tiger principals list

ID          TYPE   NAME
user-123    user   Alice
user-456    user   Bob

JSON

tiger principals list --output json

{
  "items": [...]
}

YAML

tiger principals list --output yaml

items:
  - id: user-123

Pro tip: Use --output json with jq for advanced filtering and processing.

Global Flags

--api-key

Override the configured API key

string
--api-url

Override the API base URL

string
--output, -o

Output format: table, json, yaml

string
--context

Use a specific configuration context

string
--verbose, -v

Enable verbose logging

boolean
--quiet, -q

Suppress non-error output

boolean
--help, -h

Show help for any command

boolean

Shell Completion

Enable tab completion for faster command entry:

Bash

tiger completion bash > /etc/bash_completion.d/tiger

Zsh

tiger completion zsh > "${fpath[1]}/_tiger"

Fish

tiger completion fish > ~/.config/fish/completions/tiger.fish

PowerShell

tiger completion powershell | Out-String | Invoke-Expression

Get started with the CLI

Install the CLI and manage your access controls from the command line.