Skip to content
Merged
Show file tree
Hide file tree
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
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ variable. For detailed instructions for each of our supported platforms, please
$ mongosh [options] [db address]

Options:

-h, --help Show this usage information
--ipv6 Enable IPv6 support (disabled by default)
--host [arg] Server to connect to
--port [arg] Port to connect to
--version Show version information
--shell Run the shell after executing files
--nodb Don't connect to mongod on startup - no 'db address' [arg] expected
--norc Will not run the '.mongorc.js' file on start up
--eval [arg] Evaluate javascript
--retryWrites Automatically retry write operations upon transient network errors

Authentication Options:
Expand All @@ -46,46 +43,40 @@ variable. For detailed instructions for each of our supported platforms, please
-p, --password [arg] Password for authentication
--authenticationDatabase [arg] User source (defaults to dbname)
--authenticationMechanism [arg] Authentication mechanism
--gssapiServiceName [arg] (=mongodb) undefined
--gssapiHostName [arg] Automatically retry write operations upon transient network errors
--awsIamSessionToken [arg] AWS IAM Temporary Session Token ID

TLS Options:

--tls Use TLS for all connections
--tlsCertificateKeyFile [arg] PEM certificate/key file for TLS
--tlsCertificateKeyFilePassword [arg] undefined
--tlsCertificateKeyFilePassword [arg] Password for key in PEM file for TLS
--tlsCAFile [arg] Certificate Authority file for TLS
--tlsCRLFile [arg] Certificate Revocation List file for TLS
--tlsAllowInvalidHostnames undefined
--tlsAllowInvalidCertificates undefined
--tlsAllowInvalidHostnames Allow connections to servers with non-matching hostnames
--tlsAllowInvalidCertificates Allow connections to servers with invalid certificates
--tlsCertificateSelector [arg] TLS Certificate in system store
--tlsDisabledProtocols [arg] Comma separated list of TLS protocols to disable [TLS1_0,TLS1_1,TLS1_2]

FLE AWS Options
FLE Options:

--awsAccessKeyId [arg] AWS Access Key for FLE Amazon KMS
--awsSecretAccessKey [arg] AWS Secret Key for FLE Amazon KMS
--awsSessionToken [arg] Optional AWS Session Token ID
--keyVaultNamespace [arg] database.collection to store encrypted FLE parameters
--kmsURL [arg] Test parameter to override the URL for
--kmsURL [arg] Test parameter to override the URL of the KMS endpoint

DB Address Examples
DB Address Examples:

foo Foo database on local machine
192.168.0.5/foo Foo database on 192.168.0.5 machine
192.168.0.5:9999/foo Foo database on 192.168.0.5 machine on port 9999
mongodb://192.168.0.5:9999/foo Connection string URI can also be used

File Names

A list of files to run. Files must end in .js and will exit after unless --shell is specified.

Examples
Examples:

Start mongosh using 'ships' database on specified connection string:
$ mongosh mongodb://192.168.0.5:9999/ships

For more information on mongosh usage: https://docs.mongodb.com/manual/mongo/.
For more information on usage: https://docs.mongodb.com/mongodb-shell.
```

## Releasing
Expand Down
9 changes: 9 additions & 0 deletions packages/cli-repl/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const USAGE = `
-p, --password [arg] ${i18n.__('cli-repl.args.password')}
--authenticationDatabase [arg] ${i18n.__('cli-repl.args.authenticationDatabase')}
--authenticationMechanism [arg] ${i18n.__('cli-repl.args.authenticationMechanism')}
--awsIamSessionToken [arg] ${i18n.__('cli-repl.args.awsIamSessionToken')}

${clr(i18n.__('cli-repl.args.tlsOptions'), ['bold', 'yellow'])}

Expand All @@ -43,6 +44,14 @@ export const USAGE = `
--tlsCertificateSelector [arg] ${i18n.__('cli-repl.args.tlsCertificateSelector')}
--tlsDisabledProtocols [arg] ${i18n.__('cli-repl.args.tlsDisabledProtocols')}

${clr(i18n.__('cli-repl.args.fleOptions'), ['bold', 'yellow'])}

--awsAccessKeyId [arg] ${i18n.__('cli-repl.args.awsAccessKeyId')}
--awsSecretAccessKey [arg] ${i18n.__('cli-repl.args.awsSecretAccessKey')}
--awsSessionToken [arg] ${i18n.__('cli-repl.args.awsSessionToken')}
--keyVaultNamespace [arg] ${i18n.__('cli-repl.args.keyVaultNamespace')}
--kmsURL [arg] ${i18n.__('cli-repl.args.kmsURL')}

${clr(i18n.__('cli-repl.args.dbAddressOptions'), ['bold', 'yellow'])}

foo ${i18n.__('cli-repl.args.dbAddress/foo')}
Expand Down
11 changes: 6 additions & 5 deletions packages/i18n/src/locales/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const translations: Catalog = {
password: 'Password for authentication',
authenticationDatabase: 'User source (defaults to dbname)',
authenticationMechanism: 'Authentication mechanism',
awsIamSessionToken: 'AWS IAM Temporary Session Token ID',
gssapiServiceName: 'Service name to use when authenticating using GSSAPI/Kerberos',
gssapiHostName: 'Remote host name to use for purpose of GSSAPI/Kerberos authentication',
tlsOptions: 'TLS Options:',
Expand All @@ -37,20 +38,20 @@ const translations: Catalog = {
tlsAllowInvalidCertificates: 'Allow connections to servers with invalid certificates',
tlsCertificateSelector: 'TLS Certificate in system store',
tlsDisabledProtocols: 'Comma separated list of TLS protocols to disable [TLS1_0,TLS1_1,TLS1_2]',
fleAwsOptions: 'FLE AWS Options',
fleOptions: 'FLE Options:',
awsAccessKeyId: 'AWS Access Key for FLE Amazon KMS',
awsSecretAccessKey: 'AWS Secret Key for FLE Amazon KMS',
awsSessionToken: 'Optional AWS Session Token ID',
keyVaultNamespace: 'database.collection to store encrypted FLE parameters',
kmsURL: 'Test parameter to override the URL for',
dbAddressOptions: 'DB Address Examples',
kmsURL: 'Test parameter to override the URL of the KMS endpoint',
dbAddressOptions: 'DB Address Examples:',
'dbAddress/foo': 'Foo database on local machine',
'dbAddress/192/foo': 'Foo database on 192.168.0.5 machine',
'dbAddress/192/host/foo': 'Foo database on 192.168.0.5 machine on port 9999',
'dbAddress/connectionURI': 'Connection string URI can also be used',
fileNames: 'File Names',
fileNames: 'File Names:',
filenameDescription: 'A list of files to run. Files must end in .js and will exit after unless --shell is specified.',
Comment on lines +52 to 53
Copy link
Collaborator

Choose a reason for hiding this comment

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

Those are not used anywhere anymore, right?

examples: 'Examples',
examples: 'Examples:',
connectionExampleWithDatabase: "Start mongosh using 'ships' database on specified connection string:",
moreInformation: 'For more information on usage:'
},
Expand Down