Skip to content

Releases: partnerhq/partnerhq-cli

v0.6.0

Choose a tag to compare

@akdarrah akdarrah released this 23 Sep 20:38
d99090e

New: masquerading (PHQ admins)

  • phq masquerade start <email|id>: every later command runs as that user, until phq masquerade stop. The server has to confirm the masquerade before the CLI saves anything, so a non-admin, an unknown user or an older server means nothing is saved.
  • phq masquerade start --owner-of <project>: masquerade as a project's owner. The project can be a name, an exact permalink or an ID. If more than one project matches, it lists them and refuses to pick.
  • phq admin projects (--search, --organization): each project with its customer, its status and its owner.
  • phq admin users (--search, --organization, --project): find people by name or email, by customer (owners are marked) or by project.

You always know who you're acting as

  • Every command prints a red ⚠ MASQUERADING AS … banner showing the real user, the environment and how long the masquerade has lasted. It goes to stderr, even with --json, so JSON output stays clean.
  • phq whoami shows Acting as and Real user; --json adds masquerading and identity.masquerading_user.
  • Every response is checked against the server's confirmation. If it doesn't match, the CLI stops before printing anything.
  • phq auth login and logout clear the masquerade.

Security

  • Masquerading and phq admin need a phq auth login from the last 12 hours. Older logins keep working for your own account but get a 403 for these commands.
  • Recommended for everyone using Claude with the CLI: add the permissions.ask rules from the README ("Masquerading (PHQ admins)") so Claude asks before running phq masquerade or phq admin. Customer data is untrusted input, and these rules stop text injected into it from moving an agent between accounts.

No existing commands or flags changed. The masquerade header is sent from every client, including the results commands added in 0.5.0.

Upgrading

cd partnerhq-cli && git pull && npm install && npm run build
phq --version   # 0.6.0
phq auth login  # needed to masquerade if your last login is older than 12 hours

Requires the matching API (partnerhq/partnerhq#747).

v0.5.0

Choose a tag to compare

@akdarrah akdarrah released this 23 Sep 19:45
e1f721e

New

  • phq tasks results <id>: shows a task's Results grid, the same data as the web Results page. There's one row per organization (keyed by task_completion_id) and one column per custom field, with the field id in [brackets]. --json returns the raw {columns, data}.
  • phq tasks results-update <id>: fills in Results grid cells. Use repeatable --set <task_completion_id>:<field_id>=<value>, or --data '{"changes":[...]}'|@file.json. All changes in one call apply together or not at all.
    • Checkbox cells take true/false, and checkbox groups take a comma-separated list.
    • Unknown or read-only columns are rejected before anything is sent.
  • phq resources results / results-update: the same commands for resources.

Editing needs the host permission "This host can make updates via the task results view", which the project owner sets on the individual. Without it, results still works and shows field columns as read-only.

No existing commands or flags changed.

Upgrading

cd partnerhq-cli && git pull && npm install && npm run build
phq --version   # 0.5.0

Requires the matching API (partnerhq/partnerhq#748), which is deployed.

v0.4.0

Choose a tag to compare

@akdarrah akdarrah released this 23 Sep 16:29
2bdb8d5

New

  • phq pages — list, get, create, update, and delete Page Builder pages (addressed by slug). --content accepts HTML or @file.html; --published true|false. Output includes the page's public_url. Requires the Page Builder to be on for the project.
  • phq assets — list, get, create, update, and delete project assets. --task-ids 12,34 links tasks, resources, or internal tasks (--task-ids "" on update unlinks all). Requires Assets to be on for the project.
  • phq events update --logo <path> uploads a project logo; --remove-logo clears it.

No existing commands or flags changed.

Upgrading

cd partnerhq-cli && git pull && npm install && npm run build
phq --version   # 0.4.0

Requires the matching API (partnerhq/partnerhq#744), which is deployed.