Skip to content

Offline mode#277

Closed
kamocat wants to merge 4 commits into
adafruit:mainfrom
kamocat:offline
Closed

Offline mode#277
kamocat wants to merge 4 commits into
adafruit:mainfrom
kamocat:offline

Conversation

@kamocat

@kamocat kamocat commented May 29, 2026

Copy link
Copy Markdown
  • Adds support for existing "--offline" option
  • Adds bundle-extract command to import a downloaded bundle (i.e. from circuitpython.org). Unfortunately, this breaks the dependency management. I am interested in ideas for how to fix this.

Offline Mode (--offline) Behaviour by Command

Command --offline behaviour
install Reads module list and resolves dependencies from local bundle only; no GitHub/PyPI calls. --stubs is silently skipped. Fails with "not a known library" if no bundle is extracted locally.
update Compares device versions against local bundle; no GitHub calls. Post-update dependency check also uses local bundle. Will report everything as up-to-date if the local bundle tag is older than what's on the device.
list Compares device versions against local bundle; no GitHub calls. Same caveat on stale local bundle.
freeze Lists modules found on device with their installed versions; uses local bundle for version metadata. No network calls.
show Always reads from local bundle only (no download regardless of --offline). No change in behaviour.
uninstall No bundle or network access at all. No change in behaviour.
example Always reads from local bundle only (avoid_download=True unconditionally). No change in behaviour.
bundle-show Always reads from local bundle only. No change in behaviour.
bundle-add Blocked — exits immediately with an error message when --offline is set.
bundle-remove No network calls. No change in behaviour.
bundle-extract No network calls (local zip only). No change in behaviour.
bundle-freeze Reads from local bundle only (avoid_download=True unconditionally). No change in behaviour.

Notes applicable to all commands when --offline is set:

  • The circup self-update check is skipped.
  • The CircuitPython firmware latest-version check is skipped.
  • If no bundle has been extracted locally, commands that need module metadata will fail or return empty results. Use circup bundle-extract <zip> first.
  • Dependency resolution requires the py bundle to be extracted (the mpy zips do not include a requirements/ directory).

@kamocat kamocat closed this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants