Utilities
Standalone helpers that don’t belong to the build journey but are handy to know: file encryption, password generation and hashing, form-control detection in images, templating, localization, and synthetic data. Each is small and self-contained.
kis encrypt
Section titled “kis encrypt”What it is. Encrypts a file with AES-256-CBC.
kis encrypt -i secret.txt -o secret.enc -k "my passphrase"-i/--in,-o/--out,-k/--pass. Pairs withdecrypt.
kis decrypt
Section titled “kis decrypt”What it is. Decrypts a file produced by encrypt (AES-256-CBC).
kis decrypt -i secret.enc -o secret.txt -k "my passphrase"- Same
-i/--in,-o/--out,-k/--passflags asencrypt.
kis password
Section titled “kis password”What it is. Generates passwords and passphrases, and hashes them with Argon2 for storage.
When to reach for it. Seeding a credential, or producing the hash a service stores rather than inventing your own hashing.
kis password generate # a six-word passphrasekis password generate -m random -n 24 # 24 random characterskis password generate -c 5 --json # five of them, as JSONkis password argon2 'correct horse' # hash for storagekis password verify --hash '$argon2id$...' 'correct horse'kis password gen-argon2 # generate and hash in one call| Subcommand | What it does |
|---|---|
generate | A password or passphrase |
argon2 [password] | Hash a password for storage |
verify --hash <stored> [password] | Check a password against a stored hash |
gen-argon2 | Generate and hash in one call |
generate flags:
| Flag | Default | Meaning |
|---|---|---|
-m, --method | words | words, random, pronounceable, pin, hex, base64, base58 |
-c, --count | 1 | How many to generate |
-n, --length | varies | Length in characters, for the character methods |
-w, --words | 6, or 3 for pronounceable | Words or chunks |
-s, --separator | - | Between words |
--case | lower | lower, upper, title, camel, random |
--digits, --symbols | 0 | Append this many, for words and pronounceable |
--json | off | Emit JSON |
argon2 and gen-argon2 take the cost parameters: --memory (KiB, or 64MiB, 1GiB),
-t, --time, -p, --parallelism, --hash-length, --salt-length. Leave them alone unless you
have measured on the hardware that will verify.
kis image
Section titled “kis image”What it is. Pixel-level detection of form controls in an image: checkboxes and radio buttons, with their states, as JSON.
When to reach for it. Reading a scanned or photographed form where the control state is in the pixels rather than in any text layer. It pairs with the document and OCR commands, which give you the text.
kis image checkbox scan.png # states as JSON on stdoutkis image radiobutton scan.png -o out.json # to a filekis image checkbox scan.png --annotate # also writes scan.png.controls.png--annotate outlines what was found: green for checked, red for unchecked, which is the fastest way
to see why a detection went the way it did.
| Flag | Default | Meaning |
|---|---|---|
-o, --output | stdout | Output file |
--annotate | off | Write <input>.controls.png with detections outlined |
--min-size, --max-size | 10, 100 | Control side or diameter, in pixels |
--min-confidence | 0.5 | Drop detections below this |
--fill-threshold | 0.07 checkbox, 0.12 radio | Interior ink ratio at or above which a control counts as set |
radiobutton additionally takes --max-stroke-ratio (default 0.15), which rejects rings whose
stroke is thick relative to their diameter, and --no-isolation, which keeps ring candidates that
have ink on both sides. The isolation check is what stops letters inside a word being read as radio
buttons, so turn it off only when a form legitimately places controls tight against text.
kis liquid
Section titled “kis liquid”What it is. Renders a Liquid template with variables from a file and/or the command line.
When to reach for it. Generating config, emails, or any text file from a template.
kis liquid -t template.liquid -v vars.yaml -o output.txtkis liquid -t email.liquid -c name=Ajith -c plan=pro -o email.html-t/--template,-v/--varFile(YAML),-c/--vars(inlinekey=value),-o/--outputfile.
kis i18n
Section titled “kis i18n”What it is. Consumes kis.ai i18n files and produces FTL (Fluent) localization
files. Point it at your product’s i18n folder.
kis i18n -d ./i18nThat’s the whole command, -d/--dir defaults to the current folder.
kis synthetic
Section titled “kis synthetic”What it is. Generates synthetic (fake) data, integers, floats, words, sentences, and templated/synonym variants.
When to reach for it. Seeding tests, demos, or load fixtures. Set the quantity
with -c/--count.
kis synthetic int -c 5kis synthetic float32 -c 3kis synthetic word -c 10kis synthetic sentence -c 2kis synthetic supportedcollection # list available data collectionsTemplated and synonym variants also exist: fuzzyword, sentencewithtemplate,
fuzzysentence, synonymsentence, fuzzysynonymsentence.
That’s the full kis surface. Head back to the Introduction for
the command map, or jump to any command from the sidebar.