Skip to content

Reference

CLI reference

Every command of vukem-tools, its flags, its output and its exit codes.

Last updated:

vukem-tools runs the tools of Vukem Tools from a terminal. It converts nothing itself: it uploads your files to a server through the HTTP API, waits, and downloads the result. It is the same program as the MCP server, and it reads the same table of tools.

Setup#

VariableDefaultMeaning
VUKEM_TOOLS_URLhttp://localhost:3000The Vukem Tools server.
VUKEM_TOOLS_API_KEYnoneAn API key that may run the tool. See Authentication.

Commands#

CommandWhat it does
vukem-tools <area> <tool> [flags]Runs a tool. For example vukem-tools pdf crop.
vukem-tools run <tool> [flags]The same, by the tool's name, for example run pdf-crop.
vukem-tools <area>Lists the tools of an area, with a summary of each.
vukem-tools toolsPrints every tool as JSON: {"tools": [...]}.
vukem-tools mcpServes every tool over MCP on standard input and output. See Connect.
vukem-tools serve [--addr host:port]Serves MCP over local HTTP. Default 127.0.0.1:8787. See Protocol.
vukem-tools versionPrints the version. Also --version.
vukem-tools helpPrints the usage. Also --help and -h.

The areas are archive, audio, image, office, pdf, sprite and video. Run vukem-tools pdf to see the 20 PDF commands, or Tools for all 37, each with its CLI command.

Run a tool#

Terminal
vukem-tools pdf crop --input in.pdf --output out.pdf --left 36 --right 36

Every tool has these flags:

FlagMeaning
--input FILEThe file to read. Repeat it for a tool that takes several files, in the order the tool uses them.
--output PATHWhere to write the result. A file, or a directory for a tool that makes several files. Required.
--options JSONThe tool's options as a JSON object, for what the flags cannot express.
--jsonPrint the result as JSON.
--timeout DURATIONHow long to wait for the conversion. Default 10m.
--idempotency-key KEYMake a retry return the same conversion.
--helpShow the tool's description, how many files it reads and every flag.

Each scalar option of a tool, and each list of strings, is also a flag of its own. The name is the option's name with underscores turned into hyphens, so the option owner_password of pdf-protect is --owner-password. Repeat a list flag for several values. An option that is an object or a list of objects goes through --options. A flag you set wins over the same key in --options. vukem-tools <area> <tool> --help lists what a tool accepts, and Tools lists it with types and limits.

A tool takes no loose arguments: write --input in.pdf, not in.pdf.

Output#

Without --json, the command prints one line for each file written, then the note the conversion has, if any:

Text
out.pdf (1234 bytes)

With --json it prints one JSON object. See the shape in Protocol.

Errors and exit codes#

An error goes to standard error. With --json it is a JSON object with a stable code; without it, error: <code>: <message>. The codes are the ones in Protocol.

Exit codeWhen
0It worked.
1The call failed: no key, a refused key, a network error, a failed conversion, a timeout.
2The command was wrong: an unknown command or tool, a bad flag, an argument out of range, or a browser tool, which has no command.

Browser tools#

Seventeen tools run in the browser on the site and have no command: base64, data-convert, diff, hash, json-format, json-schema, jwt-decode, password, uuid, cep-lookup, cnpj-lookup, cpf-cnpj, fake-person, chat-template, llm-clean, llm-cost and token-count. vukem-tools run <name> for one of them exits with 2 and the code browser_only.

Next step#

Use the same tools from an agent: MCP overview.