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

Add snippet package manager

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.15.0
    • Component/s: Shell
    • Labels:
      None
    • Documentation Changes:
      Needed
    • Documentation Changes Summary:
      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}
    • Sprint:
      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

              Assignee:
              anna.henningsen Anna Henningsen
              Reporter:
              anna.henningsen Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: