Skip to main content

PipeOps CLI Commands Overview

The PipeOps CLI provides a comprehensive set of commands for managing your infrastructure, applications, and deployments. All commands follow a consistent structure and support common flags for output formatting and verbosity.

Command Structure

pipeops <category> <command> [options] [flags]

Examples

pipeops auth login
pipeops list
pipeops logs proj-123 --follow

Command Categories

Authentication Commands

Manage authentication and user accounts.

pipeops auth <command>
CommandDescription
loginAuthenticate with PipeOps using OAuth
logoutSign out and remove local credentials
statusCheck current authentication status
meDisplay current user information

Learn more: Authentication Commands

Project Commands

Manage project lifecycle and configuration.

pipeops project <command>
CommandDescription
listList all projects
createCreate a new project
logsView project logs
envManage environment variables

Learn more: Project Commands

Monitoring Commands

Monitor projects and view logs.

CommandDescription
listList projects, addons, or deployments
statusCheck project or addon status
logsView project logs

Learn more: Monitoring Commands

Server Commands

Manage servers and infrastructure.

pipeops server <command>
CommandDescription
listList all servers
createProvision a new server
deleteRemove a server
infoGet server details

Learn more: Server Commands

Agent Commands

Install and manage PipeOps agents on your infrastructure.

pipeops agent <command>
CommandDescription
installInstall PipeOps agent and Kubernetes cluster
joinJoin a worker node to an existing cluster
infoDisplay cluster information

Learn more: Agent Commands

Utility Commands

General utility and system commands.

CommandDescription
statusOverall system status
versionDisplay CLI version
updateUpdate CLI to latest version
proxyManage proxy connections

Global Flags

These flags work with all commands:

FlagShortDescription
--json-Output in JSON format
--verbose-vEnable verbose output
--quiet-qSuppress non-essential output
--help-hDisplay help information
--config-Specify custom configuration file

Example Usage

# JSON output
pipeops list --json

# Verbose mode
pipeops status proj-123 --verbose

# Quiet mode
pipeops list --quiet

# Custom config
pipeops --config /path/to/config.json list

Common Patterns

Interactive vs Non-Interactive

Most commands support both interactive and non-interactive modes:

Interactive (prompts for input):

pipeops auth login

Non-Interactive (all options via flags):

pipeops list
pipeops status proj-123

Output Formats

Text Format (Default)

Human-readable formatted output:

pipeops list
NAME        STATUS    UPDATED
my-app running 2024-01-15 10:30:00
other-app stopped 2024-01-14 15:20:00

JSON Format

Machine-readable JSON for scripting:

pipeops list --json
[
{
"name": "my-app",
"status": "running",
"updated": "2024-01-15T10:30:00Z"
}
]

Filtering and Selection

Use command-specific flags to filter results:

# Filter by status
pipeops list --status running

# Limit results
pipeops list --limit 10

# View addon deployments
pipeops list --deployments --project proj-123

Real-Time Updates

Some commands support following output in real-time:

# Follow logs
pipeops logs --follow

# Follow logs for specific project
pipeops logs proj-123 --follow

Getting Help

Command Help

Get help for any command:

# General help
pipeops --help

# Category help
pipeops auth --help
pipeops project --help

# Specific command help
pipeops list --help
pipeops logs --help

Example Output

$ pipeops auth --help

Authenticate with PipeOps

Usage:
pipeops auth <command> [flags]

Available Commands:
login Authenticate with PipeOps using OAuth
logout Sign out and remove local credentials
status Check current authentication status
me Display current user information

Flags:
-h, --help help for auth

Global Flags:
--json Output in JSON format
-v, --verbose Enable verbose output
-q, --quiet Suppress non-essential output

Use "pipeops auth <command> --help" for more information about a command.

Command Aliases

Some commands have shorter aliases for convenience:

# Full command
pipeops list

# Using command shortcuts
pipeops logs proj-123 --follow

Exit Codes

The CLI uses standard exit codes:

CodeMeaning
0Success
1General error
2Invalid arguments
130Interrupted by user (Ctrl+C)

Use in scripts:

if pipeops status proj-123; then
echo "Project is running"
else
echo "Project check failed with code $?"
fi

Environment Variables

Commands respect environment variables for configuration:

# Set default project
export PIPEOPS_DEFAULT_PROJECT=proj-123
pipeops status # Uses proj-123 automatically

# Set API endpoint
export PIPEOPS_API_URL=https://api.staging.pipeops.io
pipeops list

# Set output format
export PIPEOPS_OUTPUT_FORMAT=json
pipeops list # Outputs JSON by default

See Configuration for more details.

Scripting with the CLI

Basic Script Example

#!/bin/bash
set -e # Exit on error

# Authenticate
pipeops auth status || pipeops auth login

# List projects
pipeops list

# Check project status
PROJECT_ID="proj-123"
pipeops status "$PROJECT_ID"

# View logs
pipeops logs "$PROJECT_ID" --lines 50

Using JSON Output

# Get project count
COUNT=$(pipeops list --json | jq 'length')
echo "You have $COUNT projects"

# Get running projects
pipeops list --json | \
jq -r '.[] | select(.status=="running") | .name'

# Get project URLs
pipeops list --json | \
jq -r '.[] | "\(.name): \(.url)"'

Next Steps

Explore detailed documentation for each command category:

Or continue learning: