Documentation
Gainsight Read CLI
gainsight-pp-cli
Install
npx -y @mvanhorn/printing-press-library install gainsightInstalls the CLI binary and the agent skill for Claude Code, Codex, Cursor, Gemini CLI, Copilot, and more. Add --cli-only or --skill-only for one half. Requires Node.
Documentation
Read-first Gainsight NXT API surface for customer success account, relationship, person, timeline, and Cockpit inspection.
Created by @debgotwired (Deb Mukherjee).
Quick Start
1. Install
See Install above.
2. Set Up Credentials
Get your API key from your API provider's developer portal. The key typically looks like a long alphanumeric string.
export GAINSIGHT_ACCESS_KEY_AUTH="<paste-your-key>"
You can also persist this in your config file at ~/.config/gainsight-read-pp-cli/config.toml.
3. Verify Setup
gainsight-pp-cli doctor
This checks your configuration and credentials.
4. Try Your First Command
gainsight-pp-cli companies list
Usage
Run gainsight-pp-cli --help for the full command reference and flag list.
Commands
cockpit
Manage cockpit
gainsight-pp-cli cockpit- List Cockpit calls to action.
companies
Manage companies
gainsight-pp-cli companies get-company- Get a company by ID.gainsight-pp-cli companies list- List Gainsight companies.
data
Manage data
gainsight-pp-cli data- List Gainsight data objects.
healthscores
Manage healthscores
gainsight-pp-cli healthscores- List customer health score records.
people
Manage people
gainsight-pp-cli people get-person- Get a person by ID.gainsight-pp-cli people list- List people.
relationships
Manage relationships
gainsight-pp-cli relationships get- Get a relationship by ID.gainsight-pp-cli relationships list- List relationships.
successplans
Manage successplans
gainsight-pp-cli successplans- List success plans.
timeline
Manage timeline
gainsight-pp-cli timeline- List Timeline activities.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
gainsight-pp-cli companies list
# JSON for scripting and agents
gainsight-pp-cli companies list --json
# Filter to specific fields
gainsight-pp-cli companies list --json --select id,name,status
# Dry run — show the request without sending
gainsight-pp-cli companies list --dry-run
# Agent mode — JSON + compact + no prompts in one flag
gainsight-pp-cli companies list --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--jsonoutput to stdout, errors to stderr - Filterable -
--select id,namereturns only fields you need - Previewable -
--dry-runshows the request without sending - Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendlyis set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
Health Check
gainsight-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/gainsight-read-pp-cli/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|---|---|---|
GAINSIGHT_ACCESS_KEY_AUTH | per_call | Yes | Set to your API credential. |
agentcookie (optional)
If you use agentcookie to sync secrets across machines, this CLI auto-adopts agentcookie-managed credentials with no extra setup. When the daemon writes to this CLI's config, gainsight-pp-cli doctor reports agentcookie: detected and auth-status labels the source as agentcookie. Skip this section if you don't use agentcookie - the CLI works the same as any other.
Troubleshooting
Authentication errors (exit code 4)
- Run
gainsight-pp-cli doctorto check credentials - Verify the environment variable is set:
echo $GAINSIGHT_ACCESS_KEY_AUTHNot found errors (exit code 3) - Check the resource ID is correct
- Run the
listcommand to see available items
Generated by CLI Printing Press
For agents: pass /documentation/gainsight/agents.md to install this CLI from a prompt.