uprint REV. 1 · POWERSHELL

Print from the terminal.
Or just ask your agent to.

uprint is a PowerShell CLI for the local Windows printing system. It submits files to the printer you select, and every command can return a versioned JSON envelope for an AI agent.

INSTALL · WORKS TODAY
git clone https://github.com/kalebcole/uprint-cli.git
cd uprint-cli
.\uprint.ps1 setup

Windows 10 or 11 with PowerShell 5.1 or PowerShell 7 and no additional runtime dependencies.

BEFORE Open PDF → Print → right printer

You pick the right printer and confirm, but no error or page appears and you cannot see where the job stopped.

AFTER .\uprint.ps1 print report.pdf

The CLI selects an available engine and submits to the printer you named. It reports the engine and whether Universal Print accepted the job.

FIG. 1 Prompt to submission
you →
AGENT · TOOL CALL
JSON ENVELOPE · EXCERPT
CLI OBSERVATION

The CLI stops observing the job after Universal Print accepts it. The envelope therefore reports submitted_to_cloud, or submitted for another printer. The badge and paper path are a downstream illustration, not a status reported by U-Print.

§ 1

Why this exists

I couldn't print from my dev box. Every time I needed a document printed, whether a form, a license or a receipt, I had to walk over to a coworker's desk and ask them to print it for me.

The printer was right there. On the network. Connected via Universal Print. But the tooling to actually send a job to it from the command line? Didn't exist.

I opened the PDF, clicked Print, selected the right printer, and confirmed, but no error or document appeared. I couldn't tell if my job was submitted or waiting for my badge tap at the printer.

So I built uprint. A CLI that targets the right printer, reports the submission result, and provides JSON for AI agents.

§ 2

The part built for agents

Most CLIs make an agent scrape human text and guess. In JSON mode, uprint returns one versioned envelope on standard output for success or failure.

SUCCESS · .\uprint.ps1 status --json
{
  "version": 1,
  "command": "status",
  "timestamp": "2026-01-15T09:30:00.0000000-08:00",
  "success": true,
  "data": {
    "name": "Office UP",
    "status": "Normal",
    "driver": "Universal Print Class Driver",
    "port": "PORT-UP",
    "type": "Local",
    "shared": false,
    "pendingJobs": 1,
    "isUP": true
  }
}
FAILURE · error replaces data
{
  "version": 1,
  "command": "status",
  "timestamp": "2026-01-15T09:31:12.0000000-08:00",
  "success": false,
  "error": {
    "code": "PRINTER_NOT_FOUND",
    "message": "Specified printer was not found",
    "suggestion": "Run 'uprint printers' to list available printers"
  }
}

Never both

An envelope carries data or error, never the two together. Branch on success and you are done.

Errors suggest

Every error carries a suggestion field. It names a recovery action when one is available.

Warnings ride along

An optional warnings array sits beside a success, so a job can succeed and report that it is waiting on a badge.

Use both signals

The exit code separates success, operational errors, and invalid input. In JSON mode, inspect success and error.code for the specific result.

Use U-Print with an agent

Copy the repository's SKILL.md into your agent's skill directory and set UPRINT_CLI_PATH to the repository's uprint.ps1. The skill uses agent JSON help for command discovery and applies printer-selection safeguards.

§ 3

Command reference

This reference contains only the commands and options that the CLI accepts today.

uprint commands, what they do, and their flags
CommandWhat it doesFlags
.\uprint.ps1 setup Interactive printer discovery in human mode. For noninteractive JSON setup, run .\uprint.ps1 setup --printer <name> --json. --printer <name> --json
.\uprint.ps1 printers List available printers. --universal-only -u
.\uprint.ps1 status Printer state, driver, port, pending job count, and whether it is a Universal Print device. none
.\uprint.ps1 print <file> Print a file. Resolves the path, selects a print engine, and reports which one it used. --copies N --duplex --color --mono
.\uprint.ps1 queue List jobs currently in the print queue. none
.\uprint.ps1 queue cancel <id> Cancel a single job by its numeric id. none
.\uprint.ps1 queue cancel --all Cancel every job on the target printer. --all
.\uprint.ps1 health Composite diagnostic across spooler, printer state, queue backlog, and the Universal Print driver. none
.\uprint.ps1 config set <key> <value> Write a config value. Booleans and integers are coerced from strings. none
.\uprint.ps1 config get Print the whole configuration. This command does not accept a key argument. none

Global flags

--json
Emit one JSON envelope on standard output. Without it, commands use human-readable output.
--printer <name>
Override the configured default for one invocation.
--help
Usage summary.

Exit codes

0
The command succeeded.
1
Operational error, such as a missing printer or a failed submission.
3
Invalid input, including an unknown command, an unknown option, a missing argument, or a file that does not exist.

Configuration

Stored at %USERPROFILE%\.uprint\config.json

defaultPrinter
Target used when --printer is absent. Default null.
jsonOutput
Use JSON output for every command. Default false.
autoWake
Default true.
timeout
Nonnegative print-engine timeout in milliseconds. Default 10000.
§ 4

Get it running

  1. 01

    Clone and set up

    git clone https://github.com/kalebcole/uprint-cli.git
    cd uprint-cli
    .\uprint.ps1 setup

    setup lists installed printers and saves the one you choose. You can also select a printer for one command with --printer.

  2. 02

    Print something

    .\uprint.ps1 print report.pdf

    If the target is a Universal Print device, the job waits in the cloud until you badge at the printer. The output says so.

  3. 03

    Hand it to an agent

    .\uprint.ps1 print report.pdf --json

    Point your agent at the root SKILL.md file and let it inspect the process exit code, success, and error.code.

Requirements

  • Windows 10 or 11 with PowerShell 5.1 or PowerShell 7
  • A printer the machine can already see, Universal Print or otherwise
  • Windows PrintManagement cmdlets and the Spooler service
  • No additional runtime dependencies
§ 5

Known limits

Printing touches hardware, a cloud queue and a badge reader. Here is what this tool does not yet handle, stated up front rather than discovered later.

  • Submitted is not printed. A successful engine handoff means that U-Print observed no submission error. It is not proof that paper came out.
  • Windows only. It is built on the Windows print subsystem and PowerShell's printer cmdlets. There is no macOS or Linux path.

Both are tracked in the issue tracker. If one of them is in your way, say so there.