A desktop inventory system for electronic parts, built around one goal: rapidly cataloguing a large collection of parts using a barcode scanner. Scan the MPN and supplier PN off the bag, hit enter, and the part is looked up via Mouser/DigiKey API and saved — no typing required.
Note: This project was built with Claude Code to fit my personal needs. It is experimental, hasn't been well tested or reviewed, and is shared as-is. Use at your own risk. Tested on Linux only.
- Barcode scanner workflow — scan MPN → Supplier PN → Quantity, Enter advances between fields, screen stays open for the next part
- Camera bag scanning — point a webcam at a Mouser, DigiKey, or LCSC bag; 2D barcode is decoded automatically, supplier auto-selected, and form fields filled in
- Mouser and DigiKey lookup — fetches description, price breaks, datasheet, image automatically
- SQLite-backed storage with automatic Alembic migrations
- WYSIWYG label designer with ZPL output for Zebra label printers
- Sortable, resizable parts table with search
- Part detail panel with image support
- Multiple qt-material themes
- Python 3.11+
- Linux (only tested platform)
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Or install dependencies manually:
pip install PySide6 SQLAlchemy alembic qt-material requests Pillow python-barcode zplgrf zxing-cpp opencv-python-headlessPYTHONPATH=. .venv/bin/python main.pyThe database is stored at ~/.mcubin/inventory.db and migrations run automatically on launch.
- Go to mouser.ca/api-search and click Sign Up for Search API
- In mcubin: Suppliers → Add supplier → select Mouser → enter your API key
- Go to developer.digikey.com and create a production app (not sandbox)
- Subscribe to both Product Information V4 and Barcode APIs
- In mcubin: Suppliers → Add supplier → select DigiKey → enter Client ID and Client Secret
The Scan Bag button (Add Part screen) opens a live camera feed. Hold a supplier bag up to the camera — the 2D barcode is decoded automatically, the correct supplier is selected, and MPN/quantity are filled in. Supported formats:
| Supplier | Format | Fields decoded |
|---|---|---|
| Mouser | DataMatrix | MPN, Qty |
| DigiKey | DataMatrix | MPN, Qty |
| LCSC | QR Code | LCSC PN, MPN (partial) |
- Install system dependencies:
sudo apt install libzbar0 sudo usermod -aG video $USER # log out and back in after
- In mcubin: Settings → Camera → select your webcam
The label designer (Labels tab) renders to ZPL and sends output to a USB-connected Zebra printer (tested with ZP 450). The printer device path defaults to /dev/usb/lp0 and can be changed under Settings → Label Printing.
Add your user to the lp group to allow writing to /dev/usb/lp0 without sudo:
sudo usermod -aG lp $USERLog out and back in for the change to take effect.
| File | Path |
|---|---|
| Database | ~/.mcubin/inventory.db |
| Config | ~/.mcubin/config.json |
| Label templates | ~/.mcubin/templates/ |
| Part images | ~/.mcubin/images/ |
GPL v3. See LICENSE.
# After editing mcubin/models.py:
PYTHONPATH=. .venv/bin/alembic revision --autogenerate -m "describe change"
PYTHONPATH=. .venv/bin/alembic upgrade head

