diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8ececc2..26bddf05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
* FEATURES
* Add `tea deploy-keys` command for listing, creating, and deleting repository deploy keys (`tea deploy-keys list`, `tea deploy-keys create
--key-file `, `tea deploy-keys delete `)
+ * Add `tea deploy-tokens` command for listing, creating, and deleting repository deploy tokens (`tea deploy-tokens list`, `tea deploy-tokens create `, `tea deploy-tokens delete `)
## [v0.13.0](https://gitea.com/gitea/tea/releases/tag/v0.13.0) - 2026-04-05
diff --git a/README.md b/README.md
index 82c0c0bb..688708a4 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,9 @@ EXAMPLES
tea deploy-keys list # list repository deploy keys
tea deploy-keys create CI --key-file ~/.ssh/id_ed25519.pub --read-write
tea deploy-keys delete 7 -y # remove a deploy key without prompting
+ tea deploy-tokens list # list repository deploy tokens
+ tea deploy-tokens create CI # create a deploy token
+ tea deploy-tokens delete 7 -y # remove a deploy token without prompting
# send gitea desktop notifications every 5 minutes (bash + libnotify)
while :; do tea notifications --mine -o simple | xargs -i notify-send {}; sleep 300; done
diff --git a/cmd/deploytokens/create.go b/cmd/deploytokens/create.go
index c7b52701..dd34ab31 100644
--- a/cmd/deploytokens/create.go
+++ b/cmd/deploytokens/create.go
@@ -16,6 +16,7 @@ import (
"github.com/urfave/cli/v3"
)
+// CmdDeployTokensCreate is the command to create a deploy token
var CmdDeployTokensCreate = cli.Command{
Name: "create",
Aliases: []string{"add", "c"},
diff --git a/cmd/deploytokens/delete.go b/cmd/deploytokens/delete.go
index ebc52dfe..f5e58d3f 100644
--- a/cmd/deploytokens/delete.go
+++ b/cmd/deploytokens/delete.go
@@ -14,6 +14,7 @@ import (
"github.com/urfave/cli/v3"
)
+// CmdDeployTokensDelete is the command to delete a deploy token
var CmdDeployTokensDelete = cli.Command{
Name: "delete",
Aliases: []string{"rm"},
diff --git a/cmd/deploytokens/list.go b/cmd/deploytokens/list.go
index 3057be2a..41cebbc8 100644
--- a/cmd/deploytokens/list.go
+++ b/cmd/deploytokens/list.go
@@ -14,6 +14,7 @@ import (
"github.com/urfave/cli/v3"
)
+// CmdDeployTokensList is the command to list deploy tokens
var CmdDeployTokensList = cli.Command{
Name: "list",
Aliases: []string{"ls"},
@@ -26,6 +27,7 @@ var CmdDeployTokensList = cli.Command{
}, flags.AllDefaultFlags...),
}
+// RunDeployTokensList lists deploy tokens
func RunDeployTokensList(ctx stdctx.Context, cmd *cli.Command) error {
c, err := context.InitCommand(cmd)
if err != nil {
diff --git a/modules/print/deploy_token.go b/modules/print/deploy_token.go
index 1faeb3a9..a95fca04 100644
--- a/modules/print/deploy_token.go
+++ b/modules/print/deploy_token.go
@@ -10,6 +10,7 @@ import (
"gitea.dev/sdk"
)
+// DeployTokensList prints a list of deploy tokens
func DeployTokensList(keys []*gitea.DeployKey, output string) {
t := tableWithHeader(
"ID",
@@ -39,6 +40,7 @@ func DeployTokensList(keys []*gitea.DeployKey, output string) {
t.print(output)
}
+// DeployTokenDetails prints details of a single deploy token
func DeployTokenDetails(key *gitea.DeployKey) {
fmt.Printf("# Deploy Token %d\n\n", key.ID)
fmt.Printf("- **Title**: %s\n", key.Title)