capabilities). It supports interactive and non\-interactive use. When used interactively, JavaScript can be used to query the database or perform any other function normally available with SpiderMonkey. Database output is displayed in JSON format.
.PP
If JavaScript files are specified on the command line, the shell will run non\-interactively, running each one in sequence and then exiting.
.SH"EXAMPLES"
.TP
.Bmongo
start the shell, connecting to the server at localhost:27017 and using the test database
.TP
.Bmongodfoo
start the shell using the foo database at localhost:27017
.TP
.Bmongod192.169.0.5/foo
start the shell using the foo database at 192.169.0.5:27017
.TP
.Bmongod192.169.0.5:9999/foo
start the shell using the foo database at 192.169.0.5:9999
.TP
.Bmongodscript1.jsscript2.jsscript3.js
run three scripts and exit
.SH"OPTIONS"
.TP
.B\-\-shell
run the shell after executing files
.TP
.B\-\-help
show usage information
.TP
.B\-\-hostHOST
server to connect to (default HOST=localhost)
.TP
.B\-\-portPORT
port to connect to (default PORT=27017)
.TP
.B\-\-nodb
do not connect to mongod
.TP
.B\-\-evalSCRIPT
evaluate JavaScript
.TP
.B\-uUSERNAME
specify user to log in as
.TP
.B\-pPASSWORD
specify password of user (notice there is no space)
.SH"COPYRIGHT"
.PP
Copyright 2007\-2009 10gen
.SH"SEE ALSO"
For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.