{
  "id": "mongosh",
  "name": "MongoDB Shell",
  "homepage": "https://www.mongodb.com/docs/mongodb-shell/",
  "description": "The MongoDB Shell is a fully functional JavaScript and Node.js REPL environment for interacting with MongoDB deployments.",
  "icon": "SimpleIcons:mongodb",
  "executables": [
    "mongosh"
  ],
  "dotfiles": {
    "paths": [
      "~/.mongoshrc.js",
      "~/.mongodb/mongosh/config",
      "%APPDATA%/mongodb/mongosh/config"
    ],
    "exclude": [
      "~/.mongodb/mongosh/mongosh_repl_history",
      "%APPDATA%/mongodb/mongosh/mongosh_repl_history",
      "~/.mongodb/mongosh/snippets/",
      "%APPDATA%/mongodb/mongosh/snippets/"
    ],
    "secret": [],
    "machine_lines": [
      {
        "file": [
          "~/.mongodb/mongosh/config",
          "%APPDATA%/mongodb/mongosh/config"
        ],
        "format": "json",
        "match": {
          "key_path": [
            "logLocation"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Connect with the shell",
    "description": "Open mongosh against a MongoDB deployment. Passwords are left out; mongosh prompts for one when needed.",
    "quality": "ai-draft",
    "base": "fig:mongosh",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/mongosh.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "uri",
        "label": "Connection string",
        "type": "string",
        "position": 0,
        "suggestions": [
          {
            "value": "mongodb://localhost:27017",
            "label": "mongodb://localhost:27017"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "port",
        "label": "Port",
        "type": "integer",
        "option": [
          "--port"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "username",
        "label": "Username",
        "type": "string",
        "option": [
          "--username",
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "auth_db",
        "label": "Authentication database",
        "type": "string",
        "option": [
          "--authenticationDatabase"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "eval",
        "label": "Evaluate JavaScript and exit",
        "type": "string",
        "option": [
          "--eval"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "shell",
        "label": "Stay in the shell after --eval or a script",
        "type": "boolean",
        "option": [
          "--shell"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "tls",
        "label": "Use TLS",
        "type": "boolean",
        "option": [
          "--tls"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "quiet",
        "label": "Skip startup messages",
        "type": "boolean",
        "option": [
          "--quiet"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "nodb",
        "label": "Do not connect to a database",
        "type": "boolean",
        "option": [
          "--nodb"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "norc",
        "label": "Skip ~/.mongoshrc.js",
        "type": "boolean",
        "option": [
          "--norc"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "connect",
        "label": "Connect",
        "fields": [
          "uri",
          "username",
          "auth_db"
        ],
        "required": [
          "uri"
        ]
      },
      {
        "id": "local",
        "label": "Local shell",
        "fields": [
          "port",
          "quiet"
        ],
        "required": []
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "uri",
          "port",
          "username",
          "auth_db",
          "eval"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "shell",
          "tls",
          "quiet",
          "nodb",
          "norc"
        ]
      }
    ]
  }
}
