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 --helplists every group and its commands.wx <group> <command> --helpshows the method and path the command calls, the endpoint's description, a link to its entry here, and every flag.wx api listprints every operation id (the anchor of an endpoint here, such as#listProjects) with the command that calls it, andwx api call <operationId>runs that command.
wx api list | grep listProjects
wx api call listProjects --size 10 # same request as: wx project list --size 10
Arguments and flags
| In the endpoint | In the command |
|---|---|
| Path parameters | Positional arguments, required, in path order: wx project get-work-unit <projectUUID> <workUnitUUID>. |
| Query parameters | Kebab-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
| Flag | What it does |
|---|---|
--profile <name> | Uses a saved profile (see Configure wx). |
--host <url> | Calls another host. |