IntelliShell is a command-line tool built into Studio 3T that allows writing commands directly against a MongoDB database. It offers the simplicity of the mongo shell, which is what the tool is based on, while adding a number of important features that make it easier to query a database. For example, you can run commands individually, run multiple commands together, or run all commands at once.
IntelliShell also simplifies viewing results, as it lets you control how to display them – through Table, Tree, and JSON View. You can also work with the results like you can on a collection tab.
Although you were introduced to Studio 3T’s built-in mongo shell in previous lessons, your interactions with the tool were limited to simple query executions. In this section, you’ll dig into IntelliShell deeper to get a better sense of how it works and the features it supports.
To this end, you’ll load and run a script file that creates a database and adds a collection. You’ll then build and run a query that retrieves data from the collection, using the various IntelliShell features.
By the end of this section, you will learn how to:
- Use the mongo shell/IntelliShell to load and run a script file
- Use IntelliShell’s auto-complete features to write a query
- Run a query in the mongo shell/IntelliShell and view the results
What you will need:
- Access to a running instance of MongoDB
- Ability to download a script file and save it to your local system
Terms you might not know:
command-line tool: a command-line interface or command language interpreter (CLI), also known as command-line user interface, console user interface, and character user interface (CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines) (source)Next – Lesson 7: Introducing IntelliShell