A powerful command-line interface for managing certificate pinning configurations with TrustPin Cloud.
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
Download the appropriate binary for your platform from the releases page.
Available binaries:
trustpin-cli-macos-arm64
- macOS Apple Silicon (M1/M2/M3)trustpin-cli-macos-x64
- macOS Inteltrustpin-cli-linux-x64
- Linux x64trustpin-cli-windows-x64.exe
- Windows x64After 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.
Before using the CLI, configure it with your TrustPin API credentials:
trustpin-cli configure --api-token=<your-api-token>
Optional configuration parameters:
--api-base-url=<url>
- Custom API base URL (default: TrustPin Cloud API)--log-http
- Enable HTTP request/response logging for debuggingThese 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 TrustPin CLI with API credentials.
trustpin-cli configure [options]
Options:
--api-token=<text>
- TrustPin API token (required)--api-base-url=<text>
- TrustPin API base URL (optional)Example:
trustpin-cli configure --api-token=tp_1234567890abcdef
User management commands.
Get current user information.
trustpin-cli user info [options]
Example:
trustpin-cli user info
trustpin-cli user info --output=json
Project management commands for certificate pinning configurations.
List all projects accessible to your account.
trustpin-cli projects list [options]
Example:
trustpin-cli projects list
trustpin-cli projects list --output=json
Get detailed information about a specific project.
trustpin-cli projects get <organization-id> <project-id> [options]
Arguments:
<organization-id>
- Organization UUID<project-id>
- Project UUIDExample:
trustpin-cli projects get fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637
Get project configuration in JWS payload format (JSON output only).
trustpin-cli projects config <organization-id> <project-id> [options]
Arguments:
<organization-id>
- Organization UUID<project-id>
- Project UUIDExample:
trustpin-cli projects config fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637
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:
<organization-id>
- Organization UUID<project-id>
- Project UUIDOptions:
-k, --private-key=<path>
- Path to encrypted private key file (required for BYOK projects)-p, --password=<text>
- Master password for private key decryptionExample:
# 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
Get the public key for a project in PEM format.
trustpin-cli projects public-key <organization-id> <project-id> [options]
Arguments:
<organization-id>
- Organization UUID<project-id>
- Project UUIDExample:
trustpin-cli projects public-key fb52418e-b5ae-4bff-b973-6da9ae07ba00 f7743eeb-582f-4d78-926c-15072614b637
# 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
# 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'
# Enable debug output for troubleshooting
trustpin-cli projects list --debug
# Log HTTP requests and responses
trustpin-cli projects list --log-http
For issues, feature requests, or questions:
See the LICENSE file for license information.