Crates.io | zenkit-cli |
lib.rs | zenkit-cli |
version | 0.4.5 |
source | src |
created_at | 2020-12-08 03:58:25.537085 |
updated_at | 2021-04-14 03:17:13.153718 |
description | Command-line tool for interacting with Zenkit workspaces |
homepage | https://github.com/stevelr/zenkit-cli |
repository | https://github.com/stevelr/zenkit-cli |
max_upload_size | |
id | 320695 |
size | 76,572 |
Use Zenkit from the command-line and scripts. Read and update workspaces, lists, items, fields, and webhooks; and perform backups to json.
Install with cargo install zenkit-cli
. The program name is zk
(usually installed to $HOME/.cargo/bin).
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
.
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):
Show users in workspace zk users
Output columns (tab-separated):
Show lists in workspace zk lists
Output columns (tab-separated):
List commands
zk items -l list
Output columns (tab-separated):
List field/schema commands
Show fields for a list zk fields -l list
Output columns (tab-separated):
Show choice values for a fieldzk choices -l list -f field
Output columns (tab-separated):
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
zk backup -o output_dir [ -l list ]
If no list is specified, all lists in the workspace are backed up.