Read-first Gladly API surface for customer timelines, conversations, agents, topics, answers, and support operations.
Created by @debgotwired (Deb Mukherjee).
Quick Start
1. Install
See Install above.
2. Set Up Credentials
Get your API username and password from your API provider's developer portal.
export GLADLY_USERNAME="<paste-your-username>"
export GLADLY_PASSWORD="<paste-your-password>"
You can also persist this in your config file at ~/.config/gladly-pp-cli/config.toml:
gladly-pp-cli auth set-token "<username>" "<password>"
3. Verify Setup
gladly-pp-cli doctor
This checks your configuration and credentials.
4. Try Your First Command
gladly-pp-cli agents
Usage
Run gladly-pp-cli --help for the full command reference and flag list.
Commands
agents
Manage agents
gladly-pp-cli agents - List agents.
answers
Manage answers
gladly-pp-cli answers - List knowledge answers.
conversation-items
Manage conversation items
gladly-pp-cli conversation-items - List conversation timeline items.
conversations
Manage conversations
gladly-pp-cli conversations get - Get a conversation.
gladly-pp-cli conversations list - List customer conversations.
customers
Manage customers
gladly-pp-cli customers get - Get a Gladly customer profile.
gladly-pp-cli customers list - List Gladly customers.
inboxes
Manage inboxes
gladly-pp-cli inboxes - List inboxes.
reports
Manage reports
gladly-pp-cli reports - List available reports.
tasks
Manage tasks
gladly-pp-cli tasks - List Gladly tasks.
topics
Manage topics
gladly-pp-cli topics - List conversation topics.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
gladly-pp-cli agents
# JSON for scripting and agents
gladly-pp-cli agents --json
# Filter to specific fields
gladly-pp-cli agents --json --select id,name,status
# Dry run — show the request without sending
gladly-pp-cli agents --dry-run
# Agent mode — JSON + compact + no prompts in one flag
gladly-pp-cli agents --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows 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-friendly is 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
gladly-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/gladly-pp-cli/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|
GLADLY_USERNAME | per_call | Yes | Gladly API username. |
GLADLY_PASSWORD | per_call | Yes | Gladly API password. |
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, gladly-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
gladly-pp-cli doctor to check credentials
- Verify both environment variables are set:
echo $GLADLY_USERNAME and test -n "$GLADLY_PASSWORD"
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
Generated by CLI Printing Press