Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rules browse --help example includes unknown json option #151

Closed
jsonmorris opened this issue Mar 22, 2024 · 1 comment · Fixed by #152
Closed

rules browse --help example includes unknown json option #151

jsonmorris opened this issue Mar 22, 2024 · 1 comment · Fixed by #152
Labels
documentation Improvements or additions to documentation

Comments

@jsonmorris
Copy link

jsonmorris commented Mar 22, 2024

overview

It looks like the help output for rules browse contains an outdated example. The documentation for the -o output option provides a viable alternative, but the CLI help and the website docs are misleading.

reproducable example

$ algolia --profile dev rules browse dev --help
List all the rules of an index

Usage:
  algolia rules browse <index> [flags]

Flags:
  -h, --help   help for browse

Output Formatting Flags
      --allow-missing-template-keys   If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
  -o, --output string                 Output format. One of: (json, jsonpath, jsonpath-as-json, jsonpath-file). (default "json")
      --template string               Template string or path to template file to use when --output=jsonpath, --output=jsonpath-file.

Inherited Flags
      --api-key string          The API key
      --application-id string   The application ID
  -p, --profile string          The profile to use
      --search-hosts strings    The list of search hosts as CSV

Examples
  # List all the rules of the "MOVIES" index
  $ algolia rules browse MOVIES

  # List all the rules of the "MOVIES" index and save them to a 'rules.ndjson' file
  $ algolia rules browse MOVIES --json > rules.ndjson

Learn More
  Use 'algolia <command> <subcommand> --help' for more information about a command.
  Read the documentation at https://algolia.com/doc/tools/cli/


$ algolia --profile dev rules browse dev --json > rules/dev.ndjson
unknown flag: --json

expected behavior

Either --json works as described, or the example is replaced with one of the existing -o options.

@clemfromspace clemfromspace added the documentation Improvements or additions to documentation label Mar 25, 2024
@clemfromspace
Copy link
Contributor

clemfromspace commented Mar 25, 2024

@jsonmorris Thanks for the detailed issue, the command example is indeed misleading.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants