Skip to content

Commit c321264

Browse files
(DOCSP-10354): Landing page (#2)
* (DOCSP-10354): Landing page * Updates per Max's feedback * Updates per review
1 parent 6aae44c commit c321264

File tree

3 files changed

+108
-1
lines changed

3 files changed

+108
-1
lines changed

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ intersphinx = ["https://docs.mongodb.com/manual/objects.inv"]
66
toc_landing_pages = []
77

88
[constants]
9-
mdb-shell = "MongoDB Shell"
9+
mdb-shell = "The MongoDB Shell"
1010

1111
[substitutions]
1212

@@ -70,6 +70,7 @@ kmip = ":abbr:`KMIP (Key Management Interoperability)`"
7070
kms = ":abbr:`KMS (Key Management Service)`"
7171
ldaps = ":abbr:`LDAPS (Secure Lightweight Directory Access Protocol)`"
7272
ldap = ":abbr:`LDAP (Lightweight Directory Access Protocol)`"
73+
mdb-shell= "MongoDB Shell"
7374
mms-full = "MongoDB Cloud Manager"
7475
mms = "Cloud Manager"
7576
mongo = ":binary:`~bin.mongo`"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. admonition:: Beta
2+
:class: note
3+
4+
|mdb-shell| is currently available as a **Beta** release. The
5+
product, its features, and the corresponding documentation may
6+
change during the Beta stage.

source/index.txt

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _mdb-shell-overview:
2+
13
=============
24
MongoDB Shell
35
=============
@@ -10,6 +12,104 @@ MongoDB Shell
1012
:depth: 1
1113
:class: singlecol
1214

15+
.. include:: /includes/admonitions/fact-mdb-shell-beta.rst
16+
17+
The |mdb-shell| is a fully functional JavaScript environment for
18+
interacting with MongoDB deployments. You can use the |mdb-shell| to
19+
test queries and operations directly with your database.
20+
21+
The |mdb-shell| is available as a standalone package in the MongoDB
22+
download center.
23+
24+
Download and Install the |mdb-shell|
25+
------------------------------------
26+
27+
.. tabs-platforms::
28+
29+
.. tab::
30+
:tabid: windows
31+
32+
Hello, I am Windows content.
33+
34+
.. tab::
35+
:tabid: macOS
36+
37+
Hello, I am macOS content.
38+
39+
.. tab::
40+
:tabid: linux
41+
42+
Hello, I am Linux (rpm / deb) content.
43+
44+
Multi-Line Operations in the |mdb-shell|
45+
----------------------------------------
46+
47+
Run the ``.editor`` command within the |mdb-shell| to open the editor
48+
and manage comprehensive multiline functions:
49+
50+
.. example::
51+
52+
Run the following command within the |mdb-shell|:
53+
54+
.. code-block:: javascript
55+
56+
.editor
57+
58+
The |mdb-shell| enters editor mode:
59+
60+
.. code-block:: javascript
61+
:copyable: false
62+
63+
// Entering editor mode (^D to finish, ^C to cancel)
64+
const { Writable } = require('stream');
65+
66+
const myWritable = new Writable({
67+
write(chunk, encoding, callback) {
68+
// ...
69+
},
70+
writev(chunks, callback) {
71+
// ...
72+
}
73+
});
74+
75+
- Press ``Cmd/Ctrl`` + ``d`` to finish and run your function.
76+
77+
- Press ``Cmd/Ctrl`` + ``c`` to cancel and exit without running your
78+
function.
79+
80+
When you close the editor, the |mdb-shell| does not save any functions
81+
you had entered into the editor.
82+
83+
.. note::
84+
85+
Currently, ``editor()`` is the only way to paste multiline commands
86+
into the |mdb-shell|.
87+
88+
89+
The |mdb-shell| versus the Legacy ``mongo`` Shell
90+
-------------------------------------------------
91+
92+
The |mdb-shell| offers numerous advantages over the legacy
93+
:binary:`mongo <mongo>` shell, such as:
94+
95+
- Improved syntax highlighting.
96+
97+
- Improved command history.
98+
99+
- Improved logging.
100+
101+
During the beta stage, the |mdb-shell| supports a subset of the legacy
102+
:binary:`mongo <mongo>` shell commands. Extending the |mdb-shell| |api|
103+
coverage is an ongoing effort.
104+
105+
The commands that the |mdb-shell| supports use the same syntax as the
106+
corresponding commands in the legacy :binary:`mongo <mongo>` shell.
107+
108+
Learn More
109+
----------
110+
111+
.. This will effectively be a ToC linking out to other parts of the docs
112+
13113
.. class:: hidden
14114

15115
.. toctree::

0 commit comments

Comments
 (0)