LinuxCommandLibrary

circup

Manage CircuitPython libraries on connected devices

TLDR

Interactively update modules on a device

$ circup update
copy

Install a new library
$ circup install [library_name]
copy

Search for a library
$ circup show [partial_name]
copy

List all libraries on a connected device in requirements.txt format
$ circup freeze
copy

Save all libraries on a connected device in requirements.txt in current directory
$ circup freeze [[-r|--requirement]]
copy

SYNOPSIS

circup [OPTIONS] COMMAND [ARGS]...

Commands: bundle, cp, delete, i|install, ls|list, pin, reqs, search, show, u|update

PARAMETERS

-d, --device TEXT
    Target device path (e.g. /media/CIRCUITPY)

-l, --lib-path DIRECTORY
    Library path on device (default: lib)

--offline / --no-offline
    Use local library index (default: online)

--index-url TEXT
    Custom library index URL

-v, --verbose
    Enable verbose logging

--version
    Display circup version

--help
    Show help message and exit

DESCRIPTION

Circup is a Python-based command-line tool for CircuitPython, enabling easy management of libraries on connected microcontroller boards. CircuitPython devices appear as USB mass storage (e.g., /media/CIRCUITPY on Linux), and circup automates installing, updating, listing, searching, and removing libraries from the device's lib folder.

It queries Adafruit's library index for metadata, handles dependencies, and supports bundling requirements into requirements.txt files for offline use. Users connect their board, run commands like circup install neopixel, and libraries are downloaded and copied automatically. This eliminates manual ZIP extractions and file transfers.

Ideal for makers and developers, circup requires Python 3.7+, pip installation (pip3 install circup), and USB access. It offers verbose mode, custom device paths, and offline operation for portability. Actively maintained by Adafruit, it streamlines workflows for IoT projects using sensors, displays, and more.

CAVEATS

Requires connected CircuitPython device with writable lib folder; sudo may be needed for USB on some systems. Not for standard Python package management.

INSTALLATION

pip3 install --upgrade circup (Linux: use pip3, ensure USB rules allow user access)

EXAMPLE USAGE

circup update (updates all libs)
circup install adafruit-circuitplayground
circup ls (lists installed libs)

HISTORY

Developed by Adafruit for CircuitPython (2017+ ecosystem); first circup release ~2019, Python 3 rewrite in v1.7 (2021), ongoing updates for new libraries/indexes.

SEE ALSO

pip(1), lsblk(1), mount(8)

Copied to clipboard