diff --git a/.gitea/workflows/update_cli_reference.yaml b/.gitea/workflows/update_cli_reference.yaml deleted file mode 100644 index db6e9779..00000000 --- a/.gitea/workflows/update_cli_reference.yaml +++ /dev/null @@ -1,114 +0,0 @@ -name: update cli reference - -on: - schedule: - - cron: '45 3 * * 1' # every Monday at 03:45 - workflow_dispatch: - -env: - # main is protected, so the update is proposed as a pull request from this branch - BOT_BRANCH: bot/update-cli-reference - BASE_BRANCH: main - # the develop cli docs follow the main branch of gitea/cli, every documented - # release series follows its newest stable tag. The value is used unquoted, so - # the glob is expanded by the shell of each step, which drops it with nullglob - # as long as no series is documented. - TARGET_DIRS: cli-docs/reference cli-docs_versioned_docs/version-*/reference - -jobs: - update-cli-reference: - if: github.repository == 'gitea/docs' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - with: - ref: main - # pushing uses DEPLOY_TOKEN, keep the ephemeral job token out of .git/config - persist-credentials: false - - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7 - with: - go-version: 'stable' - cache: false - - name: regenerate the cli reference pages - run: | - set -euo pipefail - ./update_cli_docs.sh main cli-docs/reference - ./update_cli_docs.sh --released - - name: verify the generated files - run: | - set -euo pipefail - shopt -s nullglob - # the pages are generated from gt's command tree, so a broken - # generator would silently drop pages or leave them almost empty - for dir in $TARGET_DIRS; do - echo "checking $dir" - grep -q '^gt \[flags\]' "$dir/index.md" - grep -q '^gt issue create \[flags\]' "$dir/issue/create.md" - grep -q -- '--no-input' "$dir/help/environment.md" - test "$(find "$dir" -name '*.md' | wc -l)" -gt 100 - done - - name: push bot branch - id: bot_branch - env: - DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} - run: | - set -euo pipefail - shopt -s nullglob - - # git status also sees the pages of a new command, which git diff does not - if [ -z "$(git status --porcelain -- $TARGET_DIRS)" ]; then - echo "the cli reference is already up to date" - echo "changed=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - - if [ -z "$DEPLOY_TOKEN" ]; then - echo "secrets.DEPLOY_TOKEN is missing, cannot push the update" - exit 1 - fi - remote="https://x-access-token:$DEPLOY_TOKEN@${GITHUB_SERVER_URL#*://}/$GITHUB_REPOSITORY.git" - - # skip if an open bot branch already carries exactly these files - if git fetch --quiet --depth=1 "$remote" "refs/heads/$BOT_BRANCH" 2>/dev/null; then - if git diff --quiet FETCH_HEAD -- $TARGET_DIRS; then - echo "$BOT_BRANCH already proposes this cli reference" - echo "changed=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - fi - - git config user.name "Gitea Bot" - git config user.email "teabot@gitea.io" - git switch --create "$BOT_BRANCH" - git add --all -- $TARGET_DIRS - git commit -m "Update the cli reference pages" - # force push: the branch is always rebuilt on top of the current main - git push --force "$remote" "HEAD:refs/heads/$BOT_BRANCH" - echo "changed=true" >> "$GITHUB_OUTPUT" - - name: create pull request - if: steps.bot_branch.outputs.changed == 'true' - env: - DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} - run: | - set -euo pipefail - - cat > pull.json < --help` documents each command. ## Deployment diff --git a/cli-docs/reference/admin/index.md b/cli-docs/reference/admin/index.md deleted file mode 100644 index 0af1585b..00000000 --- a/cli-docs/reference/admin/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_position: 1 -description: "Manage instance administration" ---- - -# gt admin - - - -Manage instance administration - -## Synopsis - -```text -Administer the Gitea instance. These commands need an administrator account. -``` - -``` -gt admin [flags] -``` - -## Options - -``` - -h, --help help for admin -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt admin user](../admin/user/index.md): Manage registered accounts diff --git a/cli-docs/reference/admin/user/create.md b/cli-docs/reference/admin/user/create.md deleted file mode 100644 index 0d4d7952..00000000 --- a/cli-docs/reference/admin/user/create.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -sidebar_position: 1 -description: "Create an account" ---- - -# gt admin user create - - - -Create an account - -## Synopsis - -```text -Create an account. On a terminal, gt asks for a missing username, email address and -password; the new account must change its password on its first sign-in unless ---must-change-password=false is passed. -``` - -``` -gt admin user create [] [flags] -``` - -## Examples - -``` -$ gt admin user create carol --email carol@example.com -# read the password from a file instead of a prompt -$ gt admin user create ci-bot --email ci@example.com --password-file pw.txt --must-change-password=false -``` - -## Options - -``` - --admin Administrator privileges (use =false to revoke) - --email string Email address - --full-name string Display name - -h, --help help for create - --must-change-password Require password change on next sign-in (use =false to disable) (default true) - --password string Password (prefer --password-file) - --password-file string Read password from file or - for stdin; remove one trailing line ending - --prohibit-login Prohibit signing in (use =false to revoke) - --restricted Restrict account access (use =false to revoke) - --username string Account username - --visibility string Profile visibility, by default the instance's default {public|limited|private} -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin user](../../admin/user/index.md): Manage registered accounts diff --git a/cli-docs/reference/admin/user/delete.md b/cli-docs/reference/admin/user/delete.md deleted file mode 100644 index 795b3f11..00000000 --- a/cli-docs/reference/admin/user/delete.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 2 -description: "Delete an account" ---- - -# gt admin user delete - - - -Delete an account - -## Synopsis - -```text -Delete an account. Gitea refuses while the user owns repositories or organizations, unless ---purge deletes the account with everything it owns. -``` - -``` -gt admin user delete [flags] -``` - -## Examples - -``` -$ gt admin user delete spammer -# also delete the user's repositories, packages and organization memberships (and organizations they solely own) -$ gt admin user delete spammer --purge -``` - -## Options - -``` - -h, --help help for delete - --purge Also delete the user's repositories, packages, organization memberships and the organizations they solely own -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin user](../../admin/user/index.md): Manage registered accounts diff --git a/cli-docs/reference/admin/user/edit.md b/cli-docs/reference/admin/user/edit.md deleted file mode 100644 index 0ba44d90..00000000 --- a/cli-docs/reference/admin/user/edit.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -sidebar_position: 3 -description: "Edit an account" ---- - -# gt admin user edit - - - -Edit an account - -``` -gt admin user edit [flags] -``` - -## Examples - -``` -$ gt admin user edit bob --full-name "Bob Builder" --restricted -# reset a password and require a new one on the next sign-in -$ gt admin user edit bob --password-file pw.txt --must-change-password -# revoke administrator privileges -$ gt admin user edit bob --admin=false -``` - -## Options - -``` - --active Activate account (use =false to revoke) - --admin Administrator privileges (use =false to revoke) - --allow-create-organization Allow creating organizations (use =false to revoke) - --allow-git-hook Allow Git hooks (use =false to revoke) - --allow-import-local Allow local repository imports (use =false to revoke) - --description string Profile description - --email string Email address - --full-name string Display name - -h, --help help for edit - --location string Location - --max-repo-creation int Repository creation limit (-1 uses the instance default) - --must-change-password Require password change on next sign-in (use =false to disable) - --password string Password (prefer --password-file) - --password-file string Read password from file or - for stdin; remove one trailing line ending - --prohibit-login Prohibit signing in (use =false to revoke) - --restricted Restrict account access (use =false to revoke) - --visibility string Profile visibility {public|limited|private} - --website string Website URL -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin user](../../admin/user/index.md): Manage registered accounts diff --git a/cli-docs/reference/admin/user/index.md b/cli-docs/reference/admin/user/index.md deleted file mode 100644 index 1bb6da2b..00000000 --- a/cli-docs/reference/admin/user/index.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 1 -description: "Manage registered accounts" ---- - -# gt admin user - - - -Manage registered accounts - -## Synopsis - -```text -List, view, create, edit and delete the accounts of the instance. These commands need an -administrator account. -``` - -``` -gt admin user [flags] -``` - -## Options - -``` - -h, --help help for user -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin](../../admin/index.md): Manage instance administration -* [gt admin user create](../../admin/user/create.md): Create an account -* [gt admin user delete](../../admin/user/delete.md): Delete an account -* [gt admin user edit](../../admin/user/edit.md): Edit an account -* [gt admin user list](../../admin/user/list.md): List registered accounts -* [gt admin user view](../../admin/user/view.md): View an account diff --git a/cli-docs/reference/admin/user/list.md b/cli-docs/reference/admin/user/list.md deleted file mode 100644 index 85a2635a..00000000 --- a/cli-docs/reference/admin/user/list.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 4 -description: "List registered accounts" ---- - -# gt admin user list - - - -List registered accounts - -``` -gt admin user list [flags] -``` - -## Examples - -``` -$ gt admin user list -# find accounts by username, name or email -$ gt admin user list --query bob -# print the email addresses -$ gt admin user list --jq '.[].email' -``` - -## Options - -``` - -h, --help help for list - -L, --limit int Maximum number of results (1..1000) (default 30) - --page int Result page (default 1) - --query string Only list accounts whose username, name or email contains this text -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin user](../../admin/user/index.md): Manage registered accounts diff --git a/cli-docs/reference/admin/user/view.md b/cli-docs/reference/admin/user/view.md deleted file mode 100644 index 94f3f1d7..00000000 --- a/cli-docs/reference/admin/user/view.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_position: 5 -description: "View an account" ---- - -# gt admin user view - - - -View an account - -``` -gt admin user view [flags] -``` - -## Examples - -``` -$ gt admin user view bob -$ gt admin user view bob --json email,admin -``` - -## Options - -``` - -h, --help help for view -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin user](../../admin/user/index.md): Manage registered accounts diff --git a/cli-docs/reference/alias/delete.md b/cli-docs/reference/alias/delete.md deleted file mode 100644 index 4204aa27..00000000 --- a/cli-docs/reference/alias/delete.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -sidebar_position: 1 -description: "Delete shortcuts" ---- - -# gt alias delete - - - -Delete shortcuts - -``` -gt alias delete [...] [flags] -``` - -## Examples - -``` -$ gt alias delete il -$ gt alias delete il review -$ gt alias delete --all -``` - -## Options - -``` - --all Delete every alias - -h, --help help for delete -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt alias](../alias/index.md): Create shortcuts for gt commands diff --git a/cli-docs/reference/alias/index.md b/cli-docs/reference/alias/index.md deleted file mode 100644 index 2493974e..00000000 --- a/cli-docs/reference/alias/index.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -sidebar_position: 2 -description: "Create shortcuts for gt commands" ---- - -# gt alias - - - -Create shortcuts for gt commands - -## Synopsis - -```text -Create shortcuts for gt commands. - -An alias expands to a gt command with its arguments before gt runs it: after -gt alias set il "issue list --label bug", gt il --state all runs -gt issue list --label bug --state all. $1, $2 and so on in the expansion take the -arguments in that position; other arguments follow the expansion. Aliases never run a -shell, and built-in commands always win over an alias of the same name. -``` - -``` -gt alias [flags] -``` - -## Options - -``` - -h, --help help for alias -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt alias delete](../alias/delete.md): Delete shortcuts -* [gt alias list](../alias/list.md): List shortcuts -* [gt alias set](../alias/set.md): Create a shortcut for a gt command diff --git a/cli-docs/reference/alias/list.md b/cli-docs/reference/alias/list.md deleted file mode 100644 index 968a37c7..00000000 --- a/cli-docs/reference/alias/list.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 2 -description: "List shortcuts" ---- - -# gt alias list - - - -List shortcuts - -``` -gt alias list [flags] -``` - -## Examples - -``` -$ gt alias list -# Print the expansion of one alias -$ gt alias list --jq .il -``` - -## Options - -``` - -h, --help help for list -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt alias](../alias/index.md): Create shortcuts for gt commands diff --git a/cli-docs/reference/alias/set.md b/cli-docs/reference/alias/set.md deleted file mode 100644 index d15f350d..00000000 --- a/cli-docs/reference/alias/set.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 3 -description: "Create a shortcut for a gt command" ---- - -# gt alias set - - - -Create a shortcut for a gt command - -``` -gt alias set [flags] -``` - -## Examples - -``` -# gt il runs gt issue list --label bug -$ gt alias set il "issue list --label bug" -# $1 takes the first argument: gt review 13 runs gt pr review 13 --approve -$ gt alias set review 'pr review $1 --approve' -# Replace an existing alias -$ gt alias set il "issue list --assignee @me" --clobber -``` - -## Options - -``` - --clobber Replace an existing alias of the same name - -h, --help help for set -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt alias](../alias/index.md): Create shortcuts for gt commands diff --git a/cli-docs/reference/api.md b/cli-docs/reference/api.md deleted file mode 100644 index 923da942..00000000 --- a/cli-docs/reference/api.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -sidebar_position: 3 -description: "Make an authenticated Gitea API request" ---- - -# gt api - - - -Make an authenticated Gitea API request - -## Synopsis - -```text -Make an authenticated request to the Gitea API of the selected instance and print -the response. - -The endpoint is a path under /api/v1, such as repos/{owner}/{repo}/issues, or a URL of -the instance's API. The placeholders {owner} and {repo} take the repository of the -current directory or --repo, and {branch} the checked-out Git branch. - -The method is GET, or POST when fields or --input supply a request body; -X selects -another. Fields become query parameters of GET and HEAD requests and a JSON body -otherwise: - - -f, --raw-field name=value a string value - -F, --field name=value a typed value: true, false, null, numbers, arrays and - objects are JSON, @FILE reads a file and @- stdin - ---paginate follows the next-page links of a GET request, or asks for the next page of -a list that Gitea counts in X-Total-Count without links, and prints every page on its -own line. --jq filters each JSON response with a jq expression and prints strings -without quotes; jq does not need to be installed. - -On a terminal, JSON responses are indented and colored. A response outside 2xx prints -its body, then fails with the HTTP status. -``` - -``` -gt api [flags] -``` - -## Examples - -``` -$ gt api user --jq .login -# Create an issue: -f sends strings, -F typed values -$ gt api repos/{owner}/{repo}/issues -f title="Crash on start" -F labels='[3]' -$ gt api user/repos --paginate --jq '.[].full_name' -``` - -## Options - -``` - -F, --field key=value Add a typed parameter in key=value format; @FILE or @- reads a file or stdin - -H, --header name:value Add an HTTP request header in name:value format - -h, --help help for api - -i, --include Print the response status and headers to stderr - --input file Read the request body from a file, or stdin with - - --max-pages int Stop --paginate after this many pages; reaching the default fails (default 1000) - -X, --method method HTTP method (default "GET") - --output-file file Write the complete response to a new file - --paginate Follow next-page links and print every page - -f, --raw-field key=value Add a string parameter in key=value format - --silent Do not print the response body - --verbose Print the request and the response status and headers to stderr -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](index.md): Work with Gitea from your terminal diff --git a/cli-docs/reference/auth/index.md b/cli-docs/reference/auth/index.md deleted file mode 100644 index 57e64368..00000000 --- a/cli-docs/reference/auth/index.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -sidebar_position: 4 -description: "Authenticate gt and git with Gitea" ---- - -# gt auth - - - -Authenticate gt and git with Gitea - -## Synopsis - -```text -Authenticate gt and git with Gitea. - -gt keeps the accounts of each instance in hosts.yml and their tokens in the system -keyring, or in a private file when you choose so. One account per instance is active; ---user or GITEA_CLI_USER selects another for a single command. GITEA_TOKEN, together with -GITEA_CLI_HOST or GITEA_INSTANCE_URL, replaces the stored credentials of its instance for the -active account too; it must belong to the account that --user or GITEA_CLI_USER names. See -gt help environment for how commands select the instance. -``` - -``` -gt auth [flags] -``` - -## Options - -``` - -h, --help help for auth -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt auth login](../auth/login.md): Log in to a Gitea instance -* [gt auth logout](../auth/logout.md): Log out of an account -* [gt auth refresh](../auth/refresh.md): Refresh an OAuth token -* [gt auth setup-git](../auth/setup-git.md): Configure git to use gt for credentials -* [gt auth status](../auth/status.md): Show the accounts gt can use -* [gt auth switch](../auth/switch.md): Switch the active account of an instance -* [gt auth token](../auth/token.md): Print the access token of an account diff --git a/cli-docs/reference/auth/login.md b/cli-docs/reference/auth/login.md deleted file mode 100644 index 2b271c33..00000000 --- a/cli-docs/reference/auth/login.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -sidebar_position: 1 -description: "Log in to a Gitea instance" ---- - -# gt auth login - - - -Log in to a Gitea instance - -## Synopsis - -```text -Log in to a Gitea instance. On a terminal without a method flag, gt asks for the instance, -how to log in, where to keep the token and whether git should use gt for the instance. - -Create a token on the instance under Settings > Applications. Logging in to an account -that gt already has replaces its stored credential after a confirmation (or with --yes). -``` - -``` -gt auth login [flags] -``` - -## Examples - -``` -$ gt auth login -$ gt auth login --host gitea.com --with-token < token.txt -$ gt auth login --host gitea.com --oauth --scopes read:repository,read:user -$ gt auth login --host gitea.example.com --with-token --header 'CF-Access-Client-Id: $CF_ID' --header 'CF-Access-Client-Secret: $CF_SECRET' -``` - -## Options - -``` - --client-cert file Present the PEM TLS client certificate in file to an instance that requires one; convert a PKCS#12 file with: openssl pkcs12 -in cert.p12 -clcerts -nokeys -out cert.pem - --client-id ID OAuth application ID registered on the instance (default: the instance's stored ID, then gt's); implies --oauth - --client-key file Unencrypted PEM private key file of --client-cert (default: the key in the --client-cert file); convert a PKCS#12 file with: openssl pkcs12 -in cert.p12 -nocerts -nodes -out key.pem - --credential-store string Where to keep the token {keyring|file} (default "keyring") - --header "Name: value" Send the "Name: value" header with every request to this instance, such as an access proxy needs; a value of $NAME or ${NAME} is read from that environment variable (repeatable) - -h, --help help for login - --insecure Skip TLS certificate verification for this instance - --oauth Authorize in a web browser with OAuth - --scopes scopes OAuth token scopes, such as read:repository (default: write access to everything but administration); implies --oauth - --ssh-agent-key fingerprint Sign requests with the ssh-agent key of fingerprint - --ssh-agent-principal principal Sign requests with the ssh-agent certificate of principal - --ssh-key file Sign requests with the SSH private key in file - --with-token Read an access token from stdin, or ask for it on a terminal -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/auth/logout.md b/cli-docs/reference/auth/logout.md deleted file mode 100644 index d360ecd9..00000000 --- a/cli-docs/reference/auth/logout.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 2 -description: "Log out of an account" ---- - -# gt auth logout - - - -Log out of an account - -## Synopsis - -```text -Log out of an account: gt forgets the account and deletes its stored credential. Git's -other credential helpers are asked to forget what they stored for the account on the -instance, such as a copy of its token that a keychain kept after a push. -``` - -``` -gt auth logout [] [flags] -``` - -## Examples - -``` -$ gt auth logout -$ gt auth logout bob --host gitea.com -# Without confirmation -$ gt auth logout alice --yes -``` - -## Options - -``` - -h, --help help for logout -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/auth/refresh.md b/cli-docs/reference/auth/refresh.md deleted file mode 100644 index 106d2dc0..00000000 --- a/cli-docs/reference/auth/refresh.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -sidebar_position: 3 -description: "Refresh an OAuth token" ---- - -# gt auth refresh - - - -Refresh an OAuth token - -## Synopsis - -```text -Refresh the OAuth token of the active account, or of --user, now. gt refreshes expiring -OAuth tokens on its own; tokens pasted with --with-token cannot be refreshed and are -replaced by logging in again. -``` - -``` -gt auth refresh [flags] -``` - -## Examples - -``` -$ gt auth refresh -$ gt auth refresh --host gitea.com --user alice -``` - -## Options - -``` - -h, --help help for refresh -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/auth/setup-git.md b/cli-docs/reference/auth/setup-git.md deleted file mode 100644 index 4b895ef3..00000000 --- a/cli-docs/reference/auth/setup-git.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -sidebar_position: 4 -description: "Configure git to use gt for credentials" ---- - -# gt auth setup-git - - - -Configure git to use gt for credentials - -## Synopsis - -```text -Configure git to ask gt for the credentials of an instance, so that git push and fetch -over HTTPS use the active account, or the account of --user. gt's own clone and checkout -commands do not need this. - -Other credential helpers, such as a system keychain, are turned off for the instance: -otherwise they answer first and keep a copy of gt's token. --keep-helpers keeps them. -``` - -``` -gt auth setup-git [flags] -``` - -## Examples - -``` -$ gt auth setup-git -$ gt auth setup-git --host gitea.com -# Only for the current repository, always as alice -$ gt auth setup-git --local --user alice -``` - -## Options - -``` - -h, --help help for setup-git - --keep-helpers Keep other credential helpers for the instance; they are asked first and store gt's token - --local Configure only the current Git repository instead of global Git configuration -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/auth/status.md b/cli-docs/reference/auth/status.md deleted file mode 100644 index 3e278fb1..00000000 --- a/cli-docs/reference/auth/status.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 5 -description: "Show the accounts gt can use" ---- - -# gt auth status - - - -Show the accounts gt can use - -## Synopsis - -```text -Show the accounts gt can use on each instance, the active one, and how they -authenticate. Fails with exit code 4 when there is no account, or when a credential is -missing or rejected. With --json it exits 0 either way; read credential_available, verified and error. -``` - -``` -gt auth status [flags] -``` - -## Examples - -``` -$ gt auth status -# Check the credentials against their instances -$ gt auth status --verify -$ gt auth status --host gitea.com --json -``` - -## Options - -``` - -h, --help help for status - --verify Check each credential against its instance -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/auth/switch.md b/cli-docs/reference/auth/switch.md deleted file mode 100644 index eb70b50c..00000000 --- a/cli-docs/reference/auth/switch.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 6 -description: "Switch the active account of an instance" ---- - -# gt auth switch - - - -Switch the active account of an instance - -## Synopsis - -```text -Switch the active account of an instance, which commands use unless --user or GITEA_CLI_USER -selects another. With two accounts, gt auth switch toggles between them; with more, it -asks which one on a terminal. -``` - -``` -gt auth switch [] [flags] -``` - -## Examples - -``` -$ gt auth switch -$ gt auth switch bob -$ gt auth switch bob --host gitea.com -``` - -## Options - -``` - -h, --help help for switch -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/auth/token.md b/cli-docs/reference/auth/token.md deleted file mode 100644 index 7dd28008..00000000 --- a/cli-docs/reference/auth/token.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 7 -description: "Print the access token of an account" ---- - -# gt auth token - - - -Print the access token of an account - -## Synopsis - -```text -Print the access token that gt uses for the active account, or for --user, so that -scripts can call the API themselves. The GITEA_TOKEN of the instance takes precedence, as -it does for other commands, and an expiring OAuth token is refreshed first. Accounts that -sign requests with an SSH key have no token. -``` - -``` -gt auth token [flags] -``` - -## Examples - -``` -$ gt auth token -$ curl -H "Authorization: token $(gt auth token)" https://gitea.com/api/v1/user -$ gt auth token --host gitea.com --user alice -``` - -## Options - -``` - -h, --help help for token -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt auth](../auth/index.md): Authenticate gt and git with Gitea diff --git a/cli-docs/reference/branch/create.md b/cli-docs/reference/branch/create.md deleted file mode 100644 index 6782d3bf..00000000 --- a/cli-docs/reference/branch/create.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 1 -description: "Create a branch" ---- - -# gt branch create - - - -Create a branch - -## Synopsis - -```text -Create a branch on the server from another branch, a tag or a commit; the default branch unless --source names one. -``` - -``` -gt branch create [flags] -``` - -## Examples - -``` -# Branch off the default branch -$ gt branch create feature/login - -# Branch off a tag or a commit -$ gt branch create hotfix/1.0.1 --source v1.0.0 -$ gt branch create bisect --source 3f2a9c1 -``` - -## Options - -``` - -h, --help help for create - -s, --source string Branch, tag or commit to start from (default: the default branch) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/branch/delete.md b/cli-docs/reference/branch/delete.md deleted file mode 100644 index 4a297309..00000000 --- a/cli-docs/reference/branch/delete.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_position: 2 -description: "Delete branches" ---- - -# gt branch delete - - - -Delete branches - -``` -gt branch delete ... [flags] -``` - -## Examples - -``` -$ gt branch delete feature/login -$ gt branch delete old-a old-b --yes -``` - -## Options - -``` - -h, --help help for delete -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/branch/index.md b/cli-docs/reference/branch/index.md deleted file mode 100644 index b52a5785..00000000 --- a/cli-docs/reference/branch/index.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_position: 5 -description: "Manage remote branches and protection rules" ---- - -# gt branch - - - -Manage remote branches and protection rules - -## Synopsis - -```text -Work with the branches of a repository on the server: list and view them, create, rename and -delete them, and protect them from direct pushes. To work with local branches, use git. -``` - -``` -gt branch [flags] -``` - -## Options - -``` - -h, --help help for branch -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt branch create](../branch/create.md): Create a branch -* [gt branch delete](../branch/delete.md): Delete branches -* [gt branch list](../branch/list.md): List branches -* [gt branch protect](../branch/protect.md): Protect branches -* [gt branch rename](../branch/rename.md): Rename a branch -* [gt branch unprotect](../branch/unprotect.md): Remove branch protection -* [gt branch view](../branch/view.md): View a branch diff --git a/cli-docs/reference/branch/list.md b/cli-docs/reference/branch/list.md deleted file mode 100644 index 91f661c6..00000000 --- a/cli-docs/reference/branch/list.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -sidebar_position: 3 -description: "List branches" ---- - -# gt branch list - - - -List branches - -``` -gt branch list [flags] -``` - -## Examples - -``` -$ gt branch list -$ gt branch list -R alice/project --limit 100 --json name,sha -``` - -## Options - -``` - -h, --help help for list - -L, --limit int Maximum number of results (1..1000) (default 30) - --page int Result page (default 1) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/branch/protect.md b/cli-docs/reference/branch/protect.md deleted file mode 100644 index c6fdaf84..00000000 --- a/cli-docs/reference/branch/protect.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -sidebar_position: 4 -description: "Protect branches" ---- - -# gt branch protect - - - -Protect branches - -## Synopsis - -```text -Add a protection rule for each existing branch, or with --pattern for every branch matching a -glob. By default nobody can push directly and pull requests need one approving review. - -When a branch or pattern has a rule already, change only the settings the flags name and keep -the others; --allow-push replaces those who may push directly. -``` - -``` -gt branch protect ... [flags] -``` - -## Examples - -``` -# Require two approvals and passing CI on main -$ gt branch protect main --required-approvals 2 --status-check ci/build - -# Let the release team push to every release branch -$ gt branch protect --pattern 'release/*' --allow-push acme/release -``` - -## Options - -``` - --allow-push strings Users, or teams as ORG/TEAM, that may push directly - --block-on-rejected-reviews Block merging while changes are requested - --dismiss-stale-approvals Dismiss approvals when new commits are pushed - -h, --help help for protect - --pattern string Protect the branches matching this glob, such as release/* - --required-approvals int Approving reviews that pull requests need (default 1) - --status-check strings Status checks that must pass (repeatable) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/branch/rename.md b/cli-docs/reference/branch/rename.md deleted file mode 100644 index b2e88a7c..00000000 --- a/cli-docs/reference/branch/rename.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 5 -description: "Rename a branch" ---- - -# gt branch rename - - - -Rename a branch - -``` -gt branch rename [flags] -``` - -## Examples - -``` -$ gt branch rename feature/logn feature/login -``` - -## Options - -``` - -h, --help help for rename -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/branch/unprotect.md b/cli-docs/reference/branch/unprotect.md deleted file mode 100644 index 30ef502b..00000000 --- a/cli-docs/reference/branch/unprotect.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 6 -description: "Remove branch protection" ---- - -# gt branch unprotect - - - -Remove branch protection - -## Synopsis - -```text -Remove the protection rules of branches, or of glob patterns such as release/*. -``` - -``` -gt branch unprotect ... [flags] -``` - -## Examples - -``` -$ gt branch unprotect main -$ gt branch unprotect 'release/*' --yes -``` - -## Options - -``` - -h, --help help for unprotect -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/branch/view.md b/cli-docs/reference/branch/view.md deleted file mode 100644 index 0123123e..00000000 --- a/cli-docs/reference/branch/view.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 7 -description: "View a branch" ---- - -# gt branch view - - - -View a branch - -``` -gt branch view [flags] -``` - -## Examples - -``` -$ gt branch view main -$ gt branch view feature/login --web -``` - -## Options - -``` - -h, --help help for view - -w, --web Open the branch in the browser -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt branch](../branch/index.md): Manage remote branches and protection rules diff --git a/cli-docs/reference/completion/bash.md b/cli-docs/reference/completion/bash.md deleted file mode 100644 index 2755ba99..00000000 --- a/cli-docs/reference/completion/bash.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 1 -description: "Generate the autocompletion script for bash" ---- - -# gt completion bash - - - -Generate the autocompletion script for bash - -## Synopsis - -```text -Generate the completion script for bash. It needs the bash-completion package. - -To load completions in every new shell, add the eval line below to ~/.bashrc (on macOS, -~/.bash_profile); bash 3.2, the default on macOS, cannot source <(gt completion bash). -``` - -``` -gt completion bash -``` - -## Examples - -``` -$ eval "$(gt completion bash)" -``` - -## Options - -``` - -h, --help help for bash - --no-descriptions Disable completion descriptions -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt completion](../completion/index.md): Generate shell completion scripts diff --git a/cli-docs/reference/completion/fish.md b/cli-docs/reference/completion/fish.md deleted file mode 100644 index a56c72ba..00000000 --- a/cli-docs/reference/completion/fish.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -sidebar_position: 2 -description: "Generate the autocompletion script for fish" ---- - -# gt completion fish - - - -Generate the autocompletion script for fish - -## Synopsis - -```text -Generate the autocompletion script for the fish shell. - -To load completions in your current shell session: - - gt completion fish | source - -To load completions for every new session, execute once: - - gt completion fish > ~/.config/fish/completions/gt.fish - -You will need to start a new shell for this setup to take effect. -``` - -``` -gt completion fish [flags] -``` - -## Examples - -``` -$ gt completion fish > ~/.config/fish/completions/gt.fish -``` - -## Options - -``` - -h, --help help for fish - --no-descriptions Disable completion descriptions -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt completion](../completion/index.md): Generate shell completion scripts diff --git a/cli-docs/reference/completion/index.md b/cli-docs/reference/completion/index.md deleted file mode 100644 index f13649fd..00000000 --- a/cli-docs/reference/completion/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -sidebar_position: 6 -description: "Generate shell completion scripts" ---- - -# gt completion - - - -Generate shell completion scripts - -## Synopsis - -```text -Generate the autocompletion script for gt for the specified shell. -See each sub-command's help for details on how to use the generated script. -``` - -``` -gt completion [flags] -``` - -## Options - -``` - -h, --help help for completion -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt completion bash](../completion/bash.md): Generate the autocompletion script for bash -* [gt completion fish](../completion/fish.md): Generate the autocompletion script for fish -* [gt completion powershell](../completion/powershell.md): Generate the autocompletion script for powershell -* [gt completion zsh](../completion/zsh.md): Generate the autocompletion script for zsh diff --git a/cli-docs/reference/completion/powershell.md b/cli-docs/reference/completion/powershell.md deleted file mode 100644 index 0f4e289c..00000000 --- a/cli-docs/reference/completion/powershell.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -sidebar_position: 3 -description: "Generate the autocompletion script for powershell" ---- - -# gt completion powershell - - - -Generate the autocompletion script for powershell - -## Synopsis - -```text -Generate the autocompletion script for powershell. - -To load completions in your current shell session: - - gt completion powershell | Out-String | Invoke-Expression - -To load completions for every new session, add the output of the above command -to your powershell profile. -``` - -``` -gt completion powershell [flags] -``` - -## Examples - -``` -$ gt completion powershell | Out-String | Invoke-Expression -``` - -## Options - -``` - -h, --help help for powershell - --no-descriptions Disable completion descriptions -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt completion](../completion/index.md): Generate shell completion scripts diff --git a/cli-docs/reference/completion/zsh.md b/cli-docs/reference/completion/zsh.md deleted file mode 100644 index f3b7b6d0..00000000 --- a/cli-docs/reference/completion/zsh.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 4 -description: "Generate the autocompletion script for zsh" ---- - -# gt completion zsh - - - -Generate the autocompletion script for zsh - -## Synopsis - -```text -Generate the autocompletion script for the zsh shell. - -If shell completion is not already enabled in your environment you will need -to enable it. You can execute the following once: - - echo "autoload -U compinit; compinit" >> ~/.zshrc - -To load completions in your current shell session: - - source <(gt completion zsh) - -To load completions for every new session, execute once: - -#### Linux: - - gt completion zsh > "${fpath[1]}/_gt" - -#### macOS: - - gt completion zsh > $(brew --prefix)/share/zsh/site-functions/_gt - -You will need to start a new shell for this setup to take effect. -``` - -``` -gt completion zsh [flags] -``` - -## Examples - -``` -$ source <(gt completion zsh) -``` - -## Options - -``` - -h, --help help for zsh - --no-descriptions Disable completion descriptions -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt completion](../completion/index.md): Generate shell completion scripts diff --git a/cli-docs/reference/config/get.md b/cli-docs/reference/config/get.md deleted file mode 100644 index 5401944e..00000000 --- a/cli-docs/reference/config/get.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -sidebar_position: 1 -description: "Print the value of a setting" ---- - -# gt config get - - - -Print the value of a setting - -``` -gt config get [flags] -``` - -## Examples - -``` -$ gt config get editor -$ gt config get default_host --show-source -$ gt config get ssh_key --host https://gitea.com --user alice -``` - -## Options - -``` - -h, --help help for get - --show-source Also print where the value comes from -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt config](../config/index.md): Manage settings diff --git a/cli-docs/reference/config/index.md b/cli-docs/reference/config/index.md deleted file mode 100644 index f3d1fac9..00000000 --- a/cli-docs/reference/config/index.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -sidebar_position: 7 -description: "Manage settings" ---- - -# gt config - - - -Manage settings - -## Synopsis - -```text -Manage gt's settings. - -Preferences live in config.yml and instance settings in hosts.yml, in the configuration -directory ($GITEA_CLI_CONFIG_DIR, or gitea-cli under the XDG config directory); gt config path prints -both files. Environment variables that override settings are listed in gt help environment. - -Preferences: default_host, git_protocol, editor, prompt (enabled or disabled), pager, -browser (never disables opening), color, hyperlinks and markdown (auto or raw), remote, -http_timeout and aliases (see gt alias). -Instance settings (--host ): user, ssh_host, insecure, git_protocol, oauth_client_id, -headers, client_cert and client_key. -Account settings (--host --user ): ssh_key, ssh_agent, -ssh_certificate_principal, ssh_key_fingerprint. -``` - -``` -gt config [flags] -``` - -## Options - -``` - -h, --help help for config -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt config get](../config/get.md): Print the value of a setting -* [gt config list](../config/list.md): List settings and their values -* [gt config path](../config/path.md): Print the paths of the settings files -* [gt config set](../config/set.md): Change a setting diff --git a/cli-docs/reference/config/list.md b/cli-docs/reference/config/list.md deleted file mode 100644 index 9df39de1..00000000 --- a/cli-docs/reference/config/list.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 2 -description: "List settings and their values" ---- - -# gt config list - - - -List settings and their values - -``` -gt config list [flags] -``` - -## Examples - -``` -$ gt config list -# Include the settings of an instance -$ gt config list --host https://gitea.com -``` - -## Options - -``` - -h, --help help for list -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt config](../config/index.md): Manage settings diff --git a/cli-docs/reference/config/path.md b/cli-docs/reference/config/path.md deleted file mode 100644 index 30384dbd..00000000 --- a/cli-docs/reference/config/path.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 3 -description: "Print the paths of the settings files" ---- - -# gt config path - - - -Print the paths of the settings files - -``` -gt config path [flags] -``` - -## Examples - -``` -$ gt config path -# Settings of another configuration directory -$ GITEA_CLI_CONFIG_DIR=~/work/gt gt config path -``` - -## Options - -``` - -h, --help help for path -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt config](../config/index.md): Manage settings diff --git a/cli-docs/reference/config/set.md b/cli-docs/reference/config/set.md deleted file mode 100644 index 54fd7aa1..00000000 --- a/cli-docs/reference/config/set.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -sidebar_position: 4 -description: "Change a setting" ---- - -# gt config set - - - -Change a setting - -## Synopsis - -```text -Change a preference, an instance setting (--host) or an account setting (--host and --user). - -Preferences: - default_host instance to use when no flag or repository selects one - git_protocol https or ssh, for clones and remotes - editor command that edits bodies and messages, such as "code --wait" - prompt enabled or disabled; disabled turns prompts off - pager command that pages long output on a terminal; GITEA_CLI_PAGER overrides it - browser command that opens URLs; never disables opening - color auto, always or never - hyperlinks auto, always or never, for clickable links in terminals - markdown auto renders Markdown on a terminal, raw prints the source - remote Git remote used to find the repository of a clone - http_timeout longest wait for the instance to answer a request, such as 30s, or for more - data while a transfer stalls; 0 waits as long as it takes; a transfer that - keeps moving and migrations are not cut off. The wait for an answer starts - once an upload has reached the instance's machine, so an instance that reads - uploads slowly from its connection needs a longer timeout - -Instance settings: user (active account), ssh_host, insecure, git_protocol, oauth_client_id, -and headers: "Name: value" adds a header to every API request to the instance, such as an -access proxy needs, "Name:" removes it, and a value of $NAME or ${NAME} is read from that -environment variable when sent; client_cert and client_key name the PEM files of a TLS client -certificate for an instance that requires one; without client_key, the key is read from -client_cert. -Account settings: ssh_key, ssh_agent, ssh_certificate_principal, ssh_key_fingerprint. -``` - -``` -gt config set [flags] -``` - -## Examples - -``` -$ gt config set editor "code --wait" -$ gt config set ssh_host git.example.com:2222 --host https://example.com -$ gt config set ssh_key ~/.ssh/id_ed25519 --host https://example.com --user alice -``` - -## Options - -``` - -h, --help help for set -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt config](../config/index.md): Manage settings diff --git a/cli-docs/reference/doctor.md b/cli-docs/reference/doctor.md deleted file mode 100644 index 9682cf4e..00000000 --- a/cli-docs/reference/doctor.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 8 -description: "Check gt's setup for this directory" ---- - -# gt doctor - - - -Check gt's setup for this directory - -## Synopsis - -```text -Check the setup that commands in this directory use: the settings files, the instance, -its configured headers and whether it answers, the account and its credential, the -repository, and Git. Each problem comes with the command that fixes it. gt doctor fails -when a check fails. -``` - -``` -gt doctor [flags] -``` - -## Examples - -``` -$ gt doctor -# Check another repository and instance -$ gt doctor -R gitea.com/gitea/cli -$ gt doctor --jq '.checks[] | select(.status == "failed")' -``` - -## Options - -``` - -h, --help help for doctor -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](index.md): Work with Gitea from your terminal diff --git a/cli-docs/reference/help/environment.md b/cli-docs/reference/help/environment.md deleted file mode 100644 index 888c8ecd..00000000 --- a/cli-docs/reference/help/environment.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -sidebar_position: 1 -description: "Environment variables and global flags" ---- - -# gt help environment - - - -Environment variables and global flags - -## Synopsis - -```text -Global flags work with every command, before or after the command name: - - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting - -gt selects the repository from --repo, GITEA_CLI_REPO, git config gt.repository (gt repo -set-default) or a Git remote (--remote, else the base remote pr checkout recorded, the -current branch's remote, upstream or origin, skipping remotes on instances without an -account, or not on --host or the GITEA_TOKEN instance). Like gh, a clone with upstream -and origin targets upstream: a branch tracking origin does not select the fork, -and the instance from the repository URL, --host, GITEA_CLI_HOST or GITEA_INSTANCE_URL, -default_host, the only configured instance, or, among several, the instance of the clone's -repository. - -Environment variables: - - GITEA_CLI_CONFIG_DIR configuration directory; gt config path prints the files - GITEA_CLI_HOST, GITEA_INSTANCE_URL instance URL, overriding default_host - GITEA_TOKEN access token for that instance instead of stored credentials - GITEA_INSTANCE_INSECURE with GITEA_TOKEN, skip TLS verification when true - GITEA_INSTANCE_SSH_HOST with GITEA_TOKEN, SSH host that identifies the instance's remotes - GITEA_CLI_USER account on the selected instance, like --user - GITEA_CLI_REPO repository as OWNER/REPO or URL, like --repo - GITEA_CLI_EDITOR editor, overriding config.yml - GITEA_CLI_PAGER pager, overriding config.yml - GITEA_CLI_COLOR color preference: auto, always or never - GITEA_CLI_HTTP_TIMEOUT longest wait for an answer, overriding config.yml - NO_COLOR disables automatic color when set, even with CLICOLOR_FORCE - CLICOLOR_FORCE unless empty or 0, colors stderr, even when redirected, and - a terminal stdout despite CLICOLOR=0 or TERM=dumb - CLICOLOR disables automatic color on a terminal when 0 - VISUAL, EDITOR, PAGER, BROWSER editor (VISUAL first), pager and browser when config.yml sets none - TERM dumb asks each prompt as a line of text, for screen readers, - and turns off automatic color - -Piped or redirected stdout is data: the color settings never color it. Only a -command's own --color always does, such as gt pr diff --color always. - -Preferences in config.yml are described in gt config --help. -``` - -## Options - -``` - -h, --help help for environment -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](): Work with Gitea from your terminal diff --git a/cli-docs/reference/help/exit-codes.md b/cli-docs/reference/help/exit-codes.md deleted file mode 100644 index e828b39f..00000000 --- a/cli-docs/reference/help/exit-codes.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 2 -description: "Exit codes used by gt" ---- - -# gt help exit-codes - - - -Exit codes used by gt - -## Synopsis - -```text -gt exits with one of these codes: - - 0 success, including an empty list - 1 the command failed - 2 usage error: an unknown command or flag, or a missing or invalid argument - 3 canceled: a declined confirmation, a prompt left with Esc or Ctrl-D, or a timeout - 4 authentication is missing or was rejected - 8 gt pr checks: some checks are still pending - 130 interrupted with Ctrl-C, also at a prompt - -A command may document further codes in its help. -``` - -## Options - -``` - -h, --help help for exit-codes -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](): Work with Gitea from your terminal diff --git a/cli-docs/reference/help/formatting.md b/cli-docs/reference/help/formatting.md deleted file mode 100644 index ad223583..00000000 --- a/cli-docs/reference/help/formatting.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -sidebar_position: 3 -description: "JSON output with --json and --jq" ---- - -# gt help formatting - - - -JSON output with --json and --jq - -## Synopsis - -```text -gt prints text for people by default. Scripts should use JSON: the columns and -wording of text output may change between releases. - - --json print every field - --json FIELDS print only the comma-separated FIELDS, such as --json number,title - -q, --jq EXPR filter the JSON with a jq expression; implies --json - -The JSON FIELDS section of a command's help lists its fields, and shell completion -offers them after --json. An unknown field reports the available ones. - ---jq runs inside gt, so jq does not need to be installed. String results print -without quotes: - - $ gt issue list --json number,title --jq '.[] | "\(.number)\t\(.title)"' - -Some fields cost extra requests, such as the reviewers of pr list, the blocked_by and blocks -of issue view and issue edit, and the visibility of org member list. gt makes them only when -the output includes the field: --json names it, or --json selects every field and the --jq -expression names it. An expression that reaches such a field without naming it, as -to_entries does, sees it empty; name the field in --json instead. - -On a terminal, JSON is indented and colored; otherwise each value prints on one line. -Commands that return no resource, such as deletes, reject --json. -``` - -## Options - -``` - -h, --help help for formatting -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](): Work with Gitea from your terminal diff --git a/cli-docs/reference/help/index.md b/cli-docs/reference/help/index.md deleted file mode 100644 index 04e6c2e1..00000000 --- a/cli-docs/reference/help/index.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -sidebar_position: 30 -description: "Guides built into gt, read with gt help ." ---- - -# Help topics - - - -Guides built into gt, read with `gt help `: - -- [gt help environment](environment.md): Environment variables and global flags -- [gt help exit-codes](exit-codes.md): Exit codes used by gt -- [gt help formatting](formatting.md): JSON output with --json and --jq diff --git a/cli-docs/reference/index.md b/cli-docs/reference/index.md deleted file mode 100644 index 361da6c2..00000000 --- a/cli-docs/reference/index.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -sidebar_position: 0 -description: "Work with Gitea from your terminal" ---- - -# Command reference - - - -Every `gt` command and flag, generated from the `--help` output of gt's main branch -or release. Global flags work with every command; [gt help environment](help/environment.md) -describes them together with the environment variables gt reads. - -Work with Gitea from your terminal - -## Synopsis - -```text -Work seamlessly with Gitea from the command line. -``` - -``` -gt [flags] -``` - -## Options - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - -h, --help help for gt - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt admin](admin/index.md): Manage instance administration -* [gt alias](alias/index.md): Create shortcuts for gt commands -* [gt api](api.md): Make an authenticated Gitea API request -* [gt auth](auth/index.md): Authenticate gt and git with Gitea -* [gt branch](branch/index.md): Manage remote branches and protection rules -* [gt completion](completion/index.md): Generate shell completion scripts -* [gt config](config/index.md): Manage settings -* [gt doctor](doctor.md): Check gt's setup for this directory -* [gt issue](issue/index.md): Manage issues -* [gt label](label/index.md): Manage labels -* [gt milestone](milestone/index.md): Manage milestones -* [gt notification](notification/index.md): Read and triage your notifications -* [gt org](org/index.md): Manage organizations -* [gt package](package/index.md): Manage packages -* [gt pr](pr/index.md): Manage pull requests -* [gt release](release/index.md): Manage releases -* [gt repo](repo/index.md): Work with Gitea repositories -* [gt run](run/index.md): View and manage Actions workflow runs -* [gt search](search/index.md): Search within one selected Gitea instance -* [gt secret](secret/index.md): Manage Actions secrets for a repository, organization, or your account -* [gt ssh-key](ssh-key/index.md): Manage SSH keys -* [gt status](status.md): Show your work across repositories -* [gt team](team/index.md): Manage organization teams and access -* [gt time](time/index.md): Track time spent on issues and pull requests -* [gt variable](variable/index.md): Manage Actions variables for a repository, organization, or your account -* [gt version](version.md): Print gt's version -* [gt webhook](webhook/index.md): Manage webhooks -* [gt wiki](wiki/index.md): Manage repository wiki pages -* [gt workflow](workflow/index.md): View, run, enable and disable Actions workflows diff --git a/cli-docs/reference/issue/attachment/delete.md b/cli-docs/reference/issue/attachment/delete.md deleted file mode 100644 index 7805cb1d..00000000 --- a/cli-docs/reference/issue/attachment/delete.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 1 -description: "Delete an attachment" ---- - -# gt issue attachment delete - - - -Delete an attachment - -``` -gt issue attachment delete { | } [flags] -``` - -## Examples - -``` -$ gt issue attachment delete 12 9 --yes -``` - -## Options - -``` - -h, --help help for delete -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue attachment](../../issue/attachment/index.md): Manage the attachments of issues diff --git a/cli-docs/reference/issue/attachment/download.md b/cli-docs/reference/issue/attachment/download.md deleted file mode 100644 index 03b4ef91..00000000 --- a/cli-docs/reference/issue/attachment/download.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -sidebar_position: 2 -description: "Download an attachment" ---- - -# gt issue attachment download - - - -Download an attachment - -## Synopsis - -```text -Download an attachment into the current directory under its own name, or where -O/--output -or -D/--dir say. An existing file is kept unless --clobber replaces it or --skip-existing -skips the download. -``` - -``` -gt issue attachment download { | } [flags] -``` - -## Examples - -``` -$ gt issue attachment download 12 9 -$ gt issue attachment download 12 9 --output crash.log --clobber -# Write the file to standard output -$ gt issue attachment download 12 9 -O - | less -``` - -## Options - -``` - --clobber Replace an existing file - -D, --dir string Directory to download into - -h, --help help for download - -O, --output string File or directory to write to, or - for standard output (default: the download's name) - --skip-existing Keep an existing file and skip the download -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue attachment](../../issue/attachment/index.md): Manage the attachments of issues diff --git a/cli-docs/reference/issue/attachment/edit.md b/cli-docs/reference/issue/attachment/edit.md deleted file mode 100644 index f9d9edb2..00000000 --- a/cli-docs/reference/issue/attachment/edit.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_position: 3 -description: "Rename an attachment" ---- - -# gt issue attachment edit - - - -Rename an attachment - -``` -gt issue attachment edit { | } [flags] -``` - -## Examples - -``` -$ gt issue attachment edit 12 9 --name crash-2026-10-11.log -``` - -## Options - -``` - -h, --help help for edit - --name name New file name -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue attachment](../../issue/attachment/index.md): Manage the attachments of issues diff --git a/cli-docs/reference/issue/attachment/index.md b/cli-docs/reference/issue/attachment/index.md deleted file mode 100644 index e78c2229..00000000 --- a/cli-docs/reference/issue/attachment/index.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 1 -description: "Manage the attachments of issues" ---- - -# gt issue attachment - - - -Manage the attachments of issues - -## Synopsis - -```text -List, view, upload, download, rename and delete the files attached to an issue. Attachments -are addressed by the issue number and the attachment ID that attachment list shows. -``` - -``` -gt issue attachment [flags] -``` - -## Options - -``` - -h, --help help for attachment -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../../issue/index.md): Manage issues -* [gt issue attachment delete](../../issue/attachment/delete.md): Delete an attachment -* [gt issue attachment download](../../issue/attachment/download.md): Download an attachment -* [gt issue attachment edit](../../issue/attachment/edit.md): Rename an attachment -* [gt issue attachment list](../../issue/attachment/list.md): List attachments -* [gt issue attachment upload](../../issue/attachment/upload.md): Attach a file -* [gt issue attachment view](../../issue/attachment/view.md): View an attachment diff --git a/cli-docs/reference/issue/attachment/list.md b/cli-docs/reference/issue/attachment/list.md deleted file mode 100644 index e0e33304..00000000 --- a/cli-docs/reference/issue/attachment/list.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 4 -description: "List attachments" ---- - -# gt issue attachment list - - - -List attachments - -``` -gt issue attachment list { | } [flags] -``` - -## Examples - -``` -$ gt issue attachment list 12 -``` - -## Options - -``` - -h, --help help for list - -L, --limit int Maximum number of results (1..1000) (default 30) - --page int Result page (default 1) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue attachment](../../issue/attachment/index.md): Manage the attachments of issues diff --git a/cli-docs/reference/issue/attachment/upload.md b/cli-docs/reference/issue/attachment/upload.md deleted file mode 100644 index 347a2282..00000000 --- a/cli-docs/reference/issue/attachment/upload.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 5 -description: "Attach a file" ---- - -# gt issue attachment upload - - - -Attach a file - -``` -gt issue attachment upload { | } [flags] -``` - -## Examples - -``` -$ gt issue attachment upload 12 crash.log -$ gt issue attachment upload 12 screenshot.png --name before.png -``` - -## Options - -``` - -h, --help help for upload - --name name File name of the attachment (default: the local file name) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue attachment](../../issue/attachment/index.md): Manage the attachments of issues diff --git a/cli-docs/reference/issue/attachment/view.md b/cli-docs/reference/issue/attachment/view.md deleted file mode 100644 index 2cb3099a..00000000 --- a/cli-docs/reference/issue/attachment/view.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 6 -description: "View an attachment" ---- - -# gt issue attachment view - - - -View an attachment - -``` -gt issue attachment view { | } [flags] -``` - -## Examples - -``` -$ gt issue attachment view 12 9 -``` - -## Options - -``` - -h, --help help for view -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue attachment](../../issue/attachment/index.md): Manage the attachments of issues diff --git a/cli-docs/reference/issue/close.md b/cli-docs/reference/issue/close.md deleted file mode 100644 index b8b5fd85..00000000 --- a/cli-docs/reference/issue/close.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 2 -description: "Close issues" ---- - -# gt issue close - - - -Close issues - -``` -gt issue close { | }... [flags] -``` - -## Examples - -``` -$ gt issue close 12 -$ gt issue close 12 13 --comment "Done in #14" -``` - -## Options - -``` - -c, --comment string Leave a comment before closing the issue - -h, --help help for close -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/issue/comment/create.md b/cli-docs/reference/issue/comment/create.md deleted file mode 100644 index c65cb9ef..00000000 --- a/cli-docs/reference/issue/comment/create.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -sidebar_position: 1 -description: "Add a comment to an issue" ---- - -# gt issue comment create - - - -Add a comment to an issue - -``` -gt issue comment create { | } [flags] -``` - -## Examples - -``` -$ gt issue comment create 12 --body "Looks good" -$ gt issue comment add 12 --editor -``` - -## Options - -``` - --attachment File File to attach to the comment (repeatable) - -b, --body text Comment text - -F, --body-file file Read the comment from file, or - for stdin - -e, --editor Write the comment in the configured editor - -h, --help help for create -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue comment](../../issue/comment/index.md): Add a comment to an issue diff --git a/cli-docs/reference/issue/comment/delete.md b/cli-docs/reference/issue/comment/delete.md deleted file mode 100644 index c72d1605..00000000 --- a/cli-docs/reference/issue/comment/delete.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 2 -description: "Delete a comment" ---- - -# gt issue comment delete - - - -Delete a comment - -``` -gt issue comment delete [flags] -``` - -## Examples - -``` -$ gt issue comment delete 81 --yes -``` - -## Options - -``` - -h, --help help for delete -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue comment](../../issue/comment/index.md): Add a comment to an issue diff --git a/cli-docs/reference/issue/comment/edit.md b/cli-docs/reference/issue/comment/edit.md deleted file mode 100644 index 663dd1b9..00000000 --- a/cli-docs/reference/issue/comment/edit.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 3 -description: "Edit a comment" ---- - -# gt issue comment edit - - - -Edit a comment - -## Synopsis - -```text -Replace the text of a comment. Without --body or --body-file, the editor or the prompt starts -from the current text. -``` - -``` -gt issue comment edit [flags] -``` - -## Examples - -``` -$ gt issue comment edit 81 --body "Fixed in #15" -$ gt issue comment edit 81 -``` - -## Options - -``` - -b, --body text Comment text - -F, --body-file file Read the comment from file, or - for stdin - -e, --editor Write the comment in the configured editor - -h, --help help for edit -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue comment](../../issue/comment/index.md): Add a comment to an issue diff --git a/cli-docs/reference/issue/comment/index.md b/cli-docs/reference/issue/comment/index.md deleted file mode 100644 index 0f8bbf86..00000000 --- a/cli-docs/reference/issue/comment/index.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -sidebar_position: 3 -description: "Add a comment to an issue" ---- - -# gt issue comment - - - -Add a comment to an issue - -## Synopsis - -```text -Add a comment to an issue, or edit or delete your last comment on it. - -Without --body, --body-file or --editor, the configured editor opens, or a multi-line prompt -asks for the comment. The subcommands list, view, edit and delete comments by their ID. -``` - -``` -gt issue comment { | } [flags] -``` - -## Examples - -``` -$ gt issue comment 12 --body "Fixed in #14" -$ gt issue comment 12 --edit-last --body "Fixed in #15" -$ gt issue comment list 12 -``` - -## Options - -``` - --attachment File File to attach to the comment (repeatable) - -b, --body text Comment text - -F, --body-file file Read the comment from file, or - for stdin - --delete-last Delete your last comment - --edit-last Edit your last comment instead of adding one - -e, --editor Write the comment in the configured editor - -h, --help help for comment -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../../issue/index.md): Manage issues -* [gt issue comment create](../../issue/comment/create.md): Add a comment to an issue -* [gt issue comment delete](../../issue/comment/delete.md): Delete a comment -* [gt issue comment edit](../../issue/comment/edit.md): Edit a comment -* [gt issue comment list](../../issue/comment/list.md): List the comments on an issue -* [gt issue comment view](../../issue/comment/view.md): View a comment diff --git a/cli-docs/reference/issue/comment/list.md b/cli-docs/reference/issue/comment/list.md deleted file mode 100644 index 192828eb..00000000 --- a/cli-docs/reference/issue/comment/list.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -sidebar_position: 4 -description: "List the comments on an issue" ---- - -# gt issue comment list - - - -List the comments on an issue - -``` -gt issue comment list { | } [flags] -``` - -## Examples - -``` -$ gt issue comment list 12 -$ gt issue comment list 12 --json id,author,body -``` - -## Options - -``` - -h, --help help for list - -L, --limit int Maximum number of results (1..1000) (default 30) - --page int Result page (default 1) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue comment](../../issue/comment/index.md): Add a comment to an issue diff --git a/cli-docs/reference/issue/comment/view.md b/cli-docs/reference/issue/comment/view.md deleted file mode 100644 index 5e0c7443..00000000 --- a/cli-docs/reference/issue/comment/view.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 5 -description: "View a comment" ---- - -# gt issue comment view - - - -View a comment - -``` -gt issue comment view [flags] -``` - -## Examples - -``` -$ gt issue comment view 81 -``` - -## Options - -``` - -h, --help help for view -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue comment](../../issue/comment/index.md): Add a comment to an issue diff --git a/cli-docs/reference/issue/create.md b/cli-docs/reference/issue/create.md deleted file mode 100644 index ee2763bc..00000000 --- a/cli-docs/reference/issue/create.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -sidebar_position: 4 -description: "Create an issue" ---- - -# gt issue create - - - -Create an issue - -## Synopsis - -```text -Create an issue in a repository. Without flags on a terminal, a form asks for the title and -body, then optionally for assignees, a milestone, labels and a due date. - -Gitea sets labels, a milestone, assignees and a due date only for people who can write to the -issues of the repository, and creates the issue without them for others: gt then names the -flags or form fields it left out and fails, and warns about left-out labels of a template. -Adding the issue to a project needs write access too; when that fails, the issue stays created -and the error names the command that adds it later. - ---template starts from a repository issue template: its title, body, labels and ref. --title, ---label, --body, --body-file and --ref replace them; labels the repository lacks are left out. -A form (YAML) template starts with an empty body. On a terminal the form opens with the title -and body, and a template picked in the form applies its labels too. The title of a template is -a prefix to complete, so without the form --template requires --title. --web opens the -new-issue page with the whole template applied. -``` - -``` -gt issue create [flags] -``` - -## Examples - -``` -$ gt issue create -$ gt issue create --title "Crash on start" --body "Steps to reproduce…" --label bug --milestone v1.0 -$ gt issue create --template "Bug report" -``` - -## Options - -``` - -a, --assignee login Assign people by their login; @me for yourself - --attachment File File to attach after creation (repeatable) - -b, --body string Issue body - -F, --body-file file Read body from file, or - for stdin - --deadline date Due date: YYYY-MM-DD, RFC3339 or Unix timestamp; only the date counts, as the end of that day in UTC - -e, --editor Compose the issue body in the configured editor - -h, --help help for create - -l, --label name Add labels by name; prefix repo: or org: to disambiguate - -m, --milestone title Add the issue to a milestone by title or ID - -p, --project title Add the issue to the project with this title, the repository's or its organization's (repeatable) - --ref string Branch or tag the issue refers to - -T, --template name Start from the repository issue template with this name - -t, --title string Issue title - -w, --web Continue in the browser with the new-issue page -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/issue/edit.md b/cli-docs/reference/issue/edit.md deleted file mode 100644 index 575f5815..00000000 --- a/cli-docs/reference/issue/edit.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -sidebar_position: 5 -description: "Edit issues: title, body, labels, assignees, milestone, deadline" ---- - -# gt issue edit - - - -Edit issues: title, body, labels, assignees, milestone, deadline - -## Synopsis - -```text -Edit one or more issues. Without flags on a terminal, a form edits one issue at a time, -starting from its current values. Label and assignee flags add to or remove from each issue's -current values; the --set flags replace them. The blocked_by and blocks JSON fields cost extra -requests, made only when the output includes them (see gt help formatting). - -Gitea changes the milestone, assignees and due date only for people who can write to the issues -of the repository, and leaves them as they were for the author of an issue who cannot: gt then -names the flags or form fields it left out and fails. Gitea refuses their label changes outright, -so gt sends the other changes first. -``` - -``` -gt issue edit { | }... [flags] -``` - -## Examples - -``` -$ gt issue edit 12 --title "Crash on start" --add-label bug -$ gt issue edit 12 13 --add-assignee @me --milestone v1.0 -$ gt issue edit 12 --remove-label wontfix --remove-milestone -$ gt issue edit 12 --add-blocked-by 9 -``` - -## Options - -``` - --add-assignee login Add assignees by login; @me for yourself - --add-blocked-by issues Mark the issue as blocked by other issues: N, #N, OWNER/REPO#N or a URL - --add-label name Add labels by name; prefix repo: or org: to disambiguate - --add-project title Add the issue to the project with this title (repeatable) - -b, --body string New body; empty clears it - -F, --body-file file Read the body from file, or - for stdin - --deadline date Due date: YYYY-MM-DD, RFC3339 or Unix timestamp; only the date counts, as the end of that day in UTC; empty clears it - -e, --editor Edit the current body in the configured editor - -h, --help help for edit - -m, --milestone title Move the issue to a milestone by title or ID - --ref string Branch or tag the issue refers to; empty clears it - --remove-assignee login Remove assignees by login; @me for yourself - --remove-blocked-by issues Lift the dependency on other issues: N, #N, OWNER/REPO#N or a URL - --remove-label name Remove labels by name - --remove-milestone Remove the issue from its milestone - --remove-project title Take the issue off the project with this title (repeatable) - --set-assignees strings Replace all assignees; an empty value clears them - --set-labels strings Replace all labels; an empty value clears them - -t, --title string New title -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/issue/index.md b/cli-docs/reference/issue/index.md deleted file mode 100644 index e1a4226c..00000000 --- a/cli-docs/reference/issue/index.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 9 -description: "Manage issues" ---- - -# gt issue - - - -Manage issues - -## Synopsis - -```text -Work with the issues of a repository: list, view and create them, edit, close or reopen -one or more, and comment on them. Gitea lists pull requests among issues, so most issue -commands also accept a pull request number. -``` - -``` -gt issue [flags] -``` - -## Options - -``` - -h, --help help for issue -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt](../index.md): Work with Gitea from your terminal -* [gt issue attachment](../issue/attachment/index.md): Manage the attachments of issues -* [gt issue close](../issue/close.md): Close issues -* [gt issue comment](../issue/comment/index.md): Add a comment to an issue -* [gt issue create](../issue/create.md): Create an issue -* [gt issue edit](../issue/edit.md): Edit issues: title, body, labels, assignees, milestone, deadline -* [gt issue list](../issue/list.md): List issues in a repository -* [gt issue reopen](../issue/reopen.md): Reopen issues -* [gt issue timeline](../issue/timeline.md): Show the activity on an issue -* [gt issue view](../issue/view.md): View an issue diff --git a/cli-docs/reference/issue/list.md b/cli-docs/reference/issue/list.md deleted file mode 100644 index 6487d493..00000000 --- a/cli-docs/reference/issue/list.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -sidebar_position: 6 -description: "List issues in a repository" ---- - -# gt issue list - - - -List issues in a repository - -## Synopsis - -```text -List the issues of a repository, newest first. Filters combine: an issue must match all of them. -Labels and milestones must exist in the repository. -``` - -``` -gt issue list [flags] -``` - -## Examples - -``` -$ gt issue list --label bug --state all -$ gt issue list --assignee @me --json number,title -$ gt issue list --no-assignee --label bug -# Issues and pull requests in a milestone, as tab-separated values -$ gt issue list --kind all --milestone v1.0 | cut -f1,2 -``` - -## Options - -``` - -a, --assignee string Filter by assignee; @me for yourself - -A, --author string Filter by author; @me for yourself - -h, --help help for list - --kind string List issues, pull requests or both; the kind field of each reads issue or pull {issues|pulls|all} (default "issues") - -l, --label names Filter by label names - -L, --limit int Maximum number of results (1..1000) (default 30) - --mentions string Filter by mentioned user; @me for yourself - -m, --milestone titles Filter by milestone titles or IDs, comma-separated - --no-assignee Only issues without an assignee - --page int Result page (default 1) - -S, --search string Search issue titles and bodies - --since string Updated since a date, timestamp, or duration ago - -s, --state string Filter by state {open|closed|all} (default "open") - --until string Updated before a date, timestamp, or duration ago - -w, --web Open the issue list in the browser -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/issue/reopen.md b/cli-docs/reference/issue/reopen.md deleted file mode 100644 index ed6a6f01..00000000 --- a/cli-docs/reference/issue/reopen.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 7 -description: "Reopen issues" ---- - -# gt issue reopen - - - -Reopen issues - -``` -gt issue reopen { | }... [flags] -``` - -## Examples - -``` -$ gt issue reopen 12 -$ gt issue reopen 12 13 --comment "Still happens on v1.2" -``` - -## Options - -``` - -c, --comment string Leave a comment before reopening the issue - -h, --help help for reopen -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/issue/timeline.md b/cli-docs/reference/issue/timeline.md deleted file mode 100644 index f00f1978..00000000 --- a/cli-docs/reference/issue/timeline.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 8 -description: "Show the activity on an issue" ---- - -# gt issue timeline - - - -Show the activity on an issue - -## Synopsis - -```text -Show what happened on an issue, oldest first: comments, and changes such as labels, -milestones, titles, assignees, references and state changes. -``` - -``` -gt issue timeline { | } [flags] -``` - -## Examples - -``` -$ gt issue timeline 12 -$ gt issue timeline 12 --json type,author,created_at -``` - -## Options - -``` - -h, --help help for timeline - -L, --limit int Maximum number of results (1..1000) (default 30) - --page int Result page (default 1) -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/issue/view.md b/cli-docs/reference/issue/view.md deleted file mode 100644 index eda26e3f..00000000 --- a/cli-docs/reference/issue/view.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 9 -description: "View an issue" ---- - -# gt issue view - - - -View an issue - -## Synopsis - -```text -Display the title, body and other information about an issue. With --comments, the -conversation follows the body. The blocked_by and blocks JSON fields cost extra requests, made -only when the output includes them (see gt help formatting). -``` - -``` -gt issue view { | } [flags] -``` - -## Examples - -``` -$ gt issue view 12 -$ gt issue view 12 --comments -$ gt issue view https://gitea.com/OWNER/REPO/issues/12 --web -``` - -## Options - -``` - -c, --comments View issue comments - -h, --help help for view - -w, --web Open the issue in the browser -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt issue](../issue/index.md): Manage issues diff --git a/cli-docs/reference/label/create.md b/cli-docs/reference/label/create.md deleted file mode 100644 index efd3de39..00000000 --- a/cli-docs/reference/label/create.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -sidebar_position: 1 -description: "Create a label" ---- - -# gt label create - - - -Create a label - -## Synopsis - -```text -Create a label. Without --color, the label gets a random color. A label with the same -name, ignoring case, is refused unless --force updates it. Without a name on a terminal, -prompts ask for the name, color and description. -``` - -``` -gt label create [flags] -``` - -## Examples - -``` -$ gt label create bug --color d73a4a --description "Something is broken" -$ gt label create "priority/high" --exclusive -# Update the label if it exists -$ gt label create bug -c ee0701 --force -``` - -## Options - -``` - --archived Archive the label so that it cannot be applied anymore - -c, --color digits Color as six hexadecimal digits, such as d73a4a - -d, --description string Description of the label - --exclusive Allow only one label of its scope, such as priority/high, per issue - -f, --force Update the label if one with the same name exists - -h, --help help for create -``` - -## Options inherited from parent commands - -``` - --cwd directory Working directory for repository discovery - --debug Log the method, URL, status, and duration of each HTTP request to stderr - --host URL Gitea instance URL, including any base path - --interactive Allow prompts with machine output - -q, --jq expression Filter JSON output using a jq expression; implies --json - --json fields[="*"] Output JSON with the specified comma-separated fields, or all fields - --no-input Disable prompts and implicit editor/browser interactions - --org organization Manage the labels of an organization instead of a repository - --remote remote Git remote used for repository discovery - -R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL - --sudo user Perform API requests as this user (requires an administrator account) - --user name Account name on the selected instance - -y, --yes Accept confirmations without prompting -``` - -## SEE ALSO - -* [gt label](../label/index.md): Manage labels diff --git a/cli-docs/reference/label/delete.md b/cli-docs/reference/label/delete.md deleted file mode 100644 index 487b2cd9..00000000 --- a/cli-docs/reference/label/delete.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -sidebar_position: 2 -description: "Delete labels" ---- - -# gt label delete - - - -Delete labels - -``` -gt label delete