Skip to content

Commit 0928ec3

Browse files
authored
chore(cli-repl): cleanup CLI argument documentation MONGOSH-571 (#706)
1 parent af98e6e commit 0928ec3

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

README.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ variable. For detailed instructions for each of our supported platforms, please
2929
$ mongosh [options] [db address]
3030

3131
Options:
32+
3233
-h, --help Show this usage information
33-
--ipv6 Enable IPv6 support (disabled by default)
3434
--host [arg] Server to connect to
3535
--port [arg] Port to connect to
3636
--version Show version information
37-
--shell Run the shell after executing files
3837
--nodb Don't connect to mongod on startup - no 'db address' [arg] expected
39-
--norc Will not run the '.mongorc.js' file on start up
40-
--eval [arg] Evaluate javascript
4138
--retryWrites Automatically retry write operations upon transient network errors
4239
4340
Authentication Options:
@@ -46,46 +43,40 @@ variable. For detailed instructions for each of our supported platforms, please
4643
-p, --password [arg] Password for authentication
4744
--authenticationDatabase [arg] User source (defaults to dbname)
4845
--authenticationMechanism [arg] Authentication mechanism
49-
--gssapiServiceName [arg] (=mongodb) undefined
50-
--gssapiHostName [arg] Automatically retry write operations upon transient network errors
46+
--awsIamSessionToken [arg] AWS IAM Temporary Session Token ID
5147
5248
TLS Options:
5349
5450
--tls Use TLS for all connections
5551
--tlsCertificateKeyFile [arg] PEM certificate/key file for TLS
56-
--tlsCertificateKeyFilePassword [arg] undefined
52+
--tlsCertificateKeyFilePassword [arg] Password for key in PEM file for TLS
5753
--tlsCAFile [arg] Certificate Authority file for TLS
58-
--tlsCRLFile [arg] Certificate Revocation List file for TLS
59-
--tlsAllowInvalidHostnames undefined
60-
--tlsAllowInvalidCertificates undefined
54+
--tlsAllowInvalidHostnames Allow connections to servers with non-matching hostnames
55+
--tlsAllowInvalidCertificates Allow connections to servers with invalid certificates
6156
--tlsCertificateSelector [arg] TLS Certificate in system store
6257
--tlsDisabledProtocols [arg] Comma separated list of TLS protocols to disable [TLS1_0,TLS1_1,TLS1_2]
6358
64-
FLE AWS Options
59+
FLE Options:
6560
6661
--awsAccessKeyId [arg] AWS Access Key for FLE Amazon KMS
6762
--awsSecretAccessKey [arg] AWS Secret Key for FLE Amazon KMS
6863
--awsSessionToken [arg] Optional AWS Session Token ID
6964
--keyVaultNamespace [arg] database.collection to store encrypted FLE parameters
70-
--kmsURL [arg] Test parameter to override the URL for
65+
--kmsURL [arg] Test parameter to override the URL of the KMS endpoint
7166
72-
DB Address Examples
67+
DB Address Examples:
7368
7469
foo Foo database on local machine
7570
192.168.0.5/foo Foo database on 192.168.0.5 machine
7671
192.168.0.5:9999/foo Foo database on 192.168.0.5 machine on port 9999
7772
mongodb://192.168.0.5:9999/foo Connection string URI can also be used
7873
79-
File Names
80-
81-
A list of files to run. Files must end in .js and will exit after unless --shell is specified.
82-
83-
Examples
74+
Examples:
8475
8576
Start mongosh using 'ships' database on specified connection string:
8677
$ mongosh mongodb://192.168.0.5:9999/ships
8778
88-
For more information on mongosh usage: https://docs.mongodb.com/manual/mongo/.
79+
For more information on usage: https://docs.mongodb.com/mongodb-shell.
8980
```
9081
9182
## Releasing

packages/cli-repl/src/constants.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const USAGE = `
3131
-p, --password [arg] ${i18n.__('cli-repl.args.password')}
3232
--authenticationDatabase [arg] ${i18n.__('cli-repl.args.authenticationDatabase')}
3333
--authenticationMechanism [arg] ${i18n.__('cli-repl.args.authenticationMechanism')}
34+
--awsIamSessionToken [arg] ${i18n.__('cli-repl.args.awsIamSessionToken')}
3435
3536
${clr(i18n.__('cli-repl.args.tlsOptions'), ['bold', 'yellow'])}
3637
@@ -43,6 +44,14 @@ export const USAGE = `
4344
--tlsCertificateSelector [arg] ${i18n.__('cli-repl.args.tlsCertificateSelector')}
4445
--tlsDisabledProtocols [arg] ${i18n.__('cli-repl.args.tlsDisabledProtocols')}
4546
47+
${clr(i18n.__('cli-repl.args.fleOptions'), ['bold', 'yellow'])}
48+
49+
--awsAccessKeyId [arg] ${i18n.__('cli-repl.args.awsAccessKeyId')}
50+
--awsSecretAccessKey [arg] ${i18n.__('cli-repl.args.awsSecretAccessKey')}
51+
--awsSessionToken [arg] ${i18n.__('cli-repl.args.awsSessionToken')}
52+
--keyVaultNamespace [arg] ${i18n.__('cli-repl.args.keyVaultNamespace')}
53+
--kmsURL [arg] ${i18n.__('cli-repl.args.kmsURL')}
54+
4655
${clr(i18n.__('cli-repl.args.dbAddressOptions'), ['bold', 'yellow'])}
4756
4857
foo ${i18n.__('cli-repl.args.dbAddress/foo')}

packages/i18n/src/locales/en_US.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const translations: Catalog = {
2525
password: 'Password for authentication',
2626
authenticationDatabase: 'User source (defaults to dbname)',
2727
authenticationMechanism: 'Authentication mechanism',
28+
awsIamSessionToken: 'AWS IAM Temporary Session Token ID',
2829
gssapiServiceName: 'Service name to use when authenticating using GSSAPI/Kerberos',
2930
gssapiHostName: 'Remote host name to use for purpose of GSSAPI/Kerberos authentication',
3031
tlsOptions: 'TLS Options:',
@@ -37,20 +38,20 @@ const translations: Catalog = {
3738
tlsAllowInvalidCertificates: 'Allow connections to servers with invalid certificates',
3839
tlsCertificateSelector: 'TLS Certificate in system store',
3940
tlsDisabledProtocols: 'Comma separated list of TLS protocols to disable [TLS1_0,TLS1_1,TLS1_2]',
40-
fleAwsOptions: 'FLE AWS Options',
41+
fleOptions: 'FLE Options:',
4142
awsAccessKeyId: 'AWS Access Key for FLE Amazon KMS',
4243
awsSecretAccessKey: 'AWS Secret Key for FLE Amazon KMS',
4344
awsSessionToken: 'Optional AWS Session Token ID',
4445
keyVaultNamespace: 'database.collection to store encrypted FLE parameters',
45-
kmsURL: 'Test parameter to override the URL for',
46-
dbAddressOptions: 'DB Address Examples',
46+
kmsURL: 'Test parameter to override the URL of the KMS endpoint',
47+
dbAddressOptions: 'DB Address Examples:',
4748
'dbAddress/foo': 'Foo database on local machine',
4849
'dbAddress/192/foo': 'Foo database on 192.168.0.5 machine',
4950
'dbAddress/192/host/foo': 'Foo database on 192.168.0.5 machine on port 9999',
5051
'dbAddress/connectionURI': 'Connection string URI can also be used',
51-
fileNames: 'File Names',
52+
fileNames: 'File Names:',
5253
filenameDescription: 'A list of files to run. Files must end in .js and will exit after unless --shell is specified.',
53-
examples: 'Examples',
54+
examples: 'Examples:',
5455
connectionExampleWithDatabase: "Start mongosh using 'ships' database on specified connection string:",
5556
moreInformation: 'For more information on usage:'
5657
},

0 commit comments

Comments
 (0)