Open IntelliShell – Ctrl + L (⌘+ L)
Trigger auto-completion – Ctrl + Space (^ + Space)
Find – Ctrl + F (⌘+ F)
Replace – Ctrl + H (Shift + ⌘ + F)
Comment with line comment – Ctrl + / (⌘+ /)
Open script – Ctrl + O (⌘+ O)
Save script – Ctrl + S (⌘+ S)
Save script as – Shift + Ctrl + S (Shift + ⌘+ S)
Execute entire script – F5
Execute statement at cursor – F6
Execute selection – F9
First and foremost, let’s download Studio 3T and choose the right version for your particular platform and bit size.
IntelliShell requires the mongo shell executable, one of the mongo client tools bundled when downloading MongoDB.
Windows and Mac
No additional configuration is needed for Windows and Mac installations. The mongo shell executable is bundled with Studio 3T on these systems.
Linux requires the manual installation of the
mongo shell executable.
To install the mongo client tools, download the latest MongoDB version here.
Once the mongo client tools are installed:
- Go to Studio 3T > Preferences.
- Click on the IntelliShell tab.
- Insert the path of where the
mongoshell executable is located.
On Linux, this will be a binary file called
mongolocated in the ‘bin’ directory where the distribution was unpacked.
- Click OK.
There are three ways to open IntelliShell:
- Button – Click on the IntelliShell button in the global toolbar
- Right-click – Right-click on a target collection and choose Open IntelliShell
- Hotkey -Press Ctrl + L (⌘+ L)
IntelliShell has two main sections: the Editor where queries are written in a standard command line interface, and the Result Tab where results can be viewed and edited.
Write a query
If you know the MongoDB query language, you can write queries directly in the Editor area.
Auto-complete a query
Auto-completion should be automatic, but it can also be triggered manually:
- Right-click – Right-click anywhere in the Editor and choose Open Auto-Completion
- Hotkey – Press Ctrl + Space (^ + Space)
Execute a query
Queries can be executed entirely, at cursor, or as selected.
To execute an entire script:
- Button – Click on the Run (play) button
- Right-click – Right-click anywhere in the Editor and choose Execute Entire Script
- Hotkey – Press F5
To execute a script at cursor, place the cursor at the target query and:
- Button – Click on the second Run (play) button
- Right-click – Right-click anywhere in the Editor and choose Execute Statement at Cursor
- Hotkey – Press F6
To execute a selection, highlight the part of the query to be executed and:
- Button – Click on the third Run (play) button
- Right-click – Right-click anywhere in the Editor and choose Execute Selection
- Hotkey – Press F9
Check query results
Enable raw shell mode
Raw shell mode displays query results in the usual mongo shell format.
To enable raw shell mode, click on the shell icon in the toolbar:
View multiple tabs
The Result Tab can display either a single tab, which means results from previous queries are replaced by new ones, or multiple tabs, which is similar to how a browser works.
To view multiple tabs, click on the Retain button in the toolbar. Unclick it to revert to a single tab view.
Clear all result tabs
To close all result tabs:
- Button – Click on the Clear button in the toolbar
- Right-click – Right-click anywhere in the Editor and choose Clear Result Tabs
Insert and remove comments
It is also possible to comment and uncomment with a line comment.
Place the cursor on the line to be made into a comment and:
- Right-click – Right-click anywhere in the Editor and choose Comment with Line Comment. Repeat to remove the comment.
- Hotkey – Press Ctrl + / (⌘+ /). Repeat to remove the comment.
Open and save queries
- Button – Click on the Save icon. Alternatively, click on the arrow to find the Save As function.
- Right-click – Right-click anywhere in the Editor and choose Save Script (As)
- Hotkeys – Save Script – Ctrl + S (⌘+ S), Save Script As – Shift + Ctrl + S (Shift + ⌘+ S)
To open saved queries:
- Button – Click on the Open icon
- Right-click – Right-click anywhere in the Editor and choose Open Script
- Hotkey – Press Ctrl + O (⌘+ O)
Use IntelliShell and Visual Query Builder side by side
Simply click on the Visual Query Builder button on the toolbar:
You can define your Editor tab width preferences under Studio 3T > Preferences > General:
The default editor tab width setting is 4 spaces.
You can apply your chosen setting to reformat your IntelliShell code simply by:
- Right-click: Choose Format code
- Hotkey: Ctrl + Alt + L (or ⌥ + ⌘ + L on Mac)