# CLI Cheat Sheet, Address Formats & Common Gotchas

> **FrameAssembly v3.2.2** · Workflow Guide 06 · Canonical URL: https://frameassembly-lang.dev/docs/cli-and-file-format

Every `frameassembly` v3.2.2 terminal command, accepted IP/MAC/OID format, typo fix, and why `.frasm` has nothing to do with x86 CPU assemblers.

## Key Takeaways

- Positional paths all the way: `frameassembly in.frasm [out.pcap|.pcapng]`, `show`, `reverse`, `update`, `help`, `version` — zero `-o` flags, zero `compile` subcommand, zero flags on `update`.
- Paste MACs straight out of Cisco IOS (`001a.2b3c.4d5e`), Windows (`00-1A-2B-3C-4D-5E`), or Linux (`00:1a:2b:3c:4d:5e`).
- `.frasm` = FrameAssembly packet captures (`text/vnd.frameassembly`), completely distinct from `.asm` CPU assembly files.

## 1. Every CLI Command on One Card (`v3.2.2`)

The `frameassembly` binary is a single static Rust executable on Windows, macOS, and Linux — zero Python, zero libc drama, zero network permissions:

```bash
# Compile -> inspect in tshark -> round-trip reverse back to .frasm
frameassembly lab.frasm lab.pcapng
tshark -r lab.pcapng
frameassembly reverse lab.pcapng lab_copy.frasm
```

| Command | What Happens |
| --- | --- |
| `frameassembly demo.frasm` | Compiles `demo.frasm -> demo.pcap` in the same directory. |
| `frameassembly demo.frasm out.pcap` | Compiles `demo.frasm -> out.pcap` (microsecond libpcap `0xa1b2c3d4` for `tcpdump`, `tcpreplay`, Suricata, and Zeek). |
| `frameassembly demo.frasm out.pcapng` | Compiles `demo.frasm -> out.pcapng` (nanosecond `IfTsResol=9` for Wireshark and `tshark`). |
| `frameassembly show demo.frasm` | Validates and prints the relative-timestamp packet ladder to stdout without writing files. |
| `frameassembly reverse capture.pcap [out.frasm]` | Reverses `.pcap` or `.pcapng -> .frasm` (`host1`, `host2`, ...). |
| `frameassembly update` | Strictly zero-flag self-updater: tries Cargo/`rustup` first (`rustc >= 1.89` & linker preflight), then falls back to SHA-256-verified GitHub Release binaries. |
| `frameassembly help [subcommand]` / `frameassembly version` | Prints CLI usage or `frameassembly 3.2.2`. |

## 2. IP, MAC, Hex & OID Formats You Can Paste Directly

Copy-paste addresses straight from `show mac address-table`, `ipconfig /all`, or `ip addr` without reformatting:

| Literal Type | Valid Examples | Notes |
| --- | --- | --- |
| User names (`host`, `flow`) | `client`, `Core_SW_1`, `fw-dmz-01` | Letters, digits, underscores, and internal hyphens. |
| IPv4 & IPv6 literals | `10.0.0.1`, `2001:db8::1`, `fe80::1` | Plain host addresses — no `/24` or `/64` prefix lengths. |
| Ethernet MAC literals | `00:1a:2b:3c:4d:5e`, `00-1A-2B-3C-4D-5E`, `001a.2b3c.4d5e` | Auto-derived when omitted (`00:00:00:00:00:01`, RFC multicast MACs, or IEEE L2 group MACs). |
| Integers & hex numbers | `443`, `0x0806`, `0x1a2b` | Decimal or `0x` hex; signed negatives allowed on `ntp precision`, `ldap msgid`, `kerberos etype`, and SNMP `int`. |
| Hex byte strings | `hexpayload "deadbeef"`, `hexpayload "de:ad:be:ef"` | Even-length hex octets (spaces or colons fine); mutually exclusive with `payload "..."`. |
| SNMP OIDs | `1.3.6.1.2.1.1.1.0` or `.1.3.6.1.2.1.1.1.0` | Unquoted numeric trees (>= 2 arcs) or double-quoted strings. |

## 3. Six Muscle-Memory Typos & Their Instant Fixes

Mistype a keyword and the compiler’s edit-distance suggester usually tells you the exact fix (`Did you mean echorequest?`). Here are the top six classics:

| Muscle-Memory Typo | Valid v3.2.2 `.frasm` / CLI | Why |
| --- | --- | --- |
| `a -> b icmp echo_request` | `a -> b icmp echorequest` | Built-in keywords are strictly `[a-z0-9]+` with zero underscores. |
| Standalone `wait 10ms` line | `a -> b icmp echorequest wait 10ms` | `wait` is a post-packet suffix on the frame that precedes the gap. |
| `a -> b tcp ack 1001` | `a -> b tcp ack acknum 1001` | Bare `ack` = ACK flag bit; `acknum` = 32-bit acknowledgment number. |
| `a -> b http get host "x.test"` | `a -> b http get hosthdr "x.test"` | `host` declares top-level boxes; `hosthdr` sets HTTP / SSDP `Host:`. |
| `flow ping { ... }` or `loop 5 { ... }` | `flow ping(a, b) { ... }` called inside `compile { ... }` | `flow` always takes parameters in parentheses; repeat calls in `compile` instead of `loop`. |
| `frameassembly update --check` / `--force` | `frameassembly update` | `update` takes strictly zero flags — run it bare to self-update via Cargo or a SHA-256-verified release binary. |

## 4. Name Check: `.frasm` (Packets) vs. `.asm` (x86 Assembly)

FrameAssembly uses `.frasm` (`text/vnd.frameassembly`) to create and reverse network packet captures (`.pcap <-> .pcapng`). It has zero connection to x86/x86-64 CPU assemblers (`.asm`, `;` comments) or FPGA hardware bitstream tile files.

## 5. `.pcap` vs. `.pcapng` (`IfTsResol=9`) Downstream Tool Compatibility

Pick your output extension based on the tool reading the file next (`frameassembly in.frasm out.pcap` vs. `out.pcapng`):

| Downstream Tool | Classic `.pcap` (`0xa1b2c3d4`, `1 µs`) | Nanosecond `.pcapng` (`IfTsResol=9`, `1 ns`) | Practitioner Recommendation |
| --- | --- | --- | --- |
| Wireshark & `tshark` (`3.x` / `4.x`) | Full support (`1 µs` display) | Native `0.000000001 s` display | Prefer `.pcapng` when inspecting `ns` bursts or IEEE 1588v2 `ptp` sync loops. |
| `tcpdump` (`libpcap 1.10+`) | Native default across all OSes | Supported on modern `libpcap`; older BSD builds prefer `.pcap` | Prefer `.pcap` for portable SSH/container CLI pipelines. |
| `tcpreplay` & `tcpprep` (`4.4+`) | Primary supported input format | Limited / build-dependent (`tcpprep` expects classic libpcap) | Always compile `.pcap` before two-NIC `tcpprep` + `tcpreplay` hardware replay. |
| Suricata (`7.x+`), Zeek (`6.x+`) & Snort 3 | Universal offline `-r` support | Supported in Suricata 7+ / Zeek via modern `libpcap` | Prefer `.pcap` for maximum CI container compatibility unless testing `ns` timers. |

## Frequently Asked Questions

### How do I stop ChatGPT / Claude / Gemini from inventing fake underscored keywords?

Grab `llms-full.txt` from the top navbar (`https://frameassembly-lang.dev/llms-full.txt`) and drop it into your prompt. It hands the LLM the exact v3.2.2 grammar and all 81 protocol modifiers so it stops hallucinating `echo_request` or `-o` flags.
