zenkit-cli 0.3.0

Command-line tool for interacting with Zenkit workspaces
zenkit-cli-0.3.0 is not a library.

Use Zenkit from the command-line and scripts. Read and update workspaces, lists, items, fields, and webhooks; and perform backups to json.

Installation

Install the executable with cargo install zenkit-cli. Instructions for installing cargo are here

Set the environment variable ZENKIT_API_TOKEN to your api token, which you can obtain (even for the free-tier plan) from your Zenkit account.

Optional: To avoid re-typing -w WORKSPACE for every command for the most-used workspace, set the environment variable ZENKIT_WORKSPACE to the workspace name. The -w WORKSPACE option always overrides ZENKIT_WORKSPACE.

zk Usage

Use zk -h for help.

For the commands below, the parameter values for workspace, list, or field may be an object's id (int), uuid, or display name. Values containing spaces or symbols should be quoted.

All commands except workspaces require a -w workspace parameter or require the environment variable ZENKIT_WORKSPACE to contain a workspace name. The -w option is omitted below for brevity.

  • Show helpzk -h/--help

  • Workspace commands

    • Show all workspaces and lists (accessible by your user) zk workspaces Output columns (tab-separated):

      • W/L: workspace or list
      • id: object id (positive int)
      • uuid: object uuid
      • name: object name
    • Show users in workspace zk users Output columns (tab-separated):

      • id
      • uuid
      • name
    • Show lists in workspace zk lists Output columns (tab-separated):

      • id
      • uuid
      • name
  • List commands

    • Show items in a list zk items -l list Output columns (tab-separated):
      • id
      • uuid
      • name
  • List field/schema commands

    • Show fields for a list zk fields -l list Output columns (tab-separated):

      • id
      • uuid
      • name
    • Show choice values for a fieldzk choices -l list -f field Output columns (tab-separated):

      • id
      • name
    • Describe fieldzk field -l list -f field Output format: Text object dump

  • Item commands

    • Show item detailzk item -l list -i item_num Output format: object dump (text)

    • Set field value zk set -l list -i item_num -f field [-t text] [-v value | -F file]

      The value can be specified on the command-line (-v) or from a file (-F).

      For a field of type person, the value may be either the person's uuid or their display name (case-insensitive). For a field of type choice (category), the value may be the choice id, uuid, or display name(case-sensitive). For a field of type reference, the value must be the uuid of the related object.

    • Create item zk create -l list -F field=value -F field=value ...jj

      Values may be of the format described above for "Set field value". Field names may be id, uuid, or display name (case-sensitive).

    • Add comment to an itemzk comment -l list -i item -c comment

  • Webhooks

    • Add a webhook zk webhook --type triggger-type --url url [ OPTIONS ]

    • Delete webhook zk delete-webhook --webhook webhook

    • List webhooks zk list-webhooks

  • Backup

    • Backup lists and field definitions to json files zk backup -o output_dir [ -l list ] If no list is specified, all lists in the workspace are backed up.