cloud-console-cli

TrustPin CLI

A powerful command-line interface for managing certificate pinning configurations with TrustPin Cloud.

Table of Contents

Installation

Homebrew (macOS)

The easiest way to install TrustPin CLI on macOS is using Homebrew:

# Add TrustPin tap
brew tap trustpin-cloud/trustpin-cli

# Install TrustPin CLI
brew install trustpin-cli

Binary Installation

Download the appropriate binary for your platform from the releases page.

Available binaries:

After downloading:

macOS/Linux:

# Make the binary executable
chmod +x trustpin-cli-*

# Move to a location in your PATH (optional)
sudo mv trustpin-cli-* /usr/local/bin/trustpin-cli

Windows: Add the binary location to your system PATH or run it directly from the download location.

Configuration

Before using the CLI, configure it with your TrustPin API credentials:

trustpin-cli configure --api-token=<your-api-token>

Optional configuration parameters:

Commands

Global Options

These options can be used with any command:

Option Description
--version Show the version and exit
-h, --help Show help message and exit
--output=<format> Output format: json or text (default: text)
--debug Enable debug output
-q, --quiet Suppress non-essential output
--log-http Log HTTP requests and responses

configure

Configure TrustPin CLI with API credentials.

trustpin-cli configure [options]

Options:

Example:

trustpin-cli configure --api-token=tp_1234567890abcdef

user

User management commands.

user info

Get current user information.

trustpin-cli user info [options]

Example:

trustpin-cli user info
trustpin-cli user info --output=json

projects

Project management commands for certificate pinning configurations.

projects list

List all projects accessible to your account.

trustpin-cli projects list [options]

Example:

trustpin-cli projects list
trustpin-cli projects list --output=json

projects get

Get detailed information about a specific project.

trustpin-cli projects get <organization-id> <project-id> [options]

Arguments:

Example:

trustpin-cli projects get fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

projects config

Get project configuration in JWS payload format (JSON output only).

trustpin-cli projects config <organization-id> <project-id> [options]

Arguments:

Example:

trustpin-cli projects config fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

projects sign

Get project configuration, sign it with a private key, and publish as JWS (JSON Web Signature).

trustpin-cli projects sign <organization-id> <project-id> [options]

Arguments:

Options:

Example:

# For projects with Bring Your Own Key (BYOK)
trustpin-cli projects sign fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637 \
  --private-key=/path/to/private-key.pem \
  --password=your-master-password

# For projects with TrustPin-managed keys
trustpin-cli projects sign fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

projects public-key

Get the public key for a project in PEM format.

trustpin-cli projects public-key <organization-id> <project-id> [options]

Arguments:

Example:

trustpin-cli projects public-key fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

Examples

Complete Workflow Example

# 1. Configure the CLI with your API token
trustpin-cli configure --api-token=tp_your_api_token_here

# 2. Verify configuration by getting user info
trustpin-cli user info

# 3. List all available projects
trustpin-cli projects list

# 4. Get detailed information about a specific project
trustpin-cli projects get fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

# 5. Retrieve the project's public key
trustpin-cli projects public-key fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

# 6. Sign and publish the project configuration
trustpin-cli projects sign fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637

Working with JSON Output

# Get projects list in JSON format for scripting
trustpin-cli projects list --output=json | jq '.'

# Extract specific fields using jq
trustpin-cli projects get fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637 --output=json | jq '.name'

Debugging

# Enable debug output for troubleshooting
trustpin-cli projects list --debug

# Log HTTP requests and responses
trustpin-cli projects list --log-http

Support

For issues, feature requests, or questions:

License

See the LICENSE file for license information.