All Projects → mongodb-js → mongosh

mongodb-js / mongosh

Licence: Apache-2.0 license
The MongoDB Shell

Programming Languages

typescript
32286 projects
kotlin
9241 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to mongosh

gspca-kinect2
Kinect2 Sensor Device Driver for Linux
Stars: ✭ 25 (-88.37%)
Mutual labels:  driver
thpimon
Native ESXi on Arm hardware status driver for the Raspberry Pi.
Stars: ✭ 32 (-85.12%)
Mutual labels:  driver
charts
Curated kubernetes helm charts with well-defined structures
Stars: ✭ 24 (-88.84%)
Mutual labels:  compass
-LibraryOS-Exokernel Implementation
Exokernel is one of the major sources for container and library OS techniques.
Stars: ✭ 41 (-80.93%)
Mutual labels:  driver
HadesVR
The "DIY" SteamVR compatible VR setup made for tinkerers.
Stars: ✭ 88 (-59.07%)
Mutual labels:  driver
vmwmouse
VMware mouse driver for Windows 3.1
Stars: ✭ 315 (+46.51%)
Mutual labels:  driver
AQtion
Aquantia AQC multigigabit NIC linux driver (atlantic) - development preview
Stars: ✭ 60 (-72.09%)
Mutual labels:  driver
faunadb-ruby
Ruby driver for FaunaDB
Stars: ✭ 37 (-82.79%)
Mutual labels:  driver
kmtest
Kernel-mode C++ unit testing framework in BDD-style
Stars: ✭ 42 (-80.47%)
Mutual labels:  driver
mongodb-jdbc-driver
MongoDB JDBC Driver | DbSchema MongoDB Designer
Stars: ✭ 47 (-78.14%)
Mutual labels:  driver
GoogleDriveBrowser
Goole Drive Download Library for iOS
Stars: ✭ 13 (-93.95%)
Mutual labels:  driver
hobo vr
SteamVR driver prototyping tool
Stars: ✭ 44 (-79.53%)
Mutual labels:  driver
hid-fanatecff
Driver to support ForceFeedback of the FANATEC CSL Elite Wheel Base
Stars: ✭ 81 (-62.33%)
Mutual labels:  driver
rtw88-usb
rtw88 family usb driver for linux rtl8723du rtl8822bu rtl8821cu rtl8822cu
Stars: ✭ 40 (-81.4%)
Mutual labels:  driver
logisim-7-segment-display-driver
➿ TTL-7447-like implementation for logisim
Stars: ✭ 28 (-86.98%)
Mutual labels:  driver
sqlite3
The fastest and correct module for SQLite3 in Deno.
Stars: ✭ 143 (-33.49%)
Mutual labels:  driver
node-sass-asset-functions
Node SASS Asset functions
Stars: ✭ 45 (-79.07%)
Mutual labels:  compass
dev twitter
A module to make the /dev/twitter
Stars: ✭ 72 (-66.51%)
Mutual labels:  driver
jackblog-angular1
jackblog angular1.x 版
Stars: ✭ 34 (-84.19%)
Mutual labels:  compass
FakeGPS
[NOT MAINTAINED] FakeGPS driver for Windows
Stars: ✭ 85 (-60.47%)
Mutual labels:  driver

mongosh

Evergreen Waterfall CI

The MongoDB Shell

This repository is a monorepo for all the various components in the MongoDB Shell across all environments (REPL, Browser, Compass, etc).

For our official documentation, please visit MongoDB Docs page.

MongoDB Shell works with MongoDB servers >= 4.0.

MongoDB Shell Example

Installation

You can get the release tarball from our Downloads Page. We currently maintain MongoDB Shell on three different platforms - Windows (zip), MacOS (zip) and Linux (tgz, deb and rpm). Once downloaded, you will have to extract the binary and add it to your PATH variable. For detailed instructions for each of our supported platforms, please visit installation documentation.

