1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["14539"],{53035(e,t,r){r.r(t),r.d(t,{metadata:()=>n,default:()=>l,frontMatter:()=>o,contentTitle:()=>p,toc:()=>a,assets:()=>c});var n=JSON.parse('{"id":"cli/repo","title":"pnpm repo","description":"Added in: v11.3.0","source":"@site/versioned_docs/version-12.x/cli/repo.md","sourceDirName":"cli","slug":"/cli/repo","permalink":"/cli/repo","draft":false,"unlisted":false,"editUrl":"https://github.com/pnpm/pnpm.io/edit/main/docs/cli/repo.md","tags":[],"version":"12.x","lastUpdatedBy":null,"lastUpdatedAt":null,"frontMatter":{"id":"repo","title":"pnpm repo"},"sidebar":"docs","previous":{"title":"pnpm pkg","permalink":"/cli/pkg"},"next":{"title":"pnpm set-script","permalink":"/cli/set-script"}}'),s=r(91987),i=r(67008);let o={id:"repo",title:"pnpm repo"},p,c={},a=[{value:"Examples",id:"examples",level:2},{value:"Options",id:"options",level:2},{value:"--registry <url>",id:"--registry-url",level:3}];function d(e){let t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Added in: v11.3.0"}),"\n",(0,s.jsx)(t.p,{children:"Opens the URL of a package's repository in the browser."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"pnpm repo [<pkg> ...]\n"})}),"\n",(0,s.jsxs)(t.p,{children:["With no arguments, opens the repository of the current project (read from the ",(0,s.jsx)(t.code,{children:"repository"})," field of ",(0,s.jsx)(t.code,{children:"package.json"}),")."]}),"\n",(0,s.jsx)(t.p,{children:"With one or more package names, fetches each package's metadata from the registry and opens its repository URL."}),"\n",(0,s.jsxs)(t.p,{children:["The repository URL is normalized to its web equivalent \u2014 e.g. ",(0,s.jsx)(t.code,{children:"git+ssh://[email protected]/foo/bar.git"})," opens as ",(0,s.jsx)(t.code,{children:"https://github.com/foo/bar"}),". When the ",(0,s.jsx)(t.code,{children:"repository"})," field includes a ",(0,s.jsx)(t.code,{children:"directory"}),", the URL points at that subdirectory inside the repo."]}),"\n",(0,s.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"# Open the repo of the current project\npnpm repo\n\n# Open the repo of a package on the registry\npnpm repo lodash\n\n# Open multiple repos at once\npnpm repo react react-dom\n"})}),"\n",(0,s.jsx)(t.h2,{id:"options",children:"Options"}),"\n",(0,s.jsx)(t.h3,{id:"--registry-url",children:"--registry <url>"}),"\n",(0,s.jsxs)(t.p,{children:["The registry from which to fetch package metadata when an explicit package name is given. Per-scope and named registries (configured via ",(0,s.jsx)(t.a,{href:"/settings/dependency-resolution#registries",children:(0,s.jsx)(t.code,{children:"registries"})})," and ",(0,s.jsx)(t.a,{href:"/settings/dependency-resolution#namedregistries",children:(0,s.jsx)(t.code,{children:"namedRegistries"})}),") are respected."]})]})}function l(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},67008(e,t,r){r.d(t,{R:()=>o,x:()=>p});var n=r(71763);let s={},i=n.createContext(s);function o(e){let t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function p(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.