Skip to content

Conversation

@pdecat
Copy link
Contributor

@pdecat pdecat commented Sep 16, 2025

This PR allows installation with tools like pipx:

# pipx install .
  installed package jsonata-python 0.6.0, installed using Python 3.13.3
  These apps are now globally available
    - jsonata
done! ✨ 🌟 ✨

# jsonata -h
usage: jsonata.cli [-h] [-v] [-e <file>] [-i <arg>] [-ic <arg>] [-f {auto,json,string}] [-o <arg>] [-oc <arg>] [-time] [-c] [-b <json-string>] [-bf <file>] [-it] [expr]

Pure Python JSONata CLI

positional arguments:
  expr

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -e, --expression <file>
                        JSON expression to evaluate.
  -i, --input <arg>     JSON input file (- for stdin)
  -ic, --icharset <arg>
                        Input character set (default=utf-8)
  -f, --format {auto,json,string}
                        Input format (default=auto)
  -o, --output <arg>    JSON output file (default=stdout)
  -oc, --ocharset <arg>
                        Output character set (default=utf-8)
  -time                 Print performance timers to stderr
  -c, --compact         Compact JSON output (don't prettify)
  -b, --bindings <json-string>
                        JSONata variable bindings
  -bf, --bindings-file <file>
                        JSONata variable bindings file
  -it, --interactive    Interactive REPL (requires input file)

Without this change:

# pipx install jsonata-python

No apps associated with package jsonata-python or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead.

@pdecat pdecat marked this pull request as draft September 16, 2025 14:50
@pdecat pdecat marked this pull request as ready for review September 16, 2025 14:54
@pdecat pdecat changed the title Add script to allow installation with pipx Add script to allow installation with pipx and simplify CLI usage Sep 16, 2025
Copy link
Owner

@rayokota rayokota left a comment

Choose a reason for hiding this comment

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

Thanks @pdecat , LGTM

@rayokota rayokota merged commit 7c524a3 into rayokota:master Sep 24, 2025
15 checks passed
@pdecat pdecat deleted the feat/cli branch September 24, 2025 06:45
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