Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-701

Add snippet package manager

    XMLWordPrintableJSON

Details

    • Story
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.15.0
    • Embedded Shell
    • None
    • Needed
    • Hide
      We added an experimental feature called `snippet` to mongosh. The product description in WRITING-8157 probably contains a good overview over what is provided here.

      This feature is experimental. Specifically, we do not offer support for it at this point, and provide it on a best-effort basis, and we may make changes to this feature or remove it at any time.

      https://github.com/mongodb-labs/mongosh-snippets contains a FAQ document with a few questions that we believe people might ask about this feature.

      More specifically, the following commands are provided:

      {code}
        snippet install <name> Install a new snippet
        snippet uninstall <name> Remove an installed snippet
        snippet update Get the latest versions of installed snippets
        snippet search List available snippets
        snippet ls List installed snippets
        snippet outdated List outdated snippets
        snippet help Show this text
        snippet help <name> Show information about a specific snippet
        snippet info Show information about the snippet repository
        snippet refresh Clear and refresh the snippet metadata cache
        snippet load-all Load all installed snippets using load()
      {code}
      Show
      We added an experimental feature called `snippet` to mongosh. The product description in WRITING-8157 probably contains a good overview over what is provided here. This feature is experimental. Specifically, we do not offer support for it at this point, and provide it on a best-effort basis, and we may make changes to this feature or remove it at any time. https://github.com/mongodb-labs/mongosh-snippets contains a FAQ document with a few questions that we believe people might ask about this feature. More specifically, the following commands are provided: {code}   snippet install <name> Install a new snippet   snippet uninstall <name> Remove an installed snippet   snippet update Get the latest versions of installed snippets   snippet search List available snippets   snippet ls List installed snippets   snippet outdated List outdated snippets   snippet help Show this text   snippet help <name> Show information about a specific snippet   snippet info Show information about the snippet repository   snippet refresh Clear and refresh the snippet metadata cache   snippet load-all Load all installed snippets using load() {code}
    • Iteration Düsseldorf, Iteration Edinburgh

    Description

      Do we want to adopt my skunkworks project, `snippet`, for mongosh in some way? PR: https://github.com/mongodb-js/mongosh/pull/783

      Some design decisions I made along the way:

      • The official repository for snippets is a single public github monorepo
      • Snippets are npm packages and are installed that way (and thus can depend on other packages)
      • The repository automatically maintains a list of them and their npm names
      • If npm is not available for use, the latest version is downloaded and extracted

      Attachments

        Issue Links

          Activity

            People

              anna.henningsen@mongodb.com Anna Henningsen
              anna.henningsen@mongodb.com Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: