gv apigv authgv auth docker-logingv auth logingv auth logoutgv auth setup-gitgv auth statusgv auth tokengv issuegv issue closegv issue commentgv issue creategv issue editgv issue listgv issue reopengv issue viewgv packagegv package deletegv package listgv package pushgv package versionsgv prgv pr checkoutgv pr closegv pr commitsgv pr creategv pr diffgv pr editgv pr filesgv pr listgv pr reopengv pr viewgv releasegv release creategv release deletegv release listgv release uploadgv release viewgv repogv repo clonegv repo creategv repo deletegv repo forkgv repo listgv repo viewgv versiongvGitVerse from the command line
Work with GitVerse repositories, pull requests and issues without leaving the terminal.
gv <command> <subcommand> [flags]
| Флаг | Описание |
|---|---|
--help | Show help for command |
--hostname <string> | GitVerse hostname to operate against |
-v, --version | Show gv version |
$ gv repo view veryviolet/gv
$ gv pr list
$ gv issue create --title "Bug" --body "..."
$ gv api /user
gv apiMake an authenticated GitVerse API request
Make an authenticated HTTP request to the GitVerse API.
The endpoint is a path such as "/user" or "repos/{owner}/{repo}/pulls"; a full URL is also accepted. The placeholders {owner}, {repo} and {hostname} are filled in from the repository in the current directory.
The default method is GET, or POST when parameters are supplied. Parameters are sent as a query string for GET and HEAD, and as a JSON body otherwise.
With --paginate, every page of a collection is fetched and the arrays are merged into a single JSON array.
gv api <endpoint> [flags]
| Флаг | Описание |
|---|---|
-F, --field <key=value> | Add a typed parameter in key=value format |
-H, --header <key:value> | Add an HTTP request header in key:value format |
-i, --include | Include the HTTP status line and response headers |
--input <file> | Send the contents of file as the body (use "-" for stdin) |
-q, --jq <expression> | Filter the JSON response with a jq expression |
--limit <n> | Stop after fetching n items when paginating |
-X, --method <string> | HTTP method for the request |
--paginate | Fetch every page of a paginated collection |
-f, --raw-field <key=value> | Add a string parameter in key=value format |
--silent | Do not print the response body |
-t, --template <template> | Format the JSON response with a Go template |
# the authenticated user
$ gv api /user
# pull requests of the current repository
$ gv api repos/{owner}/{repo}/pulls
# every repository you can see, as a flat list of names
$ gv api /user/repos --paginate --jq '.[].full_name'
# create an issue
$ gv api repos/{owner}/{repo}/issues -f title='Bug' -f body='Steps...'
# close a pull request
$ gv api -X PATCH repos/{owner}/{repo}/pulls/12 -f state=closed
gv authAuthenticate gv with GitVerse
Manage the credentials gv uses.
GitVerse issues personal access tokens from the web interface; gv stores the token you paste in `$GV_CONFIG_DIR/hosts.yml` with 0600 permissions. The environment variables GV_TOKEN and GITVERSE_TOKEN take precedence over the stored credential and are never written to disk.
gv auth <command>
gv auth docker-loginLog the container engine in to the GitVerse registry
Authenticate docker or podman against the GitVerse container registry using the token gv already holds.
The registry lives on the same host as the repositories, so images are named `<host>/<owner>/<image>`. The token is passed to the engine on standard input and never appears in the process list or the shell history.
gv auth docker-login [flags]
| Флаг | Описание |
|---|---|
--engine <string> | Container engine to use: {docker|podman|nerdctl} |
-h, --hostname <string> | The GitVerse host whose registry to log in to |
--verify | Check the token against the registry before logging in |
$ gv auth docker-login
$ gv auth docker-login --engine podman
gv auth loginAuthenticate with a GitVerse host
Store a GitVerse personal access token.
GitVerse has no OAuth device flow, so the token is created in the web interface and pasted here. Create one at https://gitverse.ru/settings/tokens and grant it the scopes the commands you intend to use require.
gv auth login [flags]
| Флаг | Описание |
|---|---|
-p, --git-protocol <string> | The protocol to use for git operations: {https|ssh} |
-h, --hostname <string> | The GitVerse host to authenticate with |
--skip-verify | Store the token without checking it against the API |
--with-token | Read the token from standard input |
# paste the token interactively
$ gv auth login
# read the token from a file, for scripts and CI
$ gv auth login --with-token < token.txt
gv auth logoutRemove stored credentials for a host
Forget the token stored for a GitVerse host.
Tokens supplied through GV_TOKEN or GITVERSE_TOKEN are not stored by gv and cannot be removed this way; unset the variable instead.
gv auth logout [flags]
| Флаг | Описание |
|---|---|
-h, --hostname <string> | The host to log out of |
gv auth setup-gitConfigure git to authenticate with the stored token
Register gv as a git credential helper for a GitVerse host.
Afterwards `git clone`, `git fetch` and `git push` over HTTPS use the token gv holds, so no separate git credential setup is needed.
gv auth setup-git [flags]
| Флаг | Описание |
|---|---|
-h, --hostname <string> | The host to configure |
gv auth statusShow the authentication state
Report which hosts gv has credentials for, where each credential came from, and whether it is still accepted by the API.
gv auth status [flags]
| Флаг | Описание |
|---|---|
-h, --hostname <string> | Check a single host |
-t, --show-token | Display the token in the output |
--skip-verify | Do not contact the API |
gv auth tokenPrint the token gv would use
Print the authentication token gv resolves for a host.
Useful for feeding other tools, e.g. `curl -H "Authorization: Bearer $(gv auth token)"`.
gv auth token [flags]
| Флаг | Описание |
|---|---|
-h, --hostname <string> | The host to look up |
gv issueWork with issues
List, inspect, open and close issues.
GitVerse returns issues and pull requests from the same endpoint; gv filters pull requests out of issue listings unless --include-prs is given.
gv issue <command>
| Флаг | Описание |
|---|---|
-R, --repo <OWNER/REPO> | Select a repository using the OWNER/REPO format |
gv issue closeClose an issue
gv issue close <number> [flags]
| Флаг | Описание |
|---|---|
-c, --comment <comment> | Leave a closing comment |
$ gv issue close 12 --comment "Fixed in 1.4.1"
gv issue commentComment on an issue or pull request
Add a comment.
The same endpoint serves issues and pull requests, so this works for either.
gv issue comment <number> [flags]
| Флаг | Описание |
|---|---|
-b, --body <string> | Text of the comment |
-F, --body-file <file> | Read the comment from file (use "-" for stdin) |
$ gv issue comment 12 --body "Reproduced on 1.4.0"
$ git log -1 | gv issue comment 12 --body-file -
gv issue createOpen a new issue
Create an issue.
A title is required; gv does not open an editor. Use --body-file - to read a long description from standard input.
gv issue create [flags]
| Флаг | Описание |
|---|---|
-a, --assignee <people> | Assign people to the issue |
-b, --body <string> | Body of the issue |
-F, --body-file <file> | Read the body from file (use "-" for stdin) |
--due-date <date> | Due date in YYYY-MM-DD format |
-l, --label <labels> | Add labels to the issue |
-t, --title <string> | Title of the issue |
-w, --web | Open the new-issue form in a browser instead |
$ gv issue create --title "Crash on startup" --body "Steps: ..."
$ gv issue create -t "Docs" -F notes.md --label docs --assignee veryviolet
gv issue editEdit an issue
Change the title, body, labels or assignees of an issue.
Only the flags you pass are sent. Note that --label and --assignee replace the existing sets rather than adding to them, because the API takes whole lists.
gv issue edit <number> [flags]
| Флаг | Описание |
|---|---|
-a, --assignee <logins> | Replace the assignees with these logins |
-b, --body <string> | New body |
-F, --body-file <file> | Read the new body from file (use "-" for stdin) |
--due-date <date> | New due date in YYYY-MM-DD format |
-l, --label <names> | Replace the labels with these names |
-t, --title <string> | New title |
$ gv issue edit 12 --title "Clearer title"
$ gv issue edit 12 --label bug --label regression
gv issue listList issues
gv issue list [flags]
| Флаг | Описание |
|---|---|
-a, --assignee <login> | Filter by assignee login |
--author <login> | Filter by author login |
--include-prs | Include pull requests in the listing |
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the issues as JSON |
-l, --label <labels> | Filter by labels |
-L, --limit <int> | Maximum number of issues to list |
--mention <login> | Filter by mentioned login |
--milestone <milestone> | Filter by milestone |
-S, --search <query> | Search issues with a query |
-s, --state <string> | Filter by state: {open|closed|all} |
-t, --template <template> | Format the JSON output with a Go template |
-w, --web | List issues in a browser |
$ gv issue list
$ gv issue list --state all --label bug --limit 100
$ gv issue list --assignee veryviolet --json --jq '.[].title'
gv issue reopenReopen a closed issue
gv issue reopen <number> [flags]
| Флаг | Описание |
|---|---|
-c, --comment <comment> | Leave a comment when reopening |
$ gv issue reopen 12
gv issue viewShow an issue
gv issue view <number> [flags]
| Флаг | Описание |
|---|---|
-c, --comments | Show the comment thread |
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the issue as JSON |
-t, --template <template> | Format the JSON output with a Go template |
-w, --web | Open the issue in a browser |
$ gv issue view 12
$ gv issue view 12 --comments
gv packageWork with packages and container images
List and delete packages published to GitVerse.
Container images live in the registry on the same host as the repositories: an image is named `gitverse.ru/<owner>/<image>` and `docker login gitverse.ru` takes the same token gv uses — see `gv auth docker-login`.
The REST API can only address a package whose name is already known, so `gv package list` reads the registry catalogue instead.
gv package <command>
gv package deleteDelete a package or one of its versions
Delete a whole package, or a single version with --version.
This cannot be undone: an image deleted from the registry is gone, and anyone pulling that tag will start getting errors.
gv package delete [<owner>/]<package> [flags]
| Флаг | Описание |
|---|---|
--org | The owner is an organization |
--type <type> | Package type: {container|generic|debian|rpm|maven|npm|pypi|helm|nuget|go} |
--version <id> | Delete only this version id |
--yes | Skip the confirmation prompt |
$ gv package delete gv --version 42
$ gv package delete veryviolet/gv --yes
gv package listList container images of an owner
List the registry repositories belonging to an owner.
The REST API cannot enumerate packages, so this reads the registry catalogue, which is shared by the whole platform and sorted by name: gv starts at the owner's prefix rather than walking the catalogue from the beginning.
gv package list [<owner>] [flags]
| Флаг | Описание |
|---|---|
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the packages as JSON |
-L, --limit <int> | Maximum number of packages to list |
--tags | Also fetch the tags of each image |
-t, --template <template> | Format the JSON output with a Go template |
$ gv package list
$ gv package list veryviolet --tags
gv package pushPublish packages to the GitVerse registries
Upload .deb, .rpm or arbitrary files to the package registries.
The registry signs the repository metadata itself, so clients verify the packages against a published key — unlike a plain file share. The kind is guessed from the extension and can be forced with --kind.
Files are immutable: republishing the same name, version and architecture fails until the existing version is deleted.
gv package push <file>... [flags]
| Флаг | Описание |
|---|---|
--component <component> | Debian component |
--distribution <distribution> | Debian distribution |
--group <group> | RPM group; empty publishes to the owner-wide repository |
--kind <string> | Registry to use: {deb|rpm|generic} (guessed from the extension) |
--name <name> | Generic package name |
--owner <owner> | Publish under this owner instead of the authenticated user |
--version <version> | Generic package version |
$ gv package push dist/gv_0.2.0-1_amd64.deb
$ gv package push dist/*.rpm --group gv
$ gv package push notes.txt --kind generic --name gv --version 0.2.0
gv package versionsList the versions of a package
List the published versions of one package.
For container images the version name is the tag. Pass --org when the package belongs to an organization: users and organizations live under different API paths and gv cannot tell them apart from the name alone.
gv package versions [<owner>/]<package> [flags]
| Флаг | Описание |
|---|---|
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the versions as JSON |
-L, --limit <int> | Maximum number of versions to list |
--org | The owner is an organization |
-t, --template <template> | Format the JSON output with a Go template |
--type <type> | Package type: {container|generic|debian|rpm|maven|npm|pypi|helm|nuget|go} |
$ gv package versions gv
$ gv package versions veryviolet/gv
$ gv package versions myorg/service --org
gv prWork with pull requests
List, inspect and open pull requests.
Commands that take a pull request accept its number; inside a git checkout the pull request for the current branch is found automatically.
Note: the GitVerse API exposes no endpoint for merging a pull request, so gv has no "pr merge" command. Merge from the web interface.
gv pr <command>
| Флаг | Описание |
|---|---|
-R, --repo <OWNER/REPO> | Select a repository using the OWNER/REPO format |
gv pr checkoutCheck out a pull request locally
Fetch the head of a pull request and switch to it.
gv first tries the server-side ref "pull/<number>/head". Not every GitVerse deployment publishes those refs, so it falls back to fetching the head branch directly from the fork it lives in.
gv pr checkout <number> [flags]
| Флаг | Описание |
|---|---|
-b, --branch <name> | Local branch name to create |
$ gv pr checkout 42
$ gv pr checkout 42 --branch review-42
gv pr closeClose a pull request
gv pr close [<number>] [flags]
| Флаг | Описание |
|---|---|
-c, --comment <comment> | Leave a closing comment |
$ gv pr close 42 --comment "Superseded by #45"
gv pr commitsList the commits of a pull request
gv pr commits [<number>] [flags]
| Флаг | Описание |
|---|---|
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the commits as JSON |
-t, --template <template> | Format the JSON output with a Go template |
$ gv pr commits 42
gv pr createOpen a pull request
Create a pull request.
The head branch defaults to the current git branch and the base branch to the repository's default branch. A title is required; gv does not open an editor.
gv pr create [flags]
| Флаг | Описание |
|---|---|
-a, --assignee <people> | Assign people to the pull request |
-B, --base <branch> | The branch to merge into |
-b, --body <string> | Body of the pull request |
-F, --body-file <file> | Read the body from file (use "-" for stdin) |
-d, --draft | Open the pull request as a draft |
-H, --head <branch> | The branch that contains the commits |
-l, --label-id <id> | Add labels by numeric id |
--push | Push the head branch to the remote first |
-t, --title <string> | Title of the pull request |
-w, --web | Open the compare page in a browser instead |
$ gv pr create --title "Fix pagination" --body "Closes #12"
$ gv pr create -t "WIP" --draft --base develop
$ gv pr create -t "Docs" -F description.md --push
gv pr diffShow the changes of a pull request
Print the patch of a pull request.
The diff is assembled from the per-file patches the API returns, so it is a unified diff without the commit headers a "git format-patch" would carry.
gv pr diff [<number>] [flags]
| Флаг | Описание |
|---|---|
--name-only | Print only the names of the changed files |
$ gv pr diff
$ gv pr diff 42 --name-only
gv pr editEdit a pull request
Change the title, body or base branch of a pull request.
Only the flags you pass are sent, so unspecified fields keep their values.
gv pr edit [<number>] [flags]
| Флаг | Описание |
|---|---|
-B, --base <branch> | New base branch |
-b, --body <string> | New body |
-F, --body-file <file> | Read the new body from file (use "-" for stdin) |
-t, --title <string> | New title |
$ gv pr edit 42 --title "Better title"
$ gv pr edit 42 --body-file notes.md
$ gv pr edit 42 --base develop
gv pr filesList the files a pull request changes
gv pr files [<number>] [flags]
| Флаг | Описание |
|---|---|
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the files as JSON |
-t, --template <template> | Format the JSON output with a Go template |
$ gv pr files 42
gv pr listList pull requests
gv pr list [flags]
| Флаг | Описание |
|---|---|
-B, --base <branch> | Filter by base branch |
--direction <direction> | Sort direction: {asc|desc} |
-H, --head <string> | Filter by head branch, as "branch" or "owner:branch" |
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the pull requests as JSON |
-L, --limit <int> | Maximum number of pull requests to list |
--sort <field> | Sort by field |
-s, --state <string> | Filter by state: {open|closed|merged|all} |
-t, --template <template> | Format the JSON output with a Go template |
-w, --web | List pull requests in a browser |
$ gv pr list
$ gv pr list --state all --limit 50
$ gv pr list --base main --json --jq '.[].title'
gv pr reopenReopen a closed pull request
gv pr reopen [<number>] [flags]
| Флаг | Описание |
|---|---|
-c, --comment <comment> | Leave a comment when reopening |
$ gv pr reopen 42
gv pr viewShow a pull request
Display the title, state, body and metadata of a pull request.
Without a number, the pull request for the current branch is used.
gv pr view [<number>] [flags]
| Флаг | Описание |
|---|---|
-c, --comments | Show the comment thread |
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the pull request as JSON |
-t, --template <template> | Format the JSON output with a Go template |
-w, --web | Open the pull request in a browser |
$ gv pr view
$ gv pr view 42 --comments
$ gv pr view 42 --web
gv releaseWork with releases
Publish releases and attach build artefacts to them.
A release is identified by its tag; the tag must already exist in the repository, or be created from --target when the release is published.
gv release <command>
| Флаг | Описание |
|---|---|
-R, --repo <OWNER/REPO> | Select a repository using the OWNER/REPO format |
gv release createPublish a release
Create a release for a tag and, optionally, attach files to it.
Files given as positional arguments or with --asset are uploaded once the release exists.
gv release create <tag> [<file>...] [flags]
| Флаг | Описание |
|---|---|
-a, --asset <files> | Additional files to attach |
-d, --draft | Save the release as a draft |
-n, --notes <string> | Release notes |
-F, --notes-file <file> | Read the release notes from file (use "-" for stdin) |
-p, --prerelease | Mark the release as a prerelease |
--target <string> | Branch or commit the tag should point at |
-t, --title <string> | Title of the release |
$ gv release create v0.1.0 --title "gv 0.1.0" --notes-file CHANGELOG.md
$ gv release create v0.1.0 dist/*.deb dist/*.rpm
$ gv release create v0.2.0-rc1 --prerelease --target main
gv release deleteDelete a release
Delete a release. The git tag itself is left alone.
gv release delete <tag> [flags]
| Флаг | Описание |
|---|---|
--yes | Skip the confirmation prompt |
$ gv release delete v0.1.0 --yes
gv release listList releases
gv release list [flags]
| Флаг | Описание |
|---|---|
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the releases as JSON |
-L, --limit <int> | Maximum number of releases to list |
-t, --template <template> | Format the JSON output with a Go template |
gv release uploadAttach files to a release
Upload build artefacts to an existing release.
With --clobber an asset of the same name is deleted first; otherwise the API decides what to do with a duplicate name.
gv release upload <tag> <file>... [flags]
| Флаг | Описание |
|---|---|
--clobber | Replace assets of the same name |
$ gv release upload v0.1.0 dist/gv_0.1.0_amd64.deb
$ gv release upload v0.1.0 dist/* --clobber
gv release viewShow a release
Show a release and the files attached to it. Without a tag, the latest release is shown.
gv release view [<tag>] [flags]
| Флаг | Описание |
|---|---|
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the release as JSON |
-t, --template <template> | Format the JSON output with a Go template |
-w, --web | Open the release in a browser |
gv repoWork with GitVerse repositories
Create, inspect, clone and fork repositories.
Commands that take a repository accept it as "OWNER/REPO"; run inside a git repository with a GitVerse remote and the argument can be omitted.
gv repo <command>
gv repo cloneClone a repository locally
Clone a GitVerse repository.
Arguments after "--" are passed straight to git clone. When the repository is a fork, a remote named "upstream" is added for its parent.
gv repo clone <repository> [<directory>] [-- <git-flags>...]
| Флаг | Описание |
|---|---|
-p, --protocol <string> | Clone protocol to use: {https|ssh} |
--upstream-remote-name <name> | Remote name to create for the parent of a fork |
$ gv repo clone gitverse/rest-api-description
$ gv repo clone veryviolet/gv gv-cli
$ gv repo clone veryviolet/gv -- --depth 1
gv repo createCreate a new repository
Create a repository on GitVerse.
Pass "OWNER/NAME" to create it inside an organization you belong to; a bare name creates it under your own account. New repositories are private unless --public is given.
gv repo create <name> [flags]
| Флаг | Описание |
|---|---|
--add-readme | Initialise the repository with a README |
-c, --clone | Clone the new repository afterwards |
-d, --description <string> | Description of the repository |
--gitignore <templates> | Gitignore templates to apply |
--private | Make the repository private (default) |
--public | Make the repository public |
--template | Mark the repository as a template |
$ gv repo create my-project --private --add-readme
$ gv repo create myorg/service --description "Billing service" --public
$ gv repo create tools --clone
gv repo deleteDelete a repository
Delete a repository on GitVerse. This cannot be undone.
Interactively you are asked to retype the full repository name. In scripts, pass --yes to skip the prompt.
gv repo delete [<repository>] [flags]
| Флаг | Описание |
|---|---|
--yes | Skip the confirmation prompt |
$ gv repo delete veryviolet/scratch
$ gv repo delete veryviolet/scratch --yes
gv repo forkCreate a fork of a repository
Fork a repository into your account or an organization.
Run inside a clone of the upstream repository and pass --remote to add the new fork as a git remote.
gv repo fork [<repository>] [flags]
| Флаг | Описание |
|---|---|
--clone | Clone the fork afterwards |
--fork-name <string> | Rename the forked repository |
--org <organization> | Create the fork in an organization |
--remote | Add the fork as a git remote in the current repository |
--remote-name <name> | Remote name to use with --remote |
$ gv repo fork gitverse/rest-api-description --clone
$ gv repo fork --org myorg --remote
gv repo listList repositories
List repositories owned by you, by a user, or by an organization.
The API returns every repository the token can see; the --fork, --source, --public and --private flags filter that list client-side.
gv repo list [<owner>] [flags]
| Флаг | Описание |
|---|---|
--fork | Show only forks |
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the repositories as JSON |
-L, --limit <int> | Maximum number of repositories to list |
--org <organization> | List repositories of an organization |
--private | Show only private repositories |
--public | Show only public repositories |
--source | Show only repositories that are not forks |
-t, --template <template> | Format the JSON output with a Go template |
$ gv repo list
$ gv repo list veryviolet --limit 50
$ gv repo list --org myorg --source
gv repo viewShow a repository
Display the description, statistics and README of a repository.
Without an argument the repository of the current directory is used.
gv repo view [<repository>] [flags]
| Флаг | Описание |
|---|---|
-b, --branch <branch> | Read the README from this branch |
-q, --jq <expression> | Filter the JSON output with a jq expression |
--json | Output the repository as JSON |
-t, --template <template> | Format the JSON output with a Go template |
-w, --web | Open the repository in a browser |
$ gv repo view
$ gv repo view gitverse/rest-api-description
$ gv repo view --web
gv versionPrint the version of gv
gv version