Skip to content

Commit 5d86ef7

Browse files
docs: update README with auth commands and usage examples
- Add authentication section with login examples (browser, token, enterprise) - Document OIDC authentication for GitHub Actions - Expand command reference with subcommand details - Add auth, config, issues, and repo subcommand descriptions
1 parent 22b182a commit 5d86ef7

1 file changed

Lines changed: 36 additions & 3 deletions

File tree

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ This script will detect the operating system and architecture and puts deepsourc
4141
In order to report test-coverage to DeepSource using the `report` command, an environment variable named as `DEEPSOURCE_DSN` has to
4242
be set. It's value will be available under 'Settings' tab of the repository page.
4343

44+
## Authentication
45+
46+
Log in to DeepSource using the CLI:
47+
48+
```sh
49+
# Browser-based login (interactive)
50+
deepsource auth login
51+
52+
# Token-based login (for CI/CD or non-interactive environments)
53+
deepsource auth login --with-token
54+
55+
# For DeepSource Enterprise instances
56+
deepsource auth login --hostname HOSTNAME
57+
```
58+
59+
For GitHub Actions, the `report` command supports [OIDC authentication](https://docs.deepsource.com/docs/guides/setup-test-coverage#with-github-actions-ci-using-oidc):
60+
61+
```sh
62+
deepsource report --analyzer test-coverage --key go --value-file ./cover.out --use-oidc
63+
```
64+
4465
## Usage
4566

4667
The CLI provides access to a wide range of commands. Here is a list of the
@@ -52,10 +73,22 @@ Usage:
5273
5374
Available commands are:
5475
auth Authenticate with DeepSource
76+
login Log in to DeepSource
77+
logout Logout of your account
78+
refresh Refresh authentication credentials
79+
status View authentication status
80+
5581
config Generate and Validate DeepSource config
56-
help Help about any command
57-
issues Show the list of issues in a file in a repository
58-
repo Operations related to the project repository
82+
generate Generate .deepsource.toml config
83+
validate Validate existing config
84+
85+
issues Show the list of issues in a repository
86+
list List issues (supports --json, --csv, --sarif export)
87+
88+
repo Operations related to the repository
89+
status View activation status
90+
view Open DeepSource dashboard in browser
91+
5992
report Report artifacts to DeepSource
6093
version Get the version of the DeepSource CLI
6194

0 commit comments

Comments
 (0)