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

docs(readme): update installation instructions #713

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Only metadata such as call time, request size and scan mode is stored from scans
- [Installation](#installation)
- [macOS - Using Homebrew](#macos---using-homebrew)
- [Linux packages](#linux-packages)
- [Other Operating Systems - Using pip](#other-operating-systems---using-pip)
- [Other Operating Systems - Using pipx or pip](#other-operating-systems---using-pipx-or-pip)
- [Installing](#installing)
- [Updating](#updating)
- [Initial setup](#initial-setup)
Expand Down Expand Up @@ -59,12 +59,20 @@ Setup instructions:
- [Deb packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-deb)
- [RPM packages](https://cloudsmith.io/~gitguardian/repos/ggshield/setup/#formats-rpm)

## Other Operating Systems - Using pip
## Other Operating Systems - Using pipx or pip

### Installing

The recommended way to install `ggshield` is to use [pipx](https://pypa.github.io/pipx/), which will install it an isolated environment:

```shell
$ pipx install ggshield
```

Alternatively, you can install with pip as a user package. This will not work if your Python installation is declared as externally managed (for example when using the system Python on operating systems like Debian 12):

```shell
$ pip install ggshield
$ pip install --user -U ggshield
```

`ggshield` supports **Python 3.8 and newer**.
Expand All @@ -73,10 +81,16 @@ The package should run on MacOS, Linux and Windows.

### Updating

To update `ggshield` you can add the option `-U/--upgrade` to the pip install command.
To update `ggshield` when installed with pipx:

```shell
$ pipx upgrade ggshield
```

If you installed `ggshield` with pip, you can add the option `-U/--upgrade` to the pip install command to update:

```shell
$ pip install -U ggshield
$ pip install --user -U ggshield
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we explain how to install with pipx then we must also explain how to upgrade with it here.

```

# Initial setup
Expand Down