drtam-cms-cli
v0.10.0
Published
Official device-authorized CLI for the Dr Tam Medical Spa CMS
Readme
Dr Tam CMS CLI
The official CLI for administrator-approved, device-scoped access to the Dr Tam Medical Spa CMS.
npm install --global drtam-cms-cli
drtam-cms auth request
drtam-cms auth status
drtam-cms auth redeem
drtam-cms auth whoami
drtam-cms journal list --json
drtam-cms journal create --input ./journal.json --json
drtam-cms journal pin post_example --json
drtam-cms treatment list --json
drtam-cms treatment create --input ./treatment.json --json
drtam-cms album list --json
drtam-cms album create --input ./album.json --json
drtam-cms album update album_example --input ./album.json --json
drtam-cms products list --json
drtam-cms products update --input ./product-brands.json --json
drtam-cms physicians list --json
drtam-cms physicians update --input ./physicians.json --json
drtam-cms content update business --input ./business.json --json
drtam-cms media upload ./cover.webp --alt "Treatment consultation" --json
drtam-cms media upload-batch --input ./media-batch.json --json
drtam-cms media update media_example --input ./media-name.json --json
drtam-cms translation generate post post_example --locale zh --json
drtam-cms skill install
drtam-cms updateauth request does not open a browser. It prints a request ID and asks an administrator to review it at:
https://drtam-medspa-clinic.com/admin/device-code-requestPending-request verifiers and Device Codes stay in the operating-system credential store. The CLI never prints them. Administrator approval grants the official CLI trusted editor access for Journal, Gallery Album, Homepage, Business, the Product catalog, Treatment, Media, taxonomy, and translation drafts. Existing journal:read credentials remain read-only until a new request is approved and redeemed.
drtam-cms update snapshots any pending request or active Device Access in the
running process before npm replaces the package, then restores that state to
the same operating-system credential store after installation. Neither the
pending verifier nor Device Code is passed through command arguments, files,
environment variables, or command output. A genuinely isolated execution
environment still needs its own administrator-approved Device Access because
it cannot safely recover a credential it was never authorized to read.
JSON write commands accept a bare CMS payload file. Journal, Treatment, and Gallery Album support list, get, create, and update; Journal also supports pin and unpin, which preserve the complete payload and save a new draft revision with the current revision precondition. Multiple pinned Posts remain newest-first and become visible only after human review and website publication. Treatment creation generates its CMS resource ID locally and saves only a draft. Album updates preserve the full ordered photo payload and bind the write to the current Album revision. products update accepts a bare array of storefront collections with optional nested products, changes only the Product catalog, and preserves all other Business fields. physicians update accepts a bare ordered array of 1–12 complete Primary Care physician profiles, preserves all other Homepage fields, disables Primary Care in the new draft, and clears factsVerified so medical identity and license facts must be reviewed again before it can be re-enabled. Update commands load the current resource first and bind the write to its current immutable revision when the CMS supports a revision precondition. Draft edits do not change the live static website. Device Access cannot submit or approve review, publish, delete, restore snapshots, manage channels, or deliver content to social media.
Journal payloads may attach one optional, CMS-uploaded social-profile MP4 with
an accessible description and transcript while retaining the required cover
image. See the bundled drtam-cms skill for the current payload shape and
provider-compatible media constraints.
Media metadata updates are partial. Set a user-facing name without changing the
original uploaded filename with { "displayName": "Welcome video" }; restore
the original filename by sending { "displayName": null }.
Batch uploads accept a manifest with 1–100 items. Every item needs its own
accurate alternative text. Relative paths are resolved from the CLI's current
working directory. A top-level folder applies by default; an item can override
it or use null for the Media Library root:
{
"folderId": "folder_treatments",
"items": [
{
"path": "./media/before.webp",
"altText": "Patient before treatment"
},
{
"path": "./media/after.mp4",
"altText": "Patient result after treatment",
"folderId": null
}
]
}The CLI validates the complete manifest before uploading. It continues after ordinary per-file failures and returns one result for every attempted item; retry only failed items. An authentication failure stops the batch immediately and reports already completed uploads so they are not uploaded again.
drtam-cms skill install installs the bundled drtam-cms agent skill into the current project's .agents/skills/drtam-cms directory. It is idempotent and refuses to replace different local instructions unless --force is supplied explicitly. Start a new agent session in that project after installation so the agent can discover the skill.
Use drtam-cms help for all commands. Node.js 22 or newer is required.
For a local Worker, pass --api-url http://127.0.0.1:8787. Non-local API overrides must use HTTPS. auth logout removes the local keychain entry but does not revoke the server credential; an administrator can revoke it from Device Access in the Content Studio.