CLI Usage

  $ mongosh [options] [db address] [file names (ending in .js or .mongodb)]

  Options:

    -h, --help                                 Show this usage information
    -f, --file [arg]                           Load the specified mongosh script
        --host [arg]                           Server to connect to
        --port [arg]                           Port to connect to
        --version                              Show version information
        --verbose                              Increase the verbosity of the output of the shell
        --quiet                                Silence output from the shell during the connection process
        --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 '.mongoshrc.js' file on start up
        --eval [arg]                           Evaluate javascript
        --json[=canonical|relaxed]             Print result of --eval as Extended JSON, including errors
        --retryWrites[=true|false]             Automatically retry write operations upon transient network errors (Default: true)

  Authentication Options:

    -u, --username [arg]                       Username for authentication
    -p, --password [arg]                       Password for authentication
        --authenticationDatabase [arg]         User source (defaults to dbname)
        --authenticationMechanism [arg]        Authentication mechanism
        --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]  Password for key in PEM file for TLS
        --tlsCAFile [arg]                      Certificate Authority file for TLS
        --tlsAllowInvalidHostnames             Allow connections to servers with non-matching hostnames
        --tlsAllowInvalidCertificates          Allow connections to servers with invalid certificates
        --tlsCertificateSelector [arg]         TLS Certificate in system store (Windows and macOS only)
        --tlsCRLFile [arg]                     Specifies the .pem file that contains the Certificate Revocation List
        --tlsDisabledProtocols [arg]           Comma separated list of TLS protocols to disable [TLS1_0,TLS1_1,TLS1_2]
        --tlsUseSystemCA                       Load the operating system trusted certificate list
        --tlsFIPSMode                          Enable the system TLS library's FIPS mode

  API version options:

        --apiVersion [arg]                     Specifies the API version to connect with
        --apiStrict                            Use strict API version mode
        --apiDeprecationErrors                 Fail deprecated commands for the specified API version

  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 of the KMS endpoint

  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:

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

  For more information on usage: https://docs.mongodb.com/mongodb-shell.

Local Development

Requirements

  • Node.js v16.x
  • Python 3.x
    • The test suite uses mlaunch for managing running mongod, you can install that manually as well via pip3 install mtools[mlaunch] if the automatic installation causes any trouble.

Install

npm install -g lerna
npm install -g typescript
npm run bootstrap

Running Tests

Run all tests (this may take some time):

npm test

Run tests from a specific package:

lerna run test --scope @mongosh/cli-repl

Run tests with all output from packages:

lerna run test --stream

To test against a specific version, the MONGOSH_SERVER_TEST_VERSION environment variable can be set to a semver string specifying a server version.

Starting the CLI

Via npm:

npm run start

Alternatively you can also run start inside the cli-repl package, if you're sure everything else is compiled:

cd packages/cli-repl && npm run start

Compiling

Compile all Typescript:

npm run compile-ts

Compile just the CLI:

npm run compile-cli

Compile the standalone executable (this may take some time):

npm run compile-exec

Relevant environment variables for compiling are:

  • NODE_JS_VERSION: Specify a Node.js version to use for compilation, e.g. 16.15.0 or 16.x
  • BOXEDNODE_CONFIGURE_ARGS: Node.js configure flags as a comma-separated list or JSON array, e.g. --shared-openssl,--shared-zlib
  • BOXEDNODE_MAKE_ARGS: Node.js make args (no distinction from BOXEDNODE_CONFIGURE_ARGS on Windows) as a comma-separated list or JSON array, e.g. -j12

Compile a specific package, e.g. the .deb for Debian:

npm run compile-exec
npm run evergreen-release package -- --build-variant=deb-x64

Compilation and packaging output is written to dist/.

Releasing

Refer to the build package documentation.

Contributing

For issues, please create a ticket in our JIRA Project.

For contributing, please refer to CONTRIBUTING.md.

Is there anything else you’d like to see in MongoDB Shell? Let us know by submitting suggestions in our feedback forum.

License

Apache-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].