Skip to content

MongoDB Shell

The MongoDB Shell (mongosh) lets you connect to MongoDB to work with your data and configure your database.

Help us improve the MongoDB Shell by posting your ideas and suggestions for improvements.

To report bugs, please use our MONGOSH JIRA project.

32 results found

  1. Vi mode for MongoDB Shell

    Please enable a 'vi' editing mode for the mongo shell.

    A first cut of key bindings would be:

    Basic command mode/editing mode toggling:
    i Insert before cursor
    Esc Toggle to command mode

    Cursor motion keys:
    h Move left
    j Move down
    k Move up
    l Move right

    w Move to next word
    b Move to the beginning of the word

    0 Move to the beginning of the line
    $ Move to the end of the line

    And delete/change:
    x delete next character to the right
    d

    {motion} delete amount specified by…

    11 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Usability  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. Control logging behavior of mongosh

    It should be possible to control the logging behavior of mongosh, for example:

    • verbosity
    • what to log / log level
    • retention time
    • whether logging is enabled or not
    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Usability  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. Add support for AWS_PROFILE when authMechanism is MONGODB-AWS

    Currently, when using MONGODB-AWS, it can only read the following variables:

    AWS ACCESS KEY ID
    AWS SECRET ACCESS KEY
    AWS SESSION TOKEN

    which forces you to export credentials or to paste them in the CLI.

    AWS has a variable called AWS_PROFILE that will fetch the required values from your credential file, without having to paste them again. This variable is supported by anything using AWS SDK, so mongosh should have support for it as well.

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Commands  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  4. Add support for db.exists() and collections.exists()

    Add a db.exists() and collections.exists() so that it is easy to check whether a database or a collection exists. This will help to reduce the propensity to inadvertently create new dbs and collections when running a script due to typos.

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  2 comments  ·  Commands  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. Explain shell helpers for CRUD API

    The .explain() method in the shell works with some write methods (update, remove, findAndModify), but it doesn't work with the newer CRUD API.

    The missing explain methods are:

    "deleteMany",
    "deleteOne",
    "findOne",
    "findOneAndDelete",
    "findOneAndReplace",
    "findOneAndUpdate",
    "insertMany",
    "insertOne",
    "replaceOne",
    "updateMany",
    "updateOne"

    I think this would be especially helpful for new hires: explain is a good way to quickly find the code that implements a command.

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Commands  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. Manage mongosh through MongoDB agent automation

    MongoDB server, database tools, biconnector binaries are all managed by MongoDB agent automation feature in a managed deployments via Opsmanager. Mongosh is not managed, which makes it difficult to build separate automation to manage mongosh alone. If mongodb agent can manage (install/update/remove) mongosh, it would greatly benefit and seamless management of managed deployments.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Other  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. Option to show date in local timezone

    Currently MongoDB is storing date and time in UTC - which is good and should be that way.
    However, from the presentation (either via Compass/Shell), there should be a way to show the date and time based on locale time zone settings or an option to switch from UTC to local time zone.

    So for people who consume data right from MongoDB, they don't get confused with the data differences between UTC and their local time zone.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. creating an option to import csv files with semicolon separator

    There isn't an option to specify semicolon as delimiter on mongo shell when importing csv files. We are forced to import through MongoDB Compass when file has semicolon separator.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Commands  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  9. Support brew keg versioned releases for Macs

    For example, allow "brew install mongosh@1.10.6" and for mongosh 2.x

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Usability  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. Allow selection of user-specified –mongoshpath directory and –logpath similar to mongod does

    Allow selection of user-specified installation directory options

    For example –installpath [Installdirectory] and –logpath [logDirectory] similar (and save it in a config file). Users would be familiar with this as it is somewhat similar to mongod.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  12. MONGODB-AWS Auth Feature Request for mongosh & compass connections

    I would like to request a feature to more fully integrate the auth mechanism MONGODB-AWS in the Atlas UI. We envision that when you are creating a user based on IAM Auth a toggle button is added in the UI that when enabled on the user or project level, would require a user to provide a session token to authenticate via mongoose. This feature would require the --awsIamSessionToken option when a so defined user connects via mongosh or the token field in Compass (along with the access key and secret access key). Basically, if only username/password were presented, it would…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Security  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. add _prettyShell=false to mongosh

    In 4.4, the mongo shell prints 'ugly' by default. Many of our scripts are written to expect this type of output. The mongo shell includes the command: DBQuery.prototype._prettyShell=false to explicitly set this. In mongosh, there is no built in/native ability to achieve the same output as mongo shell.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Scripting  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  14. Have db.table.distinct('column') support cursors

    Right now distinct() returns max 100 items and doesn't take into account the config "displayBatchSize". It would be nice if distinct() returned all distinct items.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Commands  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  15. Save shell commands to the cloud

    It would be nice to have a way to save shell commands for later, maybe to the cloud.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  16. Don't send tracking analytics without explicit opt-in

    I recently updated mongosh to 1.7.1 via Homebrew. Little Snitch informs me that the program is reaching out to api.segment.io asynchronously. For privacy reasons, I do not want programs to do that, and such analytics without explicit opt-in may be illegal in the entire EU per the GDPR.

    Please remove the analytics/tracking feature or make it configurable only as an opt-in feature.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Security  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. Display Atlas cluster name in command prompt, rather than internal slug

    When connected to an Atlas cluster, I can see the Atlas internal hostname slug in the command prompt:

    Atlas atlas-l1ugii-shard-0 [secondary] database_name>

    It would be easier if this displayed the Atlas hostname, that matches the UI, and includes the cluster name (e.g. "Atlas clustername-shard-0 [secondary] databasename>").

    This would help with distinguishing between multiple shell connections across multiple different clusters.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Usability  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  18. syntax issues

    I have to use '.\mongosh' rather than '.\mongo' when using Power Shell windows
    Might be useful since the switch to mongoshell

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Usability  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  19. remove case sensitivity from tab search of commands

    currently mongosh uses case sensitive search of command on double tapping the tab key.

    While it seems adequate at first, entering a capital letter requires 2 key presses and it becomes annoying pretty fast for the good old mongo shell users.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Usability  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. Make Load() support Regex Patterns or make a new loadRegex() function

    Problem Statement/Rationale

    Let's say you have a directory full of scripts.

    For now, I need to do a load('script path') for each script.

    Wouldn't it be great if I could do load('*') within the directory, and load them all one after the other with this one liner ?

    Expected Results

    load(/*/) -> all the files in the directory, sorted by alphanumerical (maybe we could also configure a locale in mongo configuration file or something like that to change collation)

    Actual Results

    load(Regex Pattern) doesn't work, because it searches a path.

    Additional Notes

    if it's too complicated to make load compatible…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Commands  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1
  • Don't see your idea?

MongoDB Shell

Categories

Feedback and Knowledge Base