cli

Commands

Every command calls one endpoint of this reference, in the form wx <group> <command> [arguments] [flags].

wx project list --status DRAFT --size 20
wx project get <projectUUID>
wx project create --body @project.json
wx project upload-reference-file <projectUUID> --file ./brief.pdf

Find a command

Groups follow the reference: wx project for Projects, wx glossary for Glossary, wx tm for Translation Memory, and so on.

wx api list | grep listProjects
wx api call listProjects --size 10   # same request as: wx project list --size 10

Arguments and flags

In the endpointIn the command
Path parametersPositional arguments, required, in path order: wx project get-work-unit <projectUUID> <workUnitUUID>.
Query parametersKebab-case flags: targetUserUUID becomes --target-user-uuid. Repeat a flag to send several values: --tag web --tag mobile.
JSON body--body '<json>', or --body @request.json to read it from a file.
File upload--file <path>. The form's other fields are flags.

wx checks required arguments and flags before it sends the request. A few commands build their body from flags, such as wx task bulk-assign --task <uuid> --user <uuid>.

Output

The response body goes to standard output, so you can pipe it to jq or redirect it to a file. A call that fails prints the error and exits with status 1.

wx project list --size 50 | jq -r '.content[].name'
wx project download-bilingual <projectUUID> <workUnitUUID> > work-unit.xlf

Global flags

FlagWhat it does
--profile <name>Uses a saved profile (see Configure wx).
--host <url>Calls another host.