emupos command reference¶
Simulate POS hardware at the wire-protocol level.
Usage:
Options:
--api URL: Control API of the running simulator. [env var: EMUPOS_API; default: http://127.0.0.1:8765]--version: Show the installed emupos version and exit.--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
Commands:
run: Start the simulated devices and the...devices: List the running devices with their...scan: Scan a barcode, then wait until the...doctor: Check this machine and ./emupos.yaml for...receipt: Read the receipts a printer has completed.scale: Put weight on a scale, zero it or tare it.fault: Make a printer report a fault, or clear it.drawer: Act on a printer's cash drawer.barcode: Generate barcodes that a POS decodes.config: Create, check and describe emupos.yaml.setup: Set up operating-system integrations.
emupos run¶
Start the simulated devices and the control API, and show events live. Ctrl+C stops.
Usage:
Options:
--config PATH: Configuration file. Default: emupos.yaml in the current directory.--demo: Use the built-in demo devices instead of a file.--ui: Also serve the control page, a web page for the physical actions.--help: Show this message and exit.
emupos devices¶
List the running devices with their connections and current state.
Usage:
Options:
--json: Print one JSON document instead of text.--help: Show this message and exit.
emupos scan¶
Scan a barcode, then wait until the simulator confirms it was typed or written.
A keyboard scanner types into the focused window. If this terminal still has focus when the countdown ends, the scan is cancelled: typed here, the barcode and Enter would run as a command.
Usage:
Arguments:
data: The text the scanner reads, e.g. 6291041500213. [required]
Options:
--device ID: Device id. Optional when only one device of the type runs.--countdown N: Seconds before the scan is delivered. For a keyboard scanner, click your POS window during the countdown. [default: 3; x>=0]--unicode: Type each character exactly, whatever the keyboard layout (for non-ASCII data).--help: Show this message and exit.
emupos doctor¶
Check this machine and ./emupos.yaml for everything the simulator needs.
Usage:
Options:
--json: Print one JSON document instead of text.--help: Show this message and exit.
emupos receipt¶
Read the receipts a printer has completed.
Usage:
Options:
--help: Show this message and exit.
Commands:
list: List a printer's receipts, newest first.show: Print a receipt as text; the latest one...
emupos receipt list¶
List a printer's receipts, newest first.
Usage:
Options:
--device ID: Device id. Optional when only one device of the type runs.--json: Print one JSON document instead of text.--help: Show this message and exit.
emupos receipt show¶
Print a receipt as text; the latest one unless RECEIPT_ID is given.
Usage:
Arguments:
RECEIPT_ID: Receipt id fromemupos receipt list. [default: latest]
Options:
--device ID: Device id. Optional when only one device of the type runs.--save PATH: Also write the receipt image as PNG.--json: Print one JSON document instead of text.--help: Show this message and exit.
emupos scale¶
Put weight on a scale, zero it or tare it.
Usage:
Options:
--help: Show this message and exit.
Commands:
set: Set the weight on the scale, stable unless...zero: Zero the scale, as pressing its ZERO key...tare: Tare the scale: the current weight becomes...
emupos scale set¶
Set the weight on the scale, stable unless --unstable is given.
Usage:
Arguments:
VALUE: Gross weight: a number with the unit kg or g, e.g. 1.25kg or 1250g. Whole grams only. Negative values such as -100g are allowed (also written asemupos scale set -- -100g). [required]
Options:
--device ID: Device id. Optional when only one device of the type runs.--unstable: Report the weight as in motion until the scale settles.--help: Show this message and exit.
emupos scale zero¶
Zero the scale, as pressing its ZERO key does.
Usage:
Options:
--device ID: Device id. Optional when only one device of the type runs.--help: Show this message and exit.
emupos scale tare¶
Tare the scale: the current weight becomes the tare.
Usage:
Options:
--device ID: Device id. Optional when only one device of the type runs.--help: Show this message and exit.
emupos fault¶
Make a printer report a fault, or clear it.
Usage:
Options:
--help: Show this message and exit.
Commands:
set: Activate a fault, e.g.clear: Clear a fault, e.g.
emupos fault set¶
Activate a fault, e.g. emupos fault set front paper-out.
Usage:
Arguments:
DEVICE: Printer id, e.g. front. [required]FAULT: paper-near-end, paper-out, cover-open or offline. [required]
Options:
--help: Show this message and exit.
emupos fault clear¶
Clear a fault, e.g. emupos fault clear front paper-out.
Usage:
Arguments:
DEVICE: Printer id, e.g. front. [required]FAULT: paper-near-end, paper-out, cover-open or offline. [required]
Options:
--help: Show this message and exit.
emupos drawer¶
Act on a printer's cash drawer.
Usage:
Options:
--help: Show this message and exit.
Commands:
close: Push the drawer shut.
emupos drawer close¶
Push the drawer shut. The POS sees it closed on its next status request.
Usage:
Options:
--device ID: Device id. Optional when only one device of the type runs.--help: Show this message and exit.
emupos barcode¶
Generate barcodes that a POS decodes. Works without the simulator.
Usage:
Options:
--help: Show this message and exit.
Commands:
weighed: Print the EAN-13 digits for a weighed or...
emupos barcode weighed¶
Print the EAN-13 digits for a weighed or priced item, e.g.
emupos barcode weighed --layout weight-21 --item 12345 --weight 1.25kg
Usage:
Options:
--layout PATTERN: 13-character pattern such as 21IIIIIWWWWWC, or a preset: weight-21, price-23. [required]--item N: Item code for the I field. [required]--weight VALUE: Weight for a W field: a number with the unit kg or g, e.g. 1.25kg or 1250g.--price MINOR: Price for a P field, in minor units: 1299 is 12.99.--save PATH: Also write a PNG label with the digits beneath it.--help: Show this message and exit.
emupos config¶
Create, check and describe emupos.yaml. None of these need the simulator.
Usage:
Options:
--help: Show this message and exit.
Commands:
init: Write a commented starter configuration.validate: Check a configuration file and list its...schema: Print the JSON Schema of emupos.yaml, for...
emupos config init¶
Write a commented starter configuration. An existing file is never overwritten.
Usage:
Arguments:
path: Configuration file. Default: emupos.yaml in the current directory.
Options:
--help: Show this message and exit.
emupos config validate¶
Check a configuration file and list its devices. Opens no ports and needs no simulator.
Usage:
Arguments:
path: Configuration file. Default: emupos.yaml in the current directory.
Options:
--help: Show this message and exit.
emupos config schema¶
Print the JSON Schema of emupos.yaml, for editor completion and validation.
Usage:
Options:
--help: Show this message and exit.
emupos setup¶
Set up operating-system integrations.
Usage:
Options:
--help: Show this message and exit.
Commands:
print-queue: Windows: create a print queue...
emupos setup print-queue¶
Windows: create a print queue emupos-<device id> that sends raw jobs to a simulated printer.
Usage:
Options:
--device ID: Device id. Optional when only one device of the type runs.--remove: Delete the queue and port created for the printer.--help: Show this message and exit.