MongoDB Shell
32 results found
-
Support brew keg versioned releases for Macs
For example, allow "brew install mongosh@1.10.6" and for mongosh 2.x
2 votes -
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 -
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 -
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
11 votes -
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 -
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 -
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 -
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 -
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 voteHi There;
thank you for raising this request.
We care deeply about user privacy and go to great efforts to be clear about what our products do and how they act.
Please review the page linked below [1] that describes exactly what telemetry is and is not collected. The page also includes instructions on how to disable telemetry.
-
2 votes
-
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 -
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 TOKENwhich 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 -
Change mongosh to process and use arguments only up to a "--" sentinel
Getting command line arguments into mongosh is virtually impossible. The --eval option insists on printing the last eval expr evaluated to the console despite the --quiet switch. Allowing a script to self parse and manage any args following the "–" sentinel using the "process.argv" array would permit the developer a wide array of choices in handling script input from a command line.
" > mongosh mongo-options script file – arg arg... "
Component: mongosh
Versions: 1.4.x and up
1 vote -
syntax issues
I have to use '.\mongosh' rather than '.\mongo' when using Power Shell windows
Might be useful since the switch to mongoshell1 vote -
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 -
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 -
Add support for AWS SSO when authMechanism is MONGODB-AWS
Currently MONGODB-AWS authentication mechanism doesn't support AWS SSO. User has to manually run
aws sso get-role-credentials
to retrieve the temporary credentials first.All AWS SDK support SSO out of the box, therefore mongosh should add support for it too.
1 vote -
Support git command
MongoSh is a developer tool, obviously. So as a developer, git is always a part of it. Supporting git command inside mongosh will help us save a lot of time.
Here's some of my implementation:
…
const git = (command) => {
try {
return execSync(`git ${command}`).toString();
} catch (e) {};
return null;
};
const listBranches = () => {
const branches = git(`branch -a`).split(/\r\n|\n|\r/).filter(notEmpty);
return branches.map(branchObj);
};
const pull = (remote = 'origin') => {
return git(`pull ${remote} --rebase`);
};
const log = (cnt) => {
const _cnt = Number(cnt) || 32;
return git(`log --graph --all --oneline --decorate=short --max-count=${_cnt}`);
}1 vote -
Suggest new feature for loading scripts: loadScript and loadFolder
For loading external script into MongoSh current session, currently we have the
load()
function, which is enough for the task. But I found myself using my own functions instead. So I would like to describe those as suggestion to improve MongoSh:loadScript()
This function is basically has the same function with
load()
. But has 1 major difference: all relative paths in the script has the same base directory with the script itself, not the current MongoSh working directory.
For example:
- Script"D:\MyProject\src\script.js"
have these references:"test.js"
,"../test2.js"
- Current working dirprocess.cwd()
:"C:\MongoSh"
- Path resolved…1 vote -
Extended JSON v2
Allow the use of Extended JSON v2 for e.g. inserting or finding documents.
1 vote
- Don't see your idea?