Repository: cli/cli
File: pkg/cmd/extension/command.go (Go)

Code before:
							repo = ghrepo.FullName(r)
						}
					}

					t.AddField(fmt.Sprintf("gh %s", c.Name()))
					t.AddField(repo)
					version := displayExtensionVersion(c, c.CurrentVersion())
					if c.IsPinned() {
						t.AddField(version, tableprinter.WithColor(cs.Cyan))
					} else {
						t.AddField(version)
					}

					t.EndRow()
				}
				return t.Render()
			},
		},
		func() *cobra.Command {
			var forceFlag bool
			var pinFlag string
			cmd := &cobra.Command{
				Use:   "install <repository>",
				Short: "Install a gh extension from a repository",
				Long: heredoc.Docf(`
					Install a GitHub CLI extension from a GitHub or local repository.

					For GitHub repositories, the repository argument can be specified in %[1]sOWNER/REPO%[1]s format or as a full repository URL.
					The URL format is useful when the repository is not hosted on github.com.

					For local repositories, often used while developing extensions, use %[1]s.%[1]s as the
					value of the repository argument. Note the following:

					- After installing an extension from a locally cloned repository, the GitHub CLI will
					manage this extension as a symbolic link pointing to an executable file with the same
					name as the repository in the repository's root.
						- For example, if the repository is named %[1]sgh-foobar%[1]s, the symbolic link will
						point to %[1]sgh-foobar%[1]s in the extension repository's root.
					- When executing the extension, the GitHub CLI will run the executable file found
					by following the symbolic link. If no executable file is found, the extension
					will fail to execute.
					- If the extension is precompiled, the executable file must be built manually and placed
					in the repository's root.

					For the list of available extensions, see <https://github.com/topics/gh-extension>.
				`, "`"),
				Example: heredoc.Doc(`
					# Install an extension from a remote repository hosted on GitHub.com
					$ gh extension install owner/gh-extension

					# Install an extension from a remote repository on a different GitHub host

Review comment (suggestion):
I don't think there's anything that requires the local directory to be a repository, so this doesn't seem quite right.

That said I understand that the short and use indicate that it's a repository, so let's just leave it alone.

Code after:
							repo = ghrepo.FullName(r)
						}
					}

					t.AddField(fmt.Sprintf("gh %s", c.Name()))
					t.AddField(repo)
					version := displayExtensionVersion(c, c.CurrentVersion())
					if c.IsPinned() {
						t.AddField(version, tableprinter.WithColor(cs.Cyan))
					} else {
						t.AddField(version)
					}

					t.EndRow()
				}
				return t.Render()
			},
		},
		func() *cobra.Command {
			var forceFlag bool
			var pinFlag string
			cmd := &cobra.Command{
				Use:   "install <repository>",
				Short: "Install a gh extension from a repository",
				Long: heredoc.Docf(`
					Install a GitHub CLI extension from a GitHub or local repository.

					For GitHub repositories, the repository argument can be specified in %[1]sOWNER/REPO%[1]s format or as a full repository URL.
					The URL format is useful when the repository is not hosted on github.com.

					For local repositories, often used while developing extensions, use %[1]s.%[1]s as the
					value of the repository argument. Note the following:

					- After installing an extension from a locally cloned repository, the GitHub CLI will
					manage this extension as a symbolic link (or equivalent mechanism on Windows) pointing
					to an executable file with the same name as the repository in the repository's root.
					For example, if the repository is named %[1]sgh-foobar%[1]s, the symbolic link will point
					to %[1]sgh-foobar%[1]s in the extension repository's root.
					- When executing the extension, the GitHub CLI will run the executable file found
					by following the symbolic link. If no executable file is found, the extension
					will fail to execute.
					- If the extension is precompiled, the executable file must be built manually and placed
					in the repository's root.

					For the list of available extensions, see <https://github.com/topics/gh-extension>.
				`, "`"),
				Example: heredoc.Doc(`
					# Install an extension from a remote repository hosted on GitHub
					$ gh extension install owner/gh-extension

					# Install an extension from a remote repository via full URL