Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add pyproject.toml, allowing for pipx install from github #34

Closed
wants to merge 1 commit into from

Conversation

Jasha10
Copy link

@Jasha10 Jasha10 commented May 17, 2023

This PR adds a pyproject.toml file to the project, which enables the project
to be installed via pip or pipx. This means users won't have to fiddle
around with cloning the repo and installing the dependencies manually.

In addition to adding pyproject.toml, this PR also:

  • renames gpt.py to gptcli/__main__.py
  • creates a new convenience executable shell script gpt at the top level of the project
  • Adds an argument prog="gpt" to the ArgumentParser in __main__.py. This way running gpt --help will display the correct program name gpt instead of displaying __main__.

Testing

To test this out using pipx or pip, run the following commands to install from
the to-upstream branch on my fork of this repo.

# using pipx
$ pipx install git+https://github.com/jasha10/gpt-cli@to-upstream
$ gpt
Hi! I'm here to help. ...

Copy link
Owner

@kharvd kharvd left a comment

Choose a reason for hiding this comment

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

Very nice, thanks!

@kharvd
Copy link
Owner

kharvd commented Jul 9, 2023

Ended up incorporating the changes separately here #46

@kharvd kharvd closed this Jul 9, 2023
@Jasha10 Jasha10 deleted the to-upstream branch July 11, 2023 17:56
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.

None yet

2 participants