@tplog/zendcli
v1.4.0
Published
Minimal Zendesk CLI for tickets and comments (Rust)
Downloads
1,330
Readme
zendcli
Minimal Zendesk CLI for listing tickets and reading ticket comment timelines.
zend 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/zendcliConfigure
Option 1: interactive setup
zend 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
zend --help
zend ticket --help
zend email --help
zend follower --help
zend comments --help
zend 12345
zend ticket 12345 --raw
zend email [email protected]
zend email [email protected] --status unresolved
zend email [email protected] --status open,pending
zend follower [email protected] --limit 3
zend comments 12345
zend comments 12345 --visibility public
zend comments 12345 --visibility private --sort descComments 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
CI: runs on branch pushes, PRs tomain, and pushes tomainPublish to npm: runs only onv*tags or manual trigger
Trusted publishing
The publish workflow is set up for npm trusted publishing via GitHub Actions OIDC.
Recommended setup on npm:
- Go to the package settings on npm
- Add a Trusted Publisher for GitHub Actions
- Point it to:
- owner:
tplog - repo:
zendcli - workflow file:
publish.yml
- owner:
This avoids storing long-lived npm tokens in the repository.
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
