Skip to content

Commit 53ef092

Browse files
committed
Update help messages
1 parent 610105c commit 53ef092

File tree

55 files changed

+424
-398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+424
-398
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ All aliases support the flags and arguments of the commands they alias.
4848
- `--dry-run` - Run a command without uploading anything
4949
- `--debug` - Output additional debug
5050
- `--help` - Prints help documentation for a command
51-
- `--max-old-space-size` - Set Node's [`--max-old-space-size`](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib) value
52-
- `--max-semi-space-size` - Set Node's [`--max-semi-space-size`](https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib) value
51+
- `--max-old-space-size` - Set Node's V8 [`--max-old-space-size`](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib) option
52+
- `--max-semi-space-size` - Set Node's V8 [`--max-semi-space-size`](https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib) option
5353
- `--version` - Prints the Socket CLI version
5454

5555
## Configuration files
@@ -91,8 +91,8 @@ npm exec socket
9191

9292
- `SOCKET_CLI_API_BASE_URL` - Change the base URL for all API-calls<br>
9393
*Defaults:* The "apiBaseUrl" value of socket/settings local app data if present, else `https://api.socket.dev/v0/`<br>
94-
- `SOCKET_CLI_API_PROXY` - Set the proxy that all requests are routed through<br>
95-
For example, if set to [`http://127.0.0.1:9090`](https://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries), then all request are proxied through that proxy<br>
94+
- `SOCKET_CLI_API_PROXY` - Set the proxy all requests are routed through, e.g. if set to<br>
95+
[`http://127.0.0.1:9090`](https://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries), then all request are passed through that proxy<br>
9696
*Aliases:* `HTTPS_PROXY`, `https_proxy`, `HTTP_PROXY`, and `http_proxy`<br>
9797
- `SOCKET_CLI_DEBUG` - Enable debug logging in Socket CLI
9898
- `DEBUG` - Enable debug logging based on the [`debug`](https://socket.dev/npm/package/debug) package

src/commands/analytics/cmd-analytics.test.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ describe('socket analytics', async () => {
3131
The TIME argument must be number 7, 30, or 90 and defaults to 30.
3232
3333
Options
34-
--file Path to store result, only valid with --json/--markdown
35-
--json Output result as json
36-
--markdown Output result as markdown
34+
--file Path to store result, only valid with --json/--markdown
35+
--json Output result as json
36+
--markdown Output result as markdown
3737
3838
Examples
3939
$ socket analytics org 7

src/commands/audit-log/cmd-audit-log.test.mts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ describe('socket audit-log', async () => {
3939
The page arg should be a positive integer, offset 1. Defaults to 1.
4040
4141
Options
42-
--interactive Allow for interactive elements, asking for input. Use --no-interactive to prevent any input questions, defaulting them to cancel/no.
43-
--json Output result as json
44-
--markdown Output result as markdown
45-
--org Force override the organization slug, overrides the default org from config
46-
--page Result page to fetch
47-
--per-page Results per page - default is 30
42+
--interactive Allow for interactive elements, asking for input. Use --no-interactive to prevent any input questions, defaulting them to cancel/no.
43+
--json Output result as json
44+
--markdown Output result as markdown
45+
--org Force override the organization slug, overrides the default org from config
46+
--page Result page to fetch
47+
--per-page Results per page - default is 30
4848
4949
Examples
5050
$ socket audit-log

src/commands/ci/cmd-ci.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('socket ci', async () => {
2020
$ socket ci [options]
2121
2222
Options
23-
--auto-manifest Auto generate manifest files where detected? See autoManifest flag in \`socket scan create\`
23+
--auto-manifest Auto generate manifest files where detected? See autoManifest flag in \`socket scan create\`
2424
2525
This command is intended to use in CI runs to allow automated systems to
2626
accept or reject a current build. It will use the default org of the

src/commands/cli.test.mts

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -13,79 +13,85 @@ describe('socket root command', async () => {
1313
"CLI for Socket.dev
1414
1515
Usage
16+
1617
$ socket <command>
18+
$ socket scan create --json
19+
$ socket package score npm lodash --markdown
1720
18-
All commands have their own --help page
21+
(Note: All commands have their own --help)
1922
2023
Main commands
2124
22-
socket login Setup Socket CLI with an API token and defaults
23-
socket scan create Create a new Socket scan and report
24-
socket npm/[email protected] Request the Socket score of a package
25-
socket ci Shorthand for \`socket scan create --report --no-interactive\`
25+
socket login Setup Socket CLI with an API token and defaults
26+
socket scan create Create a new Socket scan and report
27+
socket npm/[email protected] Request the Socket score of a package
28+
socket ci Shorthand for \`socket scan create --report --no-interactive\`
2629
2730
Socket API
2831
29-
analytics Look up analytics data
30-
audit-log Look up the audit log for an organization
31-
organization Manage Socket organization account details
32-
package Look up published package details
33-
repository Manage registered repositories
34-
scan Manage Socket scans
35-
threat-feed [Beta] View the threat feed
32+
analytics Look up analytics data
33+
audit-log Look up the audit log for an organization
34+
organization Manage Socket organization account details
35+
package Look up published package details
36+
repository Manage registered repositories
37+
scan Manage Socket scans
38+
threat-feed [Beta] View the threat feed
3639
3740
Local tools
3841
39-
fix Update dependencies with "fixable" Socket alerts
40-
manifest Generate a dependency manifest for certain ecosystems
41-
npm Run npm with the Socket wrapper
42-
npx Run npx with the Socket wrapper
43-
optimize Optimize dependencies with @socketregistry overrides
44-
raw-npm Run npm without the Socket wrapper
45-
raw-npx Run npx without the Socket wrapper
42+
fix Update dependencies with "fixable" Socket alerts
43+
manifest Generate a dependency manifest for certain ecosystems
44+
npm Run npm with the Socket wrapper
45+
npx Run npx with the Socket wrapper
46+
optimize Optimize dependencies with @socketregistry overrides
47+
raw-npm Run npm without the Socket wrapper
48+
raw-npx Run npx without the Socket wrapper
4649
4750
CLI configuration
4851
49-
config Manage Socket CLI configuration
50-
install Install Socket CLI tab completion
51-
login Socket API login and CLI setup
52-
logout Socket API logout
53-
uninstall Uninstall Socket CLI tab completion
54-
wrapper Enable or disable the Socket npm/npx wrapper
55-
56-
Environment variables
52+
config Manage Socket CLI configuration
53+
install Install Socket CLI tab completion
54+
login Socket API login and CLI setup
55+
logout Socket API logout
56+
uninstall Uninstall Socket CLI tab completion
57+
wrapper Enable or disable the Socket npm/npx wrapper
5758
58-
SOCKET_CLI_ACCEPT_RISKS Accept risks of a safe-npm or safe-npx run
59-
SOCKET_CLI_API_TOKEN Set the Socket API token
60-
SOCKET_CLI_CONFIG. A JSON stringified Socket configuration object
61-
SOCKET_CLI_GIT_USER_EMAIL The git config \`user.email\` used by Socket CLI
62-
SOCKET_CLI_GIT_USER_NAME The git config \`user.name\` used by Socket CLI
63-
SOCKET_CLI_GITHUB_TOKEN A classic or fine-grained GitHub personal access token (\\u200bhttps://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\\u200b)
64-
SOCKET_CLI_NO_API_TOKEN Make the default API token \`undefined\`
65-
SOCKET_CLI_NPM_PATH The absolute location of the npm directory
66-
SOCKET_CLI_ORG_SLUG Specify the Socket organization slug
67-
SOCKET_CLI_VIEW_ALL_RISKS View all risks of a safe-npm or safe-npx run
59+
Options
60+
(Note: All commands have these flags even when not displayed in their help)
6861
69-
Environment variables for development
62+
--config Override the local config with this JSON
63+
--dry-run Do input validation for a command and exit 0 when input is ok
64+
--help Print this help
65+
--max-old-space-size Set Node's V8 --max-old-space-size (\\u200bhttps://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib\\u200b) option
66+
--max-semi-space-size Set Node's V8 --max-semi-space-size (\\u200bhttps://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib\\u200b) option
67+
--version Print the app version
7068
71-
SOCKET_CLI_API_BASE_URL Change the base URL for all API-calls
72-
SOCKET_CLI_API_PROXY Set the proxy that all requests are routed through
73-
SOCKET_CLI_DEBUG Enable debug logging in Socket CLI
74-
DEBUG Enable debug logging based on the debug (\\u200bhttps://socket.dev/npm/package/debug\\u200b) package
69+
Environment variables
7570
76-
Options (Note: All CLI commands have these flags even when not displayed in their help)
71+
SOCKET_CLI_ACCEPT_RISKS Accept risks of a safe-npm or safe-npx run
72+
SOCKET_CLI_API_TOKEN Set the Socket API token
73+
SOCKET_CLI_CONFIG A JSON stringified Socket configuration object
74+
SOCKET_CLI_GIT_USER_EMAIL The git config \`user.email\` used by Socket CLI
75+
Defaults: github-actions[bot]@users.noreply.github.com
76+
SOCKET_CLI_GIT_USER_NAME The git config \`user.name\` used by Socket CLI
77+
Defaults: github-actions[bot]
78+
SOCKET_CLI_GITHUB_TOKEN A classic or fine-grained GitHub personal access token (\\u200bhttps://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\\u200b)
79+
Aliases: GITHUB_TOKEN
80+
SOCKET_CLI_NO_API_TOKEN Make the default API token \`undefined\`
81+
SOCKET_CLI_NPM_PATH The absolute location of the npm directory
82+
SOCKET_CLI_ORG_SLUG Specify the Socket organization slug
83+
SOCKET_CLI_VIEW_ALL_RISKS View all risks of a safe-npm or safe-npx run
7784
78-
--config Override the local config with this JSON
79-
--dry-run Do input validation for a command and exit 0 when input is ok
80-
--help Print this help
81-
--max-old-space-size Set the max memory size of V8's old memory section in megabytes
82-
--max-semi-space-size Set the maximum semi-space size for V8's scavenge garbage collector in megabytes
83-
--version Print the app version
85+
Environment variables for development
8486
85-
Examples
86-
$ socket --help
87-
$ socket scan create --json
88-
$ socket package score npm left-pad --markdown"
87+
SOCKET_CLI_API_BASE_URL Change the base URL for all API-calls
88+
Defaults: The "apiBaseUrl" value of socket/settings local app data
89+
if present, else https://api.socket.dev/v0/
90+
SOCKET_CLI_API_PROXY Set the proxy all requests are routed through, e.g. if set to
91+
http://127.0.0.1:9090 (\\u200bhttps://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries\\u200b) then all request are passed through that proxy
92+
Aliases: HTTPS_PROXY, https_proxy, HTTP_PROXY, and http_proxy
93+
SOCKET_CLI_DEBUG Enable debug logging in Socket CLI
94+
DEBUG Enable debug logging based on the debug (\\u200bhttps://socket.dev/npm/package/debug\\u200b) package"
8995
`)
9096
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
9197
"

src/commands/config/cmd-config-auto.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ describe('socket config auto', async () => {
2020
$ socket config auto [options] KEY
2121
2222
Options
23-
--json Output result as json
24-
--markdown Output result as markdown
23+
--json Output result as json
24+
--markdown Output result as markdown
2525
2626
Attempt to automatically discover the correct value for a given config KEY.
2727

src/commands/config/cmd-config-get.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ describe('socket config get', async () => {
2424
config then the value will come from that override.
2525
2626
Options
27-
--json Output result as json
28-
--markdown Output result as markdown
27+
--json Output result as json
28+
--markdown Output result as markdown
2929
3030
KEY is an enum. Valid keys:
3131

src/commands/config/cmd-config-list.test.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ describe('socket config get', async () => {
2222
$ socket config list [options]
2323
2424
Options
25-
--full Show full tokens in plaintext (unsafe)
26-
--json Output result as json
27-
--markdown Output result as markdown
25+
--full Show full tokens in plaintext (unsafe)
26+
--json Output result as json
27+
--markdown Output result as markdown
2828
2929
Examples
3030
$ socket config list"

src/commands/config/cmd-config-set.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ describe('socket config get', async () => {
2222
$ socket config set [options] <KEY> <VALUE>
2323
2424
Options
25-
--json Output result as json
26-
--markdown Output result as markdown
25+
--json Output result as json
26+
--markdown Output result as markdown
2727
2828
This is a crude way of updating the local configuration for this CLI tool.
2929

src/commands/config/cmd-config-unset.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ describe('socket config unset', async () => {
2222
$ socket config unset [options] <KEY> <VALUE>
2323
2424
Options
25-
--json Output result as json
26-
--markdown Output result as markdown
25+
--json Output result as json
26+
--markdown Output result as markdown
2727
2828
Removes a value from a config key, allowing the default value to be used
2929
for it instead.

0 commit comments

Comments
 (0)