Skip to main content
wrk submits text, image, or embedding jobs to a workspace for processing by nrvnad.

Usage

wrk <workspace> <prompt...>
wrk <workspace> <prompt> --image <path>
wrk <workspace> <text> --embed
wrk <workspace> -
wrk [--help | --version]

Arguments

workspace
string
required
Directory path for job storage. Must match the workspace used by nrvnad.
prompt
string
required
Text prompt for inference. Can be multiple words without quotes.
-
string
Read prompt from stdin instead of command-line arguments.

Options

--image, -i
string
Path to image file to attach. Can be specified multiple times for multiple images.
--embed
boolean
Submit as embedding job instead of text generation. Returns a vector representation.
-h, --help
boolean
Display help message.
-v, --version
boolean
Display version number.

Environment Variables

NRVNA_LOG_LEVEL
string
Log level: ERROR, WARN, INFO, DEBUG, TRACE (default: WARN for clean output).

Output

On success, wrk outputs only the job ID to stdout:
abc123def456
This makes it ideal for piping to flw:
wrk ./workspace "Hello" | flw ./workspace -w

Examples

Submit simple text prompt

wrk ./workspace What is the capital of France?
Note: Quotes are optional for multi-word prompts.

Submit with quotes

wrk ./workspace "What is the capital of France?"

Submit from stdin

echo "Hello world" | wrk ./workspace -

Submit with image

wrk ./workspace "Describe this image" --image photo.jpg

Submit multiple images

wrk ./workspace "Compare these images" -i img1.jpg -i img2.jpg

Submit embedding request

wrk ./workspace "Machine learning is a subset of AI" --embed

Pipe to result retrieval

jobid=$(wrk ./workspace "Hello")
flw ./workspace $jobid
Or in one line:
wrk ./workspace "Hello" | flw ./workspace -w

Behavior

Prompt Handling

  • All non-option arguments after workspace are joined with spaces
  • Stdin input strips only trailing newline for single-line prompts
  • Empty prompts are rejected with an error

Workspace Creation

If the workspace directory doesn’t exist, wrk creates it with the required structure.

Job Types

  1. Text Generation (default): Standard LLM completion
  2. Vision: Text generation with image context (when --image is used)
  3. Embedding: Vector representation (when --embed is used)

Exit Codes

  • 0 - Success, job submitted
  • 1 - Error occurred

Error Messages

Errors are written to stderr:
Error: Empty prompt provided
Error: --image requires a path
Error: Unknown error submitting job

Build docs developers (and LLMs) love