CLI Reference¶
Romulan provides two interfaces: the standard workflow (build/upload flags) and the hardware subcommands (framed v1 protocol).
Standard workflow¶
uv run romulan [input] [--build] [--upload] [-o OUTPUT] [--port PORT]
Argument / Flag |
Description |
Default |
|---|---|---|
|
Annotated hex dump or 6502 assembly file (format auto-detected; required with |
— |
|
Build a |
— |
|
Upload the ROM via the framed Hardware API |
— |
|
Output ROM binary path |
|
|
Serial port (auto-detected if omitted) |
auto-detect |
|
Idle timeout in seconds with no framing progress (upload) |
|
|
Print Hardware API NDJSON traces during |
— |
At least one of --build or --upload is required.
Examples¶
# Build only
uv run romulan program.txt --build
# Build from 6502 assembly
uv run romulan program.s --build
# Build and upload
uv run romulan program.txt --build --upload
# Upload an existing binary
uv run romulan --upload
# Custom output path
uv run romulan program.txt --build -o output/rom.bin
Hardware subcommands¶
uv run romulan hardware <subcommand> [--port PORT] [--verbose]
Subcommand |
Arguments |
Description |
|---|---|---|
|
|
Upload a ROM binary via the framed protocol |
|
|
Capture CPU bus cycles until STP or limit |
|
|
Toggle JSON monitor output |
|
|
Hold or release CPU reset |
|
— |
Read the current CPU address |
|
|
Read ROM-image bytes ( |
Flag |
Description |
Default |
|---|---|---|
|
Idle timeout in seconds with no framing/capture progress |
|
|
Print every JSON message sent and received |
— |
Examples¶
uv run romulan hardware upload bin/rom.bin --verbose
uv run romulan hardware capture --max-cycles 500
uv run romulan hardware reset --assert
uv run romulan hardware reset --release
uv run romulan hardware monitor --disable
uv run romulan hardware request-addr
uv run romulan hardware peek --offset 0x7000 --count 16
uv run romulan hardware peek --addr 0x4000
Output format¶
All CLI output follows the v1 JSON-lines schema (see Hardware API — Output schema): results and streamed events are NDJSON on stdout, errors are NDJSON on stderr.
{"v":1,"type":"result","cmd":"request_addr","data":{"addr":"8000"}}
Verbose output¶
When --verbose is set on a hardware command, each protocol exchange is logged to stderr as NDJSON events:
{"v":1,"type":"event","event":"call","data":{"method":"request_addr"}}
{"v":1,"type":"event","event":"send","data":{"payload":{"v":1,"cmd":"request_addr","id":"abc123"}}}
{"v":1,"type":"event","event":"ack"}
{"v":1,"type":"event","event":"ack"}
{"v":1,"type":"event","event":"recv","data":{"payload":{"v":1,"ok":true,"addr":"8000"}}}
{"v":1,"type":"event","event":"ret","data":{"method":"request_addr","result":32768}}
See Hardware API for protocol details.