Skip to content

cli: make all variables found from environment variables#109

Open
mikebentley15 wants to merge 1 commit into
scientifichackers:masterfrom
mikebentley15:all-option-envars
Open

cli: make all variables found from environment variables#109
mikebentley15 wants to merge 1 commit into
scientifichackers:masterfrom
mikebentley15:all-option-envars

Conversation

@mikebentley15
Copy link
Copy Markdown

Description

The python click module is pretty cool. I've not seen in before this project and I like it.

One feature of click is to make every option and parameter able to be specified by an environment variable.

https://click.palletsprojects.com/en/8.0.x/options/?highlight=auto_envvar_prefix

This was a very simple change to make, but I've found it quite nice, especially with the extra command-line arguments I've been giving the commands like in PR #107 and PR #108, among others that I have done in my fork.

curiouswala added a commit that referenced this pull request Apr 16, 2026
…ii fallback

- PR #111: fall back from ubinascii to binascii in the MicroPython-side
  get command, for forward compatibility with firmware that removes ubinascii
- PR #109: add auto_envvar_prefix='AMPY' to the Click group so any future
  option automatically gets an AMPY_* env var without explicit envvar= params
- PR #107: get now accepts multiple remote files via nargs=-1 and saves them
  to a local directory with --output/-o; rm now accepts multiple files
- PR #93: put shows a click progress bar by default; suppress with --no-progress.
  Progress callback added to files.Files.put() for library users

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant