Skip to content

Commit f354324

Browse files
(DOCSP-10236): Add Reference page for all available commands (#9)
* (DOCSP-10236): Add Reference page for all available commands * Updates per review * Add preview banner
1 parent 77db11e commit f354324

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed

source/commands.txt

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,174 @@
55
===============
66

77
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
.. include:: /includes/fact-vsce-preview.rst
16+
17+
This document lists the VS Code commands available for
18+
|vsce|. To open the Command Palette and execute these commands:
19+
20+
.. include:: /includes/list-tables/command-palette-options.rst
21+
22+
.. include:: /includes/admonitions/tip-mongodb-command-palette.rst
23+
24+
Connection Commands
25+
-------------------
26+
27+
Run these commands from the Command Palette to create new connections or
28+
manage existing connections to your MongoDB deployments.
29+
30+
Configuring a new connection adds a new entry to your
31+
:guilabel:`Connections` list in the |vsce| view. Select a connection
32+
from the list to activate that connection.
33+
34+
To learn more about connecting to a deployment, see :ref:`vsce-connect`.
35+
36+
.. note::
37+
38+
You can configure multiple connections, but only have one *active*
39+
connection open at a time.
40+
41+
.. list-table::
42+
:header-rows: 1
43+
:widths: 20 40
44+
45+
* - Command
46+
- Description
47+
48+
* - :ref:`Connect <vsce-cmd-connect>`
49+
50+
.. _vsce-cmd-connect:
51+
52+
- Connect to your MongoDB deployment by filling in your connection
53+
information in the connection dialog.
54+
55+
* - :ref:`Connect with Connection String <vsce-cmd-connect-string>`
56+
57+
.. _vsce-cmd-connect-string:
58+
59+
- Connect to your MongoDB deployment by pasting your
60+
:manual:`connection string URI </reference/connection-string/>`
61+
directly into the command palette. Connecting to a deployment
62+
adds a new entry to your :guilabel:`Connections` list in the
63+
|vsce| view.
64+
65+
|service| provides a connection string for your clusters which
66+
you can pass into this command.
67+
68+
* - :ref:`Disconnect <vsce-cmd-disconnect>`
69+
70+
.. _vsce-cmd-disconnect:
71+
72+
- Disconnect from your active deployment connection.
73+
74+
* - :ref:`Remove Connection <vsce-cmd-remove-connection>`
75+
76+
.. _vsce-cmd-remove-connection:
77+
78+
- Select and remove a connection from your list of connections
79+
in |vsce|.
80+
81+
.. note::
82+
83+
Removing your current active connection also closes that
84+
connection.
85+
86+
Shell Commands
87+
--------------
88+
89+
Run this command from the Command Palette to open a MongoDB Shell
90+
connected to your deployment.
91+
92+
.. list-table::
93+
:header-rows: 1
94+
:widths: 20 40
95+
96+
* - Command
97+
- Description
98+
99+
* - :ref:`Launch MongoDB Shell <vsce-cmd-launch-shell>`
100+
101+
.. _vsce-cmd-launch-shell:
102+
103+
- .. important::
104+
105+
This command is not supported on Windows.
106+
107+
Open the VS Code :guilabel:`Terminal` and automatically connect a
108+
MongoDB shell to the deployment specified in your active
109+
connection.
110+
111+
Specify the MongoDB shell to use in the ``mdb.shell``
112+
:ref:`setting <vsce-settings>`. |vsce| supports the following
113+
shells:
114+
115+
- Legacy :binary:`~mongo` shell
116+
- ``mongosh`` shell.
117+
118+
To learn how to install the legacy :binary:`~mongo` shell, see
119+
:manual:`Instal MongoDB </installation>`.
120+
121+
Playground Commands
122+
-------------------
123+
124+
Run these commands from the Command Palette to create and run
125+
:ref:`playgrounds <vsce-playgrounds>`.
126+
127+
.. list-table::
128+
:header-rows: 1
129+
:widths: 20 40
130+
131+
* - Command
132+
- Description
133+
134+
* - :ref:`Create MongoDB Playground <vsce-cmd-playground-create>`
135+
136+
.. _vsce-command-playground-create:
137+
138+
- Create a new playground to run against your MongoDB deployment.
139+
140+
By default, playgrounds load with a template containing
141+
sample commands. You can disable this template from your
142+
:ref:`extension settings <vsce-settings>`.
143+
144+
* - :ref:`Run All From Playground <vsce-cmd-playground-run>`
145+
146+
.. _vsce-command-playground-run:
147+
148+
- Run file you are currently viewing in VS Code as a playground.
149+
Your playground runs against the deployment specified in your
150+
active connection.
151+
152+
|vsce| outputs the results of your playground in the
153+
:guilabel:`Output` view in VS Code.
154+
155+
|vsce| View Commands
156+
--------------------
157+
158+
Run these commands from the Command Palette to manage the |vsce| view in
159+
the left navigation panel.
160+
161+
.. list-table::
162+
:header-rows: 1
163+
:widths: 20 40
164+
165+
* - Command
166+
- Description
167+
168+
* - :ref:`Focus on MongoDB View <vsce-cmd-focus>`
169+
170+
.. _vsce-cmd-focus:
171+
172+
- Open and focus on the |vsce| view.
173+
174+
* - :ref:`Show MongoDB <vsce-cmd-show>`
175+
176+
.. _vsce-cmd-show:
177+
178+
- If |vsce| is hidden from your extension view, show it.

0 commit comments

Comments
 (0)