Skip to content

Clarify -o/-O help text and fix two log messages - #128

Open
TalLevAmi wants to merge 1 commit into
masterfrom
fix/help-and-log-text
Open

TalLevAmi wants to merge 1 commit into
masterfrom
fix/help-and-log-text

Conversation

@TalLevAmi

Copy link
Copy Markdown
Contributor

Small text fixes found in a usability review of the CLI.

Brief Summary of Changes

  • -o, --optional_parameter and -O, --optional_parameter_parsed in admin, uploader, provisioning, utils, upload_dir and sync: the help says that -o does not parse the value and that -O parses it as JSON or a boolean, with an example for each. Before, the help said "raw strings" and "interpreted strings".
  • migrate -v: add help text (Log each migrated URL.).
  • upload_dir: the log line was Uploading directory '...' (two spaces) when -e was not set.
  • sync --pull: the log line Preparing to download N items from Cloudinary folder had no folder name. It now shows the folder, as the other sync lines do.

What does this PR address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are tests included?

  • Yes
  • No

Reviewer, please note:

  • Text only. No behavior change.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.

Local test run: I ran the full suite on Python 3.8 with Click 8.1.8. No test asserts these strings. 8 tests in test_cli_agent.py and test_cli_config_oauth.py fail with stderr not separately captured on this branch and on master too. These tests need Click 8.2, which needs Python 3.10 or later. CI must confirm the full result.

🤖 Generated with Claude Code

- `-o` and `-O` help: say what each option does to the value, and give
  an example. "Raw strings" and "interpreted strings" did not tell users
  which one to use.
- `migrate -v`: add help text.
- `upload_dir`: remove the double space in `Uploading  directory`.
- `sync --pull`: add the folder name to `Preparing to download N items
  from Cloudinary folder`, which ended with a space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TalLevAmi
TalLevAmi marked this pull request as ready for review September 26, 2026 16:16

@const-cloudinary const-cloudinary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TalLevAmi, please improve description of some of the parameters, they can be misleading, especially for naive LLMs

help="Pass an optional parameter as a string, with no parsing. e.g. -o tags a,b")
@option("-O", "--optional_parameter_parsed", multiple=True, nargs=2,
help="Pass optional parameters as interpreted strings.")
help="Pass an optional parameter and parse its value as JSON or a boolean. e.g. -O context '{\"alt\": \"cat\"}'")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example is misleading, provisioning commands do not support context parameter.

@argument("params", nargs=-1)
@option("-o", "--optional_parameter", multiple=True, nargs=2, help="Pass optional parameters as raw strings.")
@option("-o", "--optional_parameter", multiple=True, nargs=2,
help="Pass an optional parameter as a string, with no parsing. e.g. -o tags a,b")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example is misleading, provisioning commands do not support tags parameter.

help="Pass an optional parameter as a string, with no parsing. e.g. -o tags a,b")
@option("-O", "--optional_parameter_parsed", multiple=True, nargs=2,
help="Pass optional parameters as interpreted strings.")
help="Pass an optional parameter and parse its value as JSON or a boolean. e.g. -O context '{\"alt\": \"cat\"}'")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example is misleading, utils commands do not support context parameter.

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