The cee command line
Print, reprint and correct from a terminal, a script or a scheduled task.
cee is ceelab’s command line. It prints from a terminal (PowerShell, bash, zsh, cmd), a script or a scheduled task, with your usual document types, numbers and checks: the result is the same as from the application.
cee print shipping-label
cee print shipping-label --copies 10
cee print shipping-label --set name="Jane Doe"
cee edit --last --set name="Jane Doe"
shipping-label is the key of the document type, shown in the Document types tab (Advanced settings › Type key). Templates are designed in the application; cee is there to use them.
Before you start
cee is installed with ceelab. Open ceelab at least once on the computer, and set the label printer and the output folder.
| System | Calling it |
|---|---|
| Windows | cee in a new terminal, after installation. |
| Linux | cee directly. |
| macOS | /Applications/ceelab.app/Contents/MacOS/cee |
Commands
Commands are in English; messages follow ceelab’s language. cee COMMAND --help gives the help for a command, and cee print TYPE --help lists the information to enter for that type.
| Command | Effect |
|---|---|
cee types |
Lists your document types and the information to enter. |
cee describe TYPE |
Details a type: documents produced, information to enter, possible values. |
cee preview TYPE --out FILE.pdf |
Saves a preview (PDF or PNG), without printing or using up anything. |
cee print TYPE [values] [--copies N] |
Prints like the Generation space, from 1 to 10,000 copies. |
cee history |
Latest documents produced. |
cee reprint ID|--last |
Reprints a document exactly as it was, without using up a number. |
cee edit ID|--last [values] |
Corrects a document and reprints it, with the same numbers. |
--dry-run runs every check of a real print and shows what would come out, without printing anything.
Giving the values
Each piece of information to enter is given by its name, or with --set:
cee print product_label --product "Vis inox" --reference VX-0620
cee print product_label --set product="Vis inox" --set reference=VX-0620
- Number: a comma is accepted (
12,5); date:YYYY-MM-DDorDD/MM/YYYY; choice list: the exact text of the option; Yes/No:trueorfalse. - Information that is not given takes its default value. Numbers and calculations are handled by ceelab.
- A value containing spaces goes in quotes:
--set "name=Jane Doe"works everywhere.
Checks
Before printing, cee checks everything, just like the application: values, label printer, output folder, and the first-label check. If anything is missing, nothing is printed and no number is used up. An output that fails afterwards is redone with cee reprint ID.
For your scripts
With --json, the response is a single JSON object your scripts can read, including when there is an error.
# PowerShell
$r = cee print shipping-label --set "name=Jane Doe" --json | Out-String | ConvertFrom-Json
if ($LASTEXITCODE -ne 0) { throw $r.error.message }
| Code | Meaning |
|---|---|
| 0 | success |
| 2 | incorrect command |
| 3 | type or document not found |
| 4 | value refused |
| 6 | ceelab not ready on this computer yet: open it once |
| 7 | no label printer set |
| 8 | an output failed: it is traced and can be reprinted |
| 9 | ceelab busy: try again |
| 11 | first-label check to be done in the application |