# CyrFlip command line CyrFlip takes commands from scripts, shortcuts and other programs. A command is handled by the copy of CyrFlip that is already running; the process you start only carries it there, waits for the answer and exits with its code. Command set 1.1, for `CyrFlip.exe`. The same list is printed by `CyrFlip.exe commands`, and `CyrFlip.exe commands --json` prints the manifest itself. CyrFlip.exe is a window program: a script that needs the exit code waits for it - `start /wait CyrFlip.exe status` in cmd, `(Start-Process .\CyrFlip.exe -ArgumentList 'status' -Wait -PassThru).ExitCode` in PowerShell. `--result ` writes the answer's data as one JSON file. Commands other than the safe ones run only while "Let other programs ask CyrFlip to work with my files, screen, clipboard or the network" is on, on the General page of the settings. The spellings CyrFlip shipped before (`/clipboard-send`, `/clipboard-get`, `/launcher-run:{guid}`, `/launcher-settings`, `/exit`) keep working as before and depend only on their own feature being on. A command marked for other devices can also be asked by another device of your exchange account, through the exchange server, once you turn on "Listen to commands from my other devices" on the Exchange server page and allow that device in the External control window. Nothing else is taken from another device, and no command changes that setting. | Command | What it does | Risk | With CyrFlip not running | From other devices | | --- | --- | --- | --- | --- | | `commands` | Print the list of commands this copy of CyrFlip accepts. | safe | oneshot | yes | | `version` | Print the product name, its version and the version of its command set. | safe | oneshot | yes | | `status` | Say whether CyrFlip is running and ready to take commands. | safe | refuse | yes | | `show` | Bring the Settings window forward - CyrFlip's main window - optionally on one page. | safe | start | yes | | `quit` | Close the running copy of CyrFlip cleanly; with none running there is nothing to do. | safe | oneshot | yes | | `clipboard send` | Start sending what the Windows clipboard holds to the server of every exchange account this PC is signed in to, or the one file in --file / the text in --text instead of the clipboard's content (exactly one of the two, never both). | leaves-machine | start | - | | `clipboard get` | Start putting the newest value the exchange servers hold onto the Windows clipboard, or - with --out - receive it straight into the one file the caller names, and touch no clipboard. | leaves-machine | start | - | | `scenario run` | Start one scenario of the Quick launch list. | writes-user-data | oneshot | - | | `scenario list` | List the scenarios of the Quick launch list. | reads-user-data | oneshot | - | | `note add` | Add a note to the Quick notes. | safe | start | - | | `note list` | List notes, newest first, optionally only those that contain some words. | reads-user-data | refuse | - | | `note get` | Read one note back whole by its id, as it is stored: a text note as text verbatim (line endings, tabs and non-BMP characters byte for byte), a checklist note as kind and items with their done states. The notes are the private store; the answer never holds more than this one note. | reads-user-data | refuse | - | | `note export` | Write every note to one file as a "CyrFlip Exchange Text v1" transfer file - Quick notes section only, newest first by creation, the same writer the notes window's own export uses - so a scheduled task can back the notes up. The file holds every note the store holds: it is never trimmed to the importer's caps (25 MB, 10,000 objects), so a person with more notes than that gets a file the window's import refuses. | reads-user-data | refuse | - | | `layout list` | List the keyboard layouts installed in Windows, in Windows' own order. | safe | oneshot | yes | | `layout current` | Say which keyboard layout the window the person last typed in uses, and whether CapsLock is on - the window a click on the tray icon picks; from a console that is the console. | safe | refuse | yes | | `layout switch` | Switch the keyboard layout of the window the person last typed in, as a click on the tray icon does - from a console that is the console. | writes-user-data | refuse | - | | `text convert` | Convert a text typed in one keyboard layout into what the same keys give in another layout. | safe | oneshot | - | | `text flip-case` | Invert the case of every letter of a text - the fix for CapsLock left on. | safe | oneshot | - | | `screenshot region` | Let the person choose a part of the screen - the selection appears over whatever they are doing, and Escape cancels it - and save it as a PNG file. With --annotate the chosen part opens in the draw-on-capture editor first, and OK saves the drawn picture under the original capture moment. | reads-user-data | refuse | - | | `screenshot full` | Save all screens, as they are after an optional delay, as a PNG file. The console that ran the command is part of the picture unless --delay-ms lets it move away. | reads-user-data | refuse | - | | `screenshot window` | Capture one named top-level window and save it as a PNG file. The picture is the window's rectangle of the screen as it is right now: a window covered by another shows what covers it, and a minimized window is refused. | reads-user-data | refuse | - | | `chords list` | List every hotkey and mouse chord CyrFlip binds and whether it really fires. | safe | oneshot | - | | `diagnostics paths` | Say where CyrFlip keeps its data, its logs and its reports. | safe | oneshot | - | | `diagnostics bundle` | Pack CyrFlip's diagnostic logs into one ZIP file, without mailing it. | reads-user-data | oneshot | - | | `trafficlight status` | Say what the availability traffic light knows: each target's label, kind, light, whether the look is stale and when it was last checked - without starting a check. | reads-user-data | refuse | - | | `trafficlight check` | Check one target of the availability traffic light, or all of them, now, wait until the checks have finished and say what they found. | leaves-machine | refuse | - | | `note show` | Open the Quick notes window on the note it was last left on - with --new, on a new note with the caret in the body, exactly as the chord does. Show, never hide: run twice, the window is up both times. | safe | refuse | - | | `clipboard-history show` | Show the clipboard history strip - and only show it, never toggle it, so a shortcut that opens the history never closes it. | safe | refuse | - | | `clipboard-history list` | List the clipboard history's previews, pinned first then newest first, optionally only entries that contain a query or only the pinned ones. The history is the most private store in the product, so the answer carries previews only - never a full text, never a source app, never a source window title. | reads-user-data | refuse | - | | `clipboard-history put` | Put one history entry back on the clipboard exactly as the history strip's restore does: the entry becomes the current one, the write is marked as CyrFlip's own so it is not recorded as a new copy, and a pinned entry keeps its pin. The answer carries the outcome alone - the caller named the entry and can list it. | writes-user-data | refuse | - | | `clipboard-history pause` | Pause or resume recording the clipboard history: the same one persisted state the tray's check item and the settings page own, applied live and kept across restarts. A safe command, so it depends only on the history module being on. | safe | refuse | - | | `hotkeys pause` | Pause or resume every CyrFlip key combination at once: the same master switch as on the Hotkeys page of the settings, applied live and kept across restarts. While paused, CyrFlip lets every key through; the layout marker keeps working. | safe | refuse | yes | | `symbols show` | Show the symbols palette without taking the focus from the editor, as the palette itself opens - and never hide it. | safe | refuse | - | | `trafficlight show` | Show the availability board and bring it forward without taking the focus - never hiding it; the chord's toggle is unchanged. | safe | refuse | - | | `keepawake set` | Set either keep-awake switch - don't sleep, don't turn the screen off - exactly as the tray's two switches do, saved with them and shown as one value everywhere. With --minutes the request is session-only instead: the given switches are applied live for that time, nothing is written, and the state returns on its own when the time ends. | safe | refuse | yes | | `theme set` | Choose the theme - system, light or dark - exactly as picking it on the General page does: applied to every window at once with no restart, saved as the same token. Windows contrast themes keep their precedence over every mode, as they already do. | safe | refuse | - | | `autostart set` | Turn start-with-Windows on or off through the same write the General page and its tray switch use: the per-user Run key and the machine-local setting that survives a missing Run entry, together, never one without the other. On the Store build Windows owns startup, and the command answers managed-by-windows and writes nothing. | writes-user-data | oneshot | - | | `cursor restore` | Reload Windows' default cursors, the whole scheme - the repair for a branded I-beam a killed CyrFlip left behind, and it undoes what any tool replaced. Idempotent, safe beside a running CyrFlip, and needs no running copy. | writes-user-data | oneshot | - | | `translate text` | Translate a piece of text through the local model the person already set up - text in, text out: no selection is taken, no window opens, the clipboard is never touched. The model, its timeouts and its one retry are the translator module's own, and the verb needs the running copy. | leaves-machine | refuse | - | | `selection convert` | Convert what the named window has selected from one keyboard layout into another - the chord's own flip pipeline: take the selection, convert it, paste the answer back over it, restore the clipboard. | writes-user-data | refuse | - | | `selection flip-case` | Invert the case of what the named window has selected - the chord's own CapsLock fix: take the selection, flip every letter's case, paste the answer back over it, restore the clipboard. | writes-user-data | refuse | - | | `selection note` | Take what the named window has selected and save it as a quick note - the same capture the context menu uses, then the same write note add uses. The quick notes module must be on. | writes-user-data | refuse | - | | `selection translate` | Take what the named window has selected and translate it through the translator's own model - the chord's capture, then the model call of translate text. Nothing is pasted; the answer carries the translation. The translator module must be on. | leaves-machine | refuse | - | ## Exit codes | Code | Meaning | | --- | --- | | 0 | done, or accepted | | 1 | the command ran and the operation failed | | 2 | not proven: no answer in time, or the running copy is older and takes no commands | | 10 | usage: unknown command, unknown option, a bad value, a command that is too long | | 11 | not ready: not running, busy, the feature is off, or the thing named does not exist | | 12 | permission: the setting is off, or CyrFlip runs as administrator and the caller does not | ## commands Print the list of commands this copy of CyrFlip accepts. ``` CyrFlip.exe commands [--json] ``` Risk: `safe`. With CyrFlip not running: `oneshot`. Waits at most 5000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print this manifest itself as JSON instead of a readable list. | | Exit | Meaning | | --- | --- | | 0 | printed | | 10 | an unknown option | Example (powershell): ```powershell & .\CyrFlip.exe commands --json | Out-File cli.json ``` Expect: exit 0; the file holds this manifest; no tray icon appears. ## version Print the product name, its version and the version of its command set. ``` CyrFlip.exe version [--json] ``` Risk: `safe`. With CyrFlip not running: `oneshot`. Waits at most 5000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print one JSON object with product, version and cliVersion. | Data: `product` (string) - CyrFlip; `version` (string) - the version of this executable, spelled as the release tag; `cliVersion` (string) - MAJOR.MINOR of this command set. | Exit | Meaning | | --- | --- | | 0 | printed | | 10 | an unknown option | Example (cmd): ```bat CyrFlip.exe version ``` Expect: exit 0; one line with CyrFlip, its version and its cliVersion. ## status Say whether CyrFlip is running and ready to take commands. ``` CyrFlip.exe status [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `refuse`. Waits at most 2000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `version` (string) - the running copy's version; `pid` (int) - its process id; `acceptsRestrictedCommands` (bool) - whether 'Let other programs ask CyrFlip to work with my files, screen, clipboard or the network' is on; `modules` (object) - which opt-in modules are on, by name: quickNotes, translate, scenarioLauncher, exchangeClipboard, trafficLight, symbols, clipboardHistory, contextMenu; `remoteCommands` (bool) - whether 'Listen to commands from my other devices' is on, on the Exchange server page (REMOTE-CONTROL rule 8). | Exit | Meaning | | --- | --- | | 0 | running and ready | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 11 | not running, or busy | | 12 | the running copy runs as administrator and this caller does not | Example (powershell): ```powershell (Start-Process .\CyrFlip.exe -ArgumentList 'status' -Wait -PassThru).ExitCode ``` Expect: 0 while CyrFlip runs and is ready, 11 otherwise. ## show Bring the Settings window forward - CyrFlip's main window - optionally on one page. ``` CyrFlip.exe show [--page ] [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `start`. Waits at most 10000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. Older spellings that still work: `/launcher-settings`. | Option | Kind | Meaning | | --- | --- | --- | | `--page` | one of `general`, `indicators`, `hotkeys`, `conversions`, `windows-languages`, `clipboard`, `quick-notes`, `screenshots`, `translate`, `launcher`, `about`, `symbols`, `selection-menu`, `traffic-light`, `exchange-server` | The settings page to open; without it, the page the window was last left on. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | | Exit | Meaning | | --- | --- | | 0 | the window is on the screen | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | an unknown page or option | | 11 | busy: a dialog or the first-run tour is open | | 12 | the running copy runs as administrator and this caller does not | Example (cmd): ```bat start /wait CyrFlip.exe show --page quick-notes ``` Expect: exit 0 (errorlevel 0); the Settings window is on the quick notes page. ## quit Close the running copy of CyrFlip cleanly; with none running there is nothing to do. ``` CyrFlip.exe quit [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `oneshot`. Waits at most 10000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. Older spellings that still work: `/exit`. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | | Exit | Meaning | | --- | --- | | 0 | closing, or was not running | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 11 | busy: a dialog or the first-run tour is open | | 12 | the running copy runs as administrator and this caller does not | Example (cmd): ```bat start /wait CyrFlip.exe quit ``` Expect: exit 0 (errorlevel 0); the tray icon goes away. ## clipboard send Start sending what the Windows clipboard holds to the server of every exchange account this PC is signed in to, or the one file in --file / the text in --text instead of the clipboard's content (exactly one of the two, never both). ``` CyrFlip.exe clipboard send [--file | --text ] [--json] [--result ] ``` Risk: `leaves-machine`. With CyrFlip not running: `start`. Waits at most 600000 ms; answers once the work has started. Older spellings that still work: `/clipboard-send`. | Option | Kind | Meaning | | --- | --- | --- | | `--file` | path | One existing file to send instead of the clipboard's content: it travels to the other devices as a file value, exactly as one copied file on the clipboard would. A file over the transfer limit (5368709120 bytes) is exit 10; the path is never echoed back. | | `--text` | string | A given text to send instead of the clipboard's content. Bounded by the command line's 32 KiB argument limit. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `kind` (string) - with --file or --text: what was handed to the transfer - file or text; `sizeBytes` (int) - with --file or --text: the source's size in bytes, known at hand-off. | Exit | Meaning | | --- | --- | | 0 | accepted: the transfer has started; CyrFlip shows how it ended in the notification area | | 1 | the file in --file could not be checked (a local path that does not answer) | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | both --file and --text, a value an option does not take, or a file over the transfer limit (5368709120 bytes) - the limit is named, the path is not | | 11 | the exchange clipboard module is off, the file in --file does not exist, or busy: another transfer or a dialog is open | | 12 | other programs may not ask for this - the setting is off - or the running copy runs as administrator | | 15 | a network share in --file did not answer in time | Example (powershell): ```powershell (Start-Process .\\CyrFlip.exe -ArgumentList 'clipboard send' -Wait -PassThru).ExitCode ``` Expect: 0 once the transfer has started. Example (cmd): ```bat start /wait CyrFlip.exe clipboard send --file C:\\temp\\report.pdf --result C:\\temp\\answer.json ``` Expect: exit 0 once the transfer has started; the answer's data holds kind file and sizeBytes. ## clipboard get Start putting the newest value the exchange servers hold onto the Windows clipboard, or - with --out - receive it straight into the one file the caller names, and touch no clipboard. ``` CyrFlip.exe clipboard get [--out ] [--overwrite] [--json] [--result ] ``` Risk: `leaves-machine`. With CyrFlip not running: `start`. Waits at most 300000 ms; answers when the work is done. Older spellings that still work: `/clipboard-get`. | Option | Kind | Meaning | | --- | --- | --- | | `--out` | path | Receive into exactly this file instead of the clipboard: used as given (never a folder the caller did not name), an existing file refused without --overwrite, the folder must exist and is never created, the file appears whole or not at all. A text value is written as UTF-8. | | `--overwrite` | bool | Replace an existing file in --out; never true without --out. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `kind` (string) - with --out: what was received - text, image or file; `sizeBytes` (int) - with --out: the received value's size in bytes; `savedTo` (string) - with --out: where it landed - the file's full path. | Exit | Meaning | | --- | --- | | 0 | with --out: received and written to the file; without it: accepted, the transfer has started and CyrFlip shows how it ended in the notification area | | 1 | the value could not be received into the file, or the folder in --out could not be checked | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | --out is not a usable file name, or a value an option does not take | | 11 | the exchange clipboard module is off, there is nothing on the server to receive, the folder in --out does not exist (never created), the file exists and --overwrite was not given (reason exists), or busy | | 12 | other programs may not ask for this - the setting is off - or the running copy runs as administrator | | 13 | the disk is full; the receive was not written | | 15 | a network share in --out did not answer in time | Example (cmd): ```bat start /wait CyrFlip.exe clipboard get ``` Expect: exit 0 (errorlevel 0) once the transfer has started. Example (powershell): ```powershell Start-Process .\\CyrFlip.exe -ArgumentList 'clipboard get --out C:\\temp\\received.txt --result C:\\temp\\answer.json' -Wait ``` Expect: exit 0 and the value is in the file; the answer's data holds kind, sizeBytes and savedTo. ## scenario run Start one scenario of the Quick launch list. ``` CyrFlip.exe scenario run (--id | --name ) [--link ] [--json] [--result ] ``` Risk: `writes-user-data`. With CyrFlip not running: `oneshot`. Waits at most 15000 ms; answers when the work is done. Older spellings that still work: `/launcher-run:{guid}`. | Option | Kind | Meaning | | --- | --- | --- | | `--id` | guid | The scenario's id. Exactly one of id and name. | | `--name` | string | The scenario's name, compared without regard to case. Exactly one of id and name; refused when two scenarios share it. | | `--link` | string | For a yt-dlp scenario: the link to download. Without it such a scenario is refused - it would otherwise ask a person. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `name` (string) - the scenario's name. | Exit | Meaning | | --- | --- | | 0 | the program was started (not that it has finished) | | 1 | the program could not be started | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | neither or both of id and name, a bad id, or a yt-dlp scenario without a link | | 11 | no such scenario, the name is shared, the launcher module is off, or busy | | 12 | other programs may not ask for this - the setting is off - or the scenario runs as administrator and would need a person at the desktop | Example (powershell): ```powershell (Start-Process .\CyrFlip.exe -ArgumentList 'scenario run --name "Backup"' -Wait -PassThru).ExitCode ``` Expect: 0 once the program was started. ## scenario list List the scenarios of the Quick launch list. ``` CyrFlip.exe scenario list [--json] [--result ] ``` Risk: `reads-user-data`. With CyrFlip not running: `oneshot`. Waits at most 5000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `count` (int) - number of scenarios; `scenarios` (array) - objects with id (guid), name, kind (program, script or yt-dlp), runAsAdmin (bool), hasHotkey (bool); never the program path or its arguments, where tokens live. | Exit | Meaning | | --- | --- | | 0 | listed (an empty list is still 0) | | 11 | the launcher module is off | | 12 | other programs may not ask for this yet - the setting is off | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'scenario list --result C:\temp\scenarios.json' -Wait ``` Expect: C:\temp\scenarios.json holds {"count":n,"scenarios":[...]}. ## note add Add a note to the Quick notes. ``` CyrFlip.exe note add --text [--title ] [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `start`. Waits at most 10000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--text` | string | The note's text, kept exactly as given - no trimming, line endings and tabs as typed. At most 32 KiB as UTF-8 (the command line's argument bound), so fewer characters in a script that is not Latin; a longer text is refused. | | `--title` | string | The note's name; without it, or when it is blank, the note has none. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `noteId` (guid) - the new note's id. | Exit | Meaning | | --- | --- | | 0 | added | | 1 | the note could not be written, or the notes could not be read (reason store-failed); it is not saved and does not exist | | 2 | the running copy is older and takes no commands, or it did not answer in time; the note was not added | | 10 | no text, empty text, or text over the limit | | 11 | the Quick notes module is off (reason module-off), or busy | | 12 | the running copy runs as administrator | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'note add --text "buy milk" --result C:\temp\note.json' -Wait ``` Expect: C:\temp\note.json holds {"noteId":""}. ## note list List notes, newest first, optionally only those that contain some words. ``` CyrFlip.exe note list [--query ] [--limit ] [--json] [--result ] ``` Risk: `reads-user-data`. With CyrFlip not running: `refuse`. Waits at most 10000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--query` | string | Keep notes whose name, text or checklist items contain this, the way the notes window searches. | | `--limit` | int | At most this many notes, 1 to 500. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `count` (int) - number of notes returned; below both limit and total only when the answer would pass 48 KiB; `total` (int) - number of notes that matched before the limit; `notes` (array) - objects with id (guid), title (absent for an unnamed note; at most 256 characters), preview (what the text says: its first non-empty line, or the first non-empty checklist item; at most 120 characters, one line), createdUtc, updatedUtc (UTC to the second, yyyy-MM-ddTHH:mm:ssZ). | Exit | Meaning | | --- | --- | | 0 | listed (an empty list is still 0) | | 1 | the notes could not be read (reason store-failed); never an empty list | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | limit out of range or not a whole number | | 11 | CyrFlip is not running, the Quick notes module is off (reason module-off), or busy | | 12 | other programs may not ask for this yet - the setting is off - or the running copy runs as administrator | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'note list --query milk --result C:\temp\notes.json' -Wait ``` Expect: C:\temp\notes.json holds the matching notes. ## note get Read one note back whole by its id, as it is stored: a text note as text verbatim (line endings, tabs and non-BMP characters byte for byte), a checklist note as kind and items with their done states. The notes are the private store; the answer never holds more than this one note. ``` CyrFlip.exe note get --id [--json] [--result ] ``` Risk: `reads-user-data`. With CyrFlip not running: `refuse`. Waits at most 10000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--id` | guid | The note's id: the noteId note add answers, and the id every object of note list carries. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `id` (guid) - the note's id; `title` (string) - the note's name; absent for an unnamed note; `kind` (string) - text or checklist; `text` (string) - the note's text exactly as stored, verbatim; absent for a checklist. A note bigger than the answer bound (48 KiB) is cut there and the cut is told by truncated and length; nothing else in the answer is cut; `items` (array) - for a checklist: its items in order, objects with text and done (the item's tick state); absent for a text note; `createdUtc` (string) - UTC to the second, yyyy-MM-ddTHH:mm:ssZ; `updatedUtc` (string) - UTC to the second, yyyy-MM-ddTHH:mm:ssZ; `truncated` (bool) - true when the note's content was cut at the answer bound; `length` (int) - the note's full character count as stored, also when the answer was cut. | Exit | Meaning | | --- | --- | | 0 | read; the answer holds the note | | 1 | the notes could not be read (reason store-failed); never an empty note | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | --id is missing or not a guid | | 11 | CyrFlip is not running, the Quick notes module is off (reason module-off), no note has this id (reason target-missing; the message names no note), or busy | | 12 | other programs may not ask for this yet - the setting is off - or the running copy runs as administrator | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'note get --id 12345678-90ab-cdef-1234-567890abcdef --result C:\temp\note.json' -Wait ``` Expect: C:\temp\note.json holds the note: id, kind, text or items, createdUtc, updatedUtc. ## note export Write every note to one file as a "CyrFlip Exchange Text v1" transfer file - Quick notes section only, newest first by creation, the same writer the notes window's own export uses - so a scheduled task can back the notes up. The file holds every note the store holds: it is never trimmed to the importer's caps (25 MB, 10,000 objects), so a person with more notes than that gets a file the window's import refuses. ``` CyrFlip.exe note export --out [--overwrite] [--json] [--result ] ``` Risk: `reads-user-data`. With CyrFlip not running: `refuse`. Waits at most 60000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--out` | path | The file to write, used exactly as given - any name Windows accepts, with or without an extension, not a folder and not a path ending in a backslash; a folder is never created, and a relative path is taken from the caller's working directory. The file appears whole or not at all. | | `--overwrite` | bool | Replace the file when it exists. Without it an existing file is left alone and the command exits 11. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `path` (path) - the file written; `notes` (int) - how many notes the file holds. | Exit | Meaning | | --- | --- | | 0 | exported | | 1 | the notes could not be read (reason store-failed), or the file could not be written (reason write-failed); nothing was exported | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | no --out, a path Windows refuses, or a folder-shaped path (a trailing backslash) | | 11 | not running, the Quick notes module is off (reason module-off), the file exists and --overwrite was not given (reason exists), the folder does not exist (reason target-missing; it is never created), or busy | | 12 | other programs may not ask for this yet - the setting is off - or the running copy runs as administrator | | 13 | the disk is full (reason disk-full) | | 15 | a network share in --out did not answer | Example (cmd): ```bat start /wait CyrFlip.exe note export --out C:\temp\notes-backup.txt ``` Expect: exit 0 (errorlevel 0); C:\temp\notes-backup.txt starts with the line "# CyrFlip Exchange Text v1" and holds the Quick notes section. ## layout list List the keyboard layouts installed in Windows, in Windows' own order. ``` CyrFlip.exe layout list [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `oneshot`. Waits at most 5000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `count` (int) - number of layouts; `layouts` (array) - objects with klid (eight hexadecimal digits), code (the two letters the marker shows, or the language's four hexadecimal digits when Windows cannot name it), label (Windows' own name of the layout) and current (bool; on every object only while CyrFlip is running: true for the layout of the window the person last typed in, false for all when there is no such window). | Exit | Meaning | | --- | --- | | 0 | listed | | 1 | Windows reports no keyboard layouts | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 11 | busy: a dialog or the first-run tour is open | | 12 | the running copy runs as administrator and this caller does not | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'layout list --result C:\temp\layouts.json' -Wait ``` Expect: C:\temp\layouts.json lists the installed layouts. ## layout current Say which keyboard layout the window the person last typed in uses, and whether CapsLock is on - the window a click on the tray icon picks; from a console that is the console. ``` CyrFlip.exe layout current [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `refuse`. Waits at most 2000 ms; answers when the work is done. Another device of your exchange account may ask for it (within what you allowed that device); `--json`, `--result` and paths are never taken from another device. | Option | Kind | Meaning | | --- | --- | --- | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `code` (string) - the two letters the marker shows, for example EN or RU; `klid` (string) - the layout's KLID, for example 00000409; `capsLock` (bool) - whether CapsLock is on. | Exit | Meaning | | --- | --- | | 0 | answered | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 11 | not running, no window to act on (reason target-missing), or busy | | 12 | the running copy runs as administrator and this caller does not | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'layout current --result C:\temp\layout.json' -Wait ``` Expect: C:\temp\layout.json holds {"code":"EN","klid":"00000409","capsLock":false}. ## layout switch Switch the keyboard layout of the window the person last typed in, as a click on the tray icon does - from a console that is the console. ``` CyrFlip.exe layout switch --to [--json] [--result ] ``` Risk: `writes-user-data`. With CyrFlip not running: `refuse`. Waits at most 5000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--to` | string | A language code (en, ru), a KLID (00000409) or next. A code that matches several installed layouts takes the first in Windows' order; give a KLID to be exact. next is the rotation of a click on the tray icon. A layout that is not installed is never added to Windows. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `klid` (string) - the layout now requested; `code` (string) - its code, as layout current spells it; `switched` (bool) - false when that layout was already active, or when next finds only one layout installed. | Exit | Meaning | | --- | --- | | 0 | requested - not proof that the window took it, as with a click on the tray icon - or already active | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | no --to, or a value that names no layout | | 11 | not running, no window to act on (reason target-missing), that layout is not installed (reason target-missing), or busy | | 12 | other programs may not ask for this - the setting is off - or the running copy runs as administrator | Example (cmd): ```bat start /wait CyrFlip.exe layout switch --to en ``` Expect: exit 0 (errorlevel 0); the window the person typed in last now types Latin. ## text convert Convert a text typed in one keyboard layout into what the same keys give in another layout. ``` CyrFlip.exe text convert --text --from --to [--symbols true|false] [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `oneshot`. Waits at most 5000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--text` | string | The text, at most 32768 characters (and 32 KiB as UTF-8, the command line's argument bound). A text whose converted form would not fit in one answer, about 64 KiB, is refused. | | `--from` | string | The layout the text was typed in: a language code or a KLID. A code that matches several installed layouts takes the first in Windows' order; give a KLID to be exact. | | `--to` | string | The layout it should read in; written like from. | | `--symbols` | one of `true`, `false` | Also swap a key that is punctuation in both layouts. true when absent, whatever the setting in CyrFlip says; give the word after it (--symbols false) or after an equals sign (--symbols=false). | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `text` (string) - the converted text; `changed` (bool) - false when nothing in the text had a counterpart. | Exit | Meaning | | --- | --- | | 0 | converted | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | no text, an empty text or one over the limit, a converted text too long to answer, a value that names no layout, a layout that is not installed on this PC (US 00000409 with Russian 00000419 is converted even without the Russian keyboard), or the same layout on both sides | | 11 | busy: a dialog or the first-run tour is open | | 12 | the running copy runs as administrator and this caller does not | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'text convert --text ghbdtn --from en --to ru --result C:\temp\t.json' -Wait ``` Expect: C:\temp\t.json holds {"text":"привет","changed":true}. ## text flip-case Invert the case of every letter of a text - the fix for CapsLock left on. ``` CyrFlip.exe text flip-case --text [--json] [--result ] ``` Risk: `safe`. With CyrFlip not running: `oneshot`. Waits at most 5000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--text` | string | The text, at most 32768 characters (and 32 KiB as UTF-8, the command line's argument bound). | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `text` (string) - the text with each letter's case inverted; `changed` (bool) - false when the text has no cased letter. | Exit | Meaning | | --- | --- | | 0 | flipped | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | no text, an empty text or one over the limit, or a flipped text too long to answer | | 11 | busy: a dialog or the first-run tour is open | | 12 | the running copy runs as administrator and this caller does not | Example (powershell): ```powershell Start-Process .\CyrFlip.exe -ArgumentList 'text flip-case --text "hELLO" --result C:\temp\t.json' -Wait ``` Expect: C:\temp\t.json holds {"text":"Hello","changed":true}. ## screenshot region Let the person choose a part of the screen - the selection appears over whatever they are doing, and Escape cancels it - and save it as a PNG file. With --annotate the chosen part opens in the draw-on-capture editor first, and OK saves the drawn picture under the original capture moment. ``` CyrFlip.exe screenshot region --out [--annotate] [--overwrite] [--clipboard ] [--json] [--result ] ``` Risk: `reads-user-data`. With CyrFlip not running: `refuse`. Waits at most 600000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--out` | path | A file name ending in .png, an existing folder, or a path ending in a backslash; used exactly as given, and a relative path is taken from the caller's working directory. A folder, or a path ending in a backslash, makes CyrFlip name the file screenshot_yyMMdd_HHmmss.png from the moment of the capture (with (2), (3).. when that name is taken). The folder is never created. | | `--overwrite` | bool | Replace the file when it exists. Without it an existing file is left alone and the command exits 11. It has no effect when --out is a folder: an automatic name is never replaced. | | `--annotate` | bool | Open the chosen part in the draw-on-capture editor first: the person draws on it, OK saves the drawn picture, Cancel or Escape saves nothing. The whole run - choosing and drawing - has the 10-minute bound, while the choosing alone still has its own 120 seconds. It needs the draw-on-capture module on, and answers module-off (11) when it is off. | | `--clipboard` | bool | Also put the picture on the clipboard, as the chord does - after the file is saved. Without it the clipboard is not touched. With --annotate the drawn picture is the picture. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `path` (path) - the file written - with --out a folder, the file named inside it; `width` (int) - pixels of the picture written; `height` (int) - pixels of the picture written. | Exit | Meaning | | --- | --- | | 0 | saved | | 1 | the screen could not be captured (reason capture-failed), or the file is saved but another program holds the clipboard (reason clipboard-failed; the answer still names the file) | | 2 | no area was chosen within 120 seconds - the overlay was closed and nothing was written - or, with --annotate, the run was not finished within 10 minutes (the selection and the editor were closed and nothing was written) - or the running copy is older and takes no commands | | 10 | no --out, or --out is not a usable .png file name or folder path | | 11 | not running, the folder does not exist, the file exists and --overwrite was not given (reason exists), a capture is already under way (reason busy), the draw-on-capture module is off with --annotate (reason module-off), or a dialog or the first-run tour is open | | 12 | other programs may not ask for this yet - the setting is off - or the running copy runs as administrator | | 13 | the disk is full | | 14 | the file could not be written, or the folder could not be checked | | 15 | a network share in --out did not answer | | 16 | the person cancelled the selection, or cancelled the editor with --annotate | Example (powershell): ```powershell (Start-Process .\CyrFlip.exe -ArgumentList 'screenshot region --out C:\temp\part.png' -Wait -PassThru).ExitCode ``` Expect: 0 and C:\temp\part.png exists; 16 when the person pressed Escape. ## screenshot full Save all screens, as they are after an optional delay, as a PNG file. The console that ran the command is part of the picture unless --delay-ms lets it move away. ``` CyrFlip.exe screenshot full --out [--overwrite] [--delay-ms ] [--clipboard ] [--json] [--result ] ``` Risk: `reads-user-data`. With CyrFlip not running: `refuse`. Waits at most 60000 ms; answers when the work is done. | Option | Kind | Meaning | | --- | --- | --- | | `--out` | path | A file name ending in .png, an existing folder, or a path ending in a backslash; used exactly as given, and a relative path is taken from the caller's working directory. A folder or a path ending in a backslash is named as for screenshot region. | | `--overwrite` | bool | Replace the file when it exists. Without it an existing file is left alone and the command exits 11. It has no effect when --out is a folder. | | `--delay-ms` | int | Wait this long before the capture, 0 to 30000, so a window can be arranged first. The file's name and time stamp use the moment of the capture, not of the command. | | `--clipboard` | bool | Also put the picture on the clipboard, as the chord does - after the file is saved. Without it the clipboard is not touched. | | `--json` | bool | Print the response line itself. | | `--result` | path | Where to write the response data as JSON. | Data: `path` (path) - the file written - with --out a folder, the file named inside it; `width` (int) - pixels of the whole virtual screen; `height` (int) - pixels of the whole virtual screen. | Exit | Meaning | | --- | --- | | 0 | saved | | 1 | the screen could not be captured (reason capture-failed), or the file is saved but another program holds the clipboard (reason clipboard-failed; the answer still names the file) | | 2 | the running copy is older and takes no commands, or it did not answer in time | | 10 | no --out, --out is not a usable .png file name or folder path, or a delay out of range | | 11 | not running, the folder does not exist, the file exists and --overwrite was not given (reason exists), a capture is already under way (reason busy), or a dialog or the first-run tour is open | | 12 | other programs may not ask for this yet - the setting is off - or the running copy runs as administrator | | 13 | the disk is full | | 14 | the file could not be written, or the folder could not be checked | | 15 | a network share in --out did not answer | Example (cmd): ```bat start /wait CyrFlip.exe screenshot full --out C:\temp\screens\ --delay-ms 3000 ``` Expect: exit 0 (errorlevel 0); a screenshot__