The Language of Mantis
Mantis — Karvi Device Compiler · v1.1Every Mantis payload is written in the Language of Mantis — Mantis for short
(Karvi Device Compiler), the scripting language behind every .mantis file.
If you’ve used a USB Rubber Ducky before, the syntax will feel immediately
familiar: short, uppercase commands, one per line, read top to bottom.
The important difference is what happens to your script before it ever reaches the device. Mantis is a compiled language, not an interpreted one — when you hit Compile, Karvi Studio (the desktop IDE) checks your script for errors and turns it into compact bytecode on your computer. Only that bytecode is uploaded and stored on Mantis; the human-readable script text never touches the device. This is the same Host-Compiled Bytecode Architecture (HCBA) described in the hardware documentation, and it’s why Mantis can run fairly complex payloads on a microcontroller with no script parser of its own.
This document covers version 1.1 of the language — the version that ships
with FUNCTION and BUTTON_DEF support.