Skip to main content
Lumos CLI Examples

Examples

This page provides practical examples for common Lumos CLI workflows with code samples.

Authentication

Initial Setup

Set up the CLI for first-time use:
This will guide you through the authentication process and store your credentials securely.

Login with Admin Privileges

If you need admin access:

Check Current User

Verify who you’re logged in as:
Get just the username:
Get just the user ID:

Listing Resources

List Apps

Browse all available apps in the AppStore:
Filter apps by name:
List only apps you have access to:

List Users

Search for users:
Output as JSON for scripting:
Output as CSV:

List Permissions

List permissions for a specific app:
Filter permissions by name:

List Groups

List all groups:
List groups for a specific app:

List Access Requests

List your pending requests:
List all past requests:
Filter by status:

Making Access Requests

Interactive Request

The simplest way to make a request is interactively:
This will guide you through selecting an app, permissions, and duration.

Request with App Filter

Filter the app list to make selection faster:

Fully Scripted Request

For automation, specify all parameters:

Request Multiple Permissions

Request multiple permissions at once:

Request for Another User

Request access on behalf of another user:

Request with Duration

Specify access duration (in seconds):

Dry Run

Preview the request command without submitting:
This outputs the exact command you would run, useful for building automation scripts.

Monitoring Requests

Check Request Status

Get status of your last request:
Check a specific request:

Poll for Completion

Wait for a request to complete (with 2-minute timeout):

Cancel a Request

Cancel a pending request:

Scripting Examples

Shell Script: Impersonation Function

Add this to your .zshrc or .bashrc for quick impersonation requests:

Python Script: Batch Access Requests

Bash Script: Auto-Request with Retry

JSON Output for Automation

Get request data in JSON format for processing:

Output Formats

All list commands support multiple output formats:

Pagination

Control pagination for large result sets: