# greatscottgadgets/luna

Amaranth HDL framework for monitoring, hacking, and developing USB devices

Repository: https://github.com/greatscottgadgets/luna
Canonical: https://ross.abutalabs.com/products/greatscottgadgets-luna
Homepage: https://greatscottgadgets.com/cynthion/
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: fpga, usb, hardware
Last push: 2026-08-19T14:51:48+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 32, longevity 100
- inputs: {"age_days": 2512, "days_push": 14, "days_rel": 376, "gap_med": 68, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1133, forks 185 (observed 2026-08-28T04:03:43.024243+00:00)

## What it is
LUNA is an Amaranth HDL (Python) framework providing FPGA gateware and software for working with USB, from passive protocol analysis to building custom USB devices and SoC peripherals. It pairs with Cynthion hardware and tools like Facedancer and Packetry for USB research, hacking, and development.

## Use cases
- capture and analyze low/full/high-speed USB traffic with an FPGA
- implement a custom USB device in gateware or software
- add USB peripherals to a SoC design over Wishbone
- reverse engineer USB devices for security research
- emulate USB devices with Facedancer as a backend
- build a USB man-in-the-middle proxy

## When to choose
- you need programmable FPGA-based USB analysis or emulation
- you want to write USB gateware in Python via Amaranth instead of Verilog
- you use Cynthion or compatible FPGA hardware for USB work

## When to avoid
- you only need software-only USB sniffing on a standard host controller
- your target FPGA or USB speed (e.g. SuperSpeed) is not yet supported
- you need a turnkey analyzer without any HDL involvement

## Facets
- artifact type: library
- maturity: active
- function: embedded, security, reverse-engineering, simulation, developer-tools
- domain: hardware, embedded-systems, security, reverse-engineering, developer-tools
- platform: python, embedded
- tags: fpga, usb, amaranth-hdl, gateware, protocol-analyzer, hardware-hacking, soc, wishbone

## Member repositories
- greatscottgadgets/luna (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:43.024243+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:37:26.509770+00:00, confidence not recorded.
  - readme: https://github.com/greatscottgadgets/luna (fetched 2026-08-28T04:03:43.024243+00:00, sha 7cab95a015fa)
  - homepage: https://greatscottgadgets.com/cynthion/ (fetched 2026-08-29T12:42:18.752908+00:00, sha aa2e49e45a91)
  - site_page: https://greatscottgadgets.com/about (fetched 2026-08-29T12:42:18.762480+00:00, sha ecbb3daf826d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
