@tplog/zendesk-cli
v1.4.5
Published
Minimal Zendesk CLI for tickets and comments
Downloads
99
Readme
zendesk-cli
Minimal Zendesk CLI for listing tickets and reading ticket comment timelines.
zcli comments returns a slim timeline optimized for terminal review and LLM summarization. By default it includes both public and private comments and emits only:
authortimevisibility(publicorprivate)body
Install
npm install -g @tplog/zendesk-cliConfigure
Option 1: interactive setup
zcli configureCredentials are stored locally in:
~/.zendcli/config.jsonThe CLI writes this file with restricted permissions.
Option 2: environment variables
This is the recommended option for temporary or CI usage.
export ZENDESK_SUBDOMAIN="your-subdomain"
export ZENDESK_EMAIL="[email protected]"
export ZENDESK_API_TOKEN="your_zendesk_api_token"Environment variables take precedence over the config file.
Usage
zcli --help
zcli ticket --help
zcli email --help
zcli follower --help
zcli comments --help
zcli search --help
zcli whoami
zcli 12345
zcli ticket 12345 --raw
zcli email [email protected]
zcli email [email protected] --status unresolved
zcli email [email protected] --status open,pending
zcli follower [email protected] --limit 3
zcli comments 12345
zcli comments 12345 --visibility public
zcli comments 12345 --visibility private --sort desc
zcli search "login failure"
zcli search "login failure" --status open --limit 5Bare arguments are auto-routed: numeric values go to zcli ticket, emails go to zcli email.
Comments output shape
[
{
"author": "Support Agent",
"time": "2026-03-13T06:19:57Z",
"visibility": "public",
"body": "Reply text..."
}
]Use --visibility public or --visibility private to filter the timeline.
Development workflow
Daily development
- Create a feature branch from
main - Develop locally
- Commit as needed
- Push branch to GitHub
- Open a PR to
main - Merge after CI passes
Example:
git checkout main
git pull
git checkout -b feat/some-change
# work locally
npm ci
npm run build
git add .
git commit -m "feat: add some change"
git push -u origin feat/some-changeRelease workflow
This repository uses a safer release flow:
- normal merges to
maindo not publish automatically - npm publishing happens only when a version tag is pushed
- the release tag must match
package.jsonversion exactly
Publish a new version
- Make sure
mainis in the state you want to release - Bump the version locally
- Push
mainand the new tag - GitHub Actions publishes to npm
git checkout main
git pull
npm version patch
git push origin main --tagsOr for a feature release:
npm version minor
git push origin main --tagsThis creates tags like v0.1.2, and the publish workflow verifies that the tag matches package.json.
CI/CD
Publish to npm: runs only onv*tags or manual trigger. Runs tests first, then publishes on success.- Authentication: uses
NPM_TOKENstored in the repository secrets.
Security notes
- Never commit real Zendesk credentials
- Prefer environment variables for temporary use
- If a token is ever exposed, revoke and rotate it immediately
- Do not store npm publish credentials in the repo or in gitignored files
