codeberg-cli 0.4.0__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/PKG-INFO +22 -21
  2. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/README.md +21 -20
  3. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/pyproject.toml +1 -1
  4. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/client.py +31 -6
  5. codeberg_cli-0.4.2/src/codeberg_cli/routes/actions/_format.py +59 -0
  6. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/actions/dispatch.py +16 -5
  7. codeberg_cli-0.4.2/src/codeberg_cli/routes/actions/run.py +56 -0
  8. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/actions/runs.py +15 -14
  9. codeberg_cli-0.4.2/src/codeberg_cli/routes/actions/workflows.py +69 -0
  10. codeberg_cli-0.4.2/tests/test_actions.py +196 -0
  11. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_client.py +40 -0
  12. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/uv.lock +1 -1
  13. codeberg_cli-0.4.0/src/codeberg_cli/routes/actions/run.py +0 -40
  14. codeberg_cli-0.4.0/src/codeberg_cli/routes/actions/workflows.py +0 -46
  15. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/.github/workflows/ci.yml +0 -0
  16. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/.github/workflows/release.yml +0 -0
  17. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/.gitignore +0 -0
  18. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/.python-version +0 -0
  19. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/Justfile +0 -0
  20. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/LICENSE +0 -0
  21. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/__main__.py +0 -0
  22. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/config.py +0 -0
  23. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/git.py +0 -0
  24. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/helpers.py +0 -0
  25. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/__init__.py +0 -0
  26. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/actions/__init__.py +0 -0
  27. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/api.py +0 -0
  28. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/auth/__init__.py +0 -0
  29. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/auth/login.py +0 -0
  30. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/auth/logout.py +0 -0
  31. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/auth/status.py +0 -0
  32. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/auth/whoami.py +0 -0
  33. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/__init__.py +0 -0
  34. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/close.py +0 -0
  35. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/comment.py +0 -0
  36. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/create.py +0 -0
  37. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/delete.py +0 -0
  38. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/edit.py +0 -0
  39. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/labels/__init__.py +0 -0
  40. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/labels/add.py +0 -0
  41. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/labels/list.py +0 -0
  42. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/labels/remove.py +0 -0
  43. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/list.py +0 -0
  44. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/pin.py +0 -0
  45. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/reopen.py +0 -0
  46. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/search.py +0 -0
  47. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/subscribe.py +0 -0
  48. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/time/__init__.py +0 -0
  49. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/time/add.py +0 -0
  50. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/time/list.py +0 -0
  51. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/unpin.py +0 -0
  52. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/unsubscribe.py +0 -0
  53. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/issue/view.py +0 -0
  54. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/label/__init__.py +0 -0
  55. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/label/create.py +0 -0
  56. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/label/delete.py +0 -0
  57. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/label/edit.py +0 -0
  58. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/label/list.py +0 -0
  59. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/milestone/__init__.py +0 -0
  60. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/milestone/create.py +0 -0
  61. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/milestone/delete.py +0 -0
  62. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/milestone/edit.py +0 -0
  63. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/milestone/list.py +0 -0
  64. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/milestone/view.py +0 -0
  65. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/notifications.py +0 -0
  66. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/org/__init__.py +0 -0
  67. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/org/list.py +0 -0
  68. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/org/members.py +0 -0
  69. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/org/teams.py +0 -0
  70. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/org/view.py +0 -0
  71. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/__init__.py +0 -0
  72. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/check_merge.py +0 -0
  73. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/checkout.py +0 -0
  74. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/close.py +0 -0
  75. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/comment.py +0 -0
  76. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/commits.py +0 -0
  77. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/create.py +0 -0
  78. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/diff.py +0 -0
  79. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/edit.py +0 -0
  80. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/files.py +0 -0
  81. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/list.py +0 -0
  82. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/merge.py +0 -0
  83. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/reopen.py +0 -0
  84. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/update.py +0 -0
  85. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/pr/view.py +0 -0
  86. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/__init__.py +0 -0
  87. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/create.py +0 -0
  88. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/delete.py +0 -0
  89. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/edit.py +0 -0
  90. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/list.py +0 -0
  91. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/upload.py +0 -0
  92. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/release/view.py +0 -0
  93. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/__init__.py +0 -0
  94. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/archive.py +0 -0
  95. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/branch/__init__.py +0 -0
  96. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/branch/create.py +0 -0
  97. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/branch/delete.py +0 -0
  98. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/branch/list.py +0 -0
  99. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/branch/view.py +0 -0
  100. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/clone.py +0 -0
  101. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/collaborator/__init__.py +0 -0
  102. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/collaborator/add.py +0 -0
  103. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/collaborator/delete.py +0 -0
  104. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/collaborator/list.py +0 -0
  105. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/commits.py +0 -0
  106. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/contents.py +0 -0
  107. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/create.py +0 -0
  108. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/delete.py +0 -0
  109. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/edit.py +0 -0
  110. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/fork.py +0 -0
  111. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/forks/sync.py +0 -0
  112. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/forks.py +0 -0
  113. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/languages.py +0 -0
  114. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/list.py +0 -0
  115. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/migrate.py +0 -0
  116. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/search.py +0 -0
  117. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/star.py +0 -0
  118. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/stargazers.py +0 -0
  119. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/tag/__init__.py +0 -0
  120. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/tag/create.py +0 -0
  121. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/tag/delete.py +0 -0
  122. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/tag/list.py +0 -0
  123. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/topics/__init__.py +0 -0
  124. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/topics/list.py +0 -0
  125. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/topics/set.py +0 -0
  126. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/transfer.py +0 -0
  127. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/unstar.py +0 -0
  128. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/unwatch.py +0 -0
  129. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/view.py +0 -0
  130. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/watch.py +0 -0
  131. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/repo/watchers.py +0 -0
  132. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/src/codeberg_cli/routes/user.py +0 -0
  133. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_api.py +0 -0
  134. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_auth.py +0 -0
  135. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_config.py +0 -0
  136. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_git.py +0 -0
  137. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_issue.py +0 -0
  138. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_pr.py +0 -0
  139. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_release.py +0 -0
  140. {codeberg_cli-0.4.0 → codeberg_cli-0.4.2}/tests/test_repo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeberg-cli
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: A Forgejo CLI — works with Codeberg and any Forgejo instance
5
5
  Project-URL: Homepage, https://codeberg.org/ThatXliner/codeberg-cli
6
6
  Project-URL: Repository, https://codeberg.org/ThatXliner/codeberg-cli
@@ -95,10 +95,11 @@ cb config set base_url "https://git.example.com/api/v1" # Self-hosted Forgejo
95
95
 
96
96
  Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 2026.*
97
97
 
98
+ TL;DR: **`cb` is the most feature-complete Forgejo CLI** — by a wide margin.
99
+
98
100
  | | **cb** (this) | **fj** (forgejo-cli) | **berg** (codeberg-cli) | **tea** (gitea/tea) | **gcli** |
99
101
  |---|---|---|---|---|---|
100
102
  | Language | Python | Rust | Rust | Go | C |
101
- | Version | v0.2.0 | v0.5.0 | v0.5.1 | v0.13.0 | v2.11.0 |
102
103
  | Install | `pip install codeberg-cli` | prebuilt binaries/Cargo | `cargo install codeberg-cli` | `brew install tea` | `brew install gcli` |
103
104
  | Multi-instance | `cb config set base_url` | `-H <instance>` | `BERG_BASE_URL` | `tea login add` | `-t forgejo` |
104
105
 
@@ -108,18 +109,18 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
108
109
  | Create | ✅ | ✅ | ✅ | ✅ | ✅ |
109
110
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
110
111
  | View | ✅ | ✅ | ✅ | ✅ | ✅ |
111
- | Close | ✅ | ✅ | ✅ | ✅ | |
112
- | Reopen | ✅ | — | ✅ | ✅ | |
112
+ | Close | ✅ | ✅ | ✅ | ✅ | |
113
+ | Reopen | ✅ | — | ✅ | ✅ | |
113
114
  | Comment | ✅ | ✅ | ✅ | ✅ | ✅ |
114
- | Edit | ✅ | | ✅ | ✅ | |
115
+ | Edit | ✅ | | ✅ | ✅ | |
115
116
  | Delete | ✅ | — | — | — | — |
116
117
  | Pin/Unpin | ✅ | — | — | ✅ | — |
117
118
  | Search | ✅ | ✅ | — | ✅ | — |
118
119
  | Attachments | — | — | — | ✅ | — |
119
- | Labels (manage on issue) | ✅ | — | — | ✅ | |
120
+ | Labels (manage on issue) | ✅ | — | — | ✅ | |
120
121
  | Reactions | — | — | — | — | — |
121
122
  | Subscriptions | ✅ | — | — | ✅ | — |
122
- | Tracked times | ✅ | — | — | | ✅ |
123
+ | Tracked times | ✅ | — | — | | ✅ |
123
124
  | Dependencies | — | — | — | — | — |
124
125
  | Deadline | — | — | — | ✅ | — |
125
126
  | Templates | — | ✅ | — | — | — |
@@ -131,16 +132,16 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
131
132
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
132
133
  | View | ✅ | ✅ | ✅ | ✅ | ✅ |
133
134
  | Merge | ✅ | ✅ | ✅ | ✅ | ✅ |
134
- | Close | ✅ | | ✅ | ✅ | |
135
- | Reopen | ✅ | — | ✅ | ✅ | |
135
+ | Close | ✅ | | ✅ | ✅ | |
136
+ | Reopen | ✅ | — | ✅ | ✅ | |
136
137
  | Comment | ✅ | ✅ | ✅ | ✅ | ✅ |
137
- | Edit | ✅ | | ✅ | ✅ | — |
138
- | Checkout | ✅ | | ✅ | ✅ | ✅ |
139
- | Commits | ✅ | | — | | |
140
- | Files/changed | ✅ | | — | | — |
138
+ | Edit | ✅ | | ✅ | ✅ | — |
139
+ | Checkout | ✅ | | ✅ | ✅ | ✅ |
140
+ | Commits | ✅ | | — | | |
141
+ | Files/changed | ✅ | | — | | — |
141
142
  | Reviews | — | ✅ | — | ✅ | ✅ |
142
- | Diff/Patch | ✅ | | — | | |
143
- | Update branch | ✅ | — | — | | — |
143
+ | Diff/Patch | ✅ | | — | | |
144
+ | Update branch | ✅ | — | — | | — |
144
145
  | AGit (no-fork) | — | ✅ | — | — | — |
145
146
  | CI status | — | ✅ | — | — | — |
146
147
  | Templates | — | ✅ | — | — | — |
@@ -151,7 +152,7 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
151
152
  |---|---|---|---|---|---|
152
153
  | Create | ✅ | ✅ | ✅ | ✅ | ✅ |
153
154
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
154
- | View | ✅ | ✅ | ✅ | ✅ | |
155
+ | View | ✅ | ✅ | ✅ | ✅ | |
155
156
  | Upload assets | ✅ | — | ✅ | — | ✅ |
156
157
  | Delete | ✅ | — | — | ✅ | ✅ |
157
158
  | Edit | ✅ | — | — | ✅ | — |
@@ -164,12 +165,12 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
164
165
  | Create | ✅ | ✅ | ✅ | ✅ | ✅ |
165
166
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
166
167
  | View | ✅ | ✅ | ✅ | ✅ | ✅ |
167
- | Clone | ✅ | | ✅ | ✅ | — |
168
+ | Clone | ✅ | | ✅ | ✅ | — |
168
169
  | Fork | ✅ | ✅ | ✅ | ✅ | ✅ |
169
170
  | Delete | ✅ | — | ✅ | ✅ | — |
170
171
  | Star | ✅ | ✅ | ✅ | ✅ | — |
171
- | Unstar | ✅ | | ✅ | ✅ | — |
172
- | Watch/Unwatch | ✅ | | — | ✅ | — |
172
+ | Unstar | ✅ | | ✅ | ✅ | — |
173
+ | Watch/Unwatch | ✅ | | — | ✅ | — |
173
174
  | Edit | ✅ | ✅ | — | ✅ | — |
174
175
  | Migrate/Mirror | ✅ | ✅ | — | ✅ | — |
175
176
  | Branches | ✅ | — | — | ✅ | — |
@@ -207,7 +208,7 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
207
208
  |---|---|---|---|---|---|
208
209
  | List | ✅ | — | ✅ | ✅ | ✅ |
209
210
  | Mark read | — | — | — | ✅ | — |
210
- | Thread details | — | — | — | | — |
211
+ | Thread details | — | — | — | | — |
211
212
  | Per-repo | — | — | — | ✅ | — |
212
213
 
213
214
  ### Extra
@@ -225,7 +226,7 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
225
226
  | Config management | ✅ | — | ✅ | — | — |
226
227
  | Web browser flag | on view commands | — | — | ✅ | — |
227
228
 
228
- **`cb` is the most feature-complete Forgejo CLI** — by a wide margin. It dominates on repo management (branches, topics, languages, tags, commits, contents, collaborators, search, archive, transfer, watch/unwatch, sync-fork, migrate), issues (delete, pin, labels, search, subscribe, tracked times), PRs (diff, commits, files, reopen, update), releases (delete, edit, latest, by-tag), and extras (Actions, org/team management, `--json` on every command, raw API, release uploads). Built in Python with [Xclif](https://xclif.readthedocs.io) for a clean, hackable codebase. If something's missing, open an issue!
229
+ Built in Python with [Xclif](https://xclif.readthedocs.io) for a clean, hackable codebase. If something's missing, open an issue!
229
230
 
230
231
  ## License
231
232
 
@@ -70,10 +70,11 @@ cb config set base_url "https://git.example.com/api/v1" # Self-hosted Forgejo
70
70
 
71
71
  Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 2026.*
72
72
 
73
+ TL;DR: **`cb` is the most feature-complete Forgejo CLI** — by a wide margin.
74
+
73
75
  | | **cb** (this) | **fj** (forgejo-cli) | **berg** (codeberg-cli) | **tea** (gitea/tea) | **gcli** |
74
76
  |---|---|---|---|---|---|
75
77
  | Language | Python | Rust | Rust | Go | C |
76
- | Version | v0.2.0 | v0.5.0 | v0.5.1 | v0.13.0 | v2.11.0 |
77
78
  | Install | `pip install codeberg-cli` | prebuilt binaries/Cargo | `cargo install codeberg-cli` | `brew install tea` | `brew install gcli` |
78
79
  | Multi-instance | `cb config set base_url` | `-H <instance>` | `BERG_BASE_URL` | `tea login add` | `-t forgejo` |
79
80
 
@@ -83,18 +84,18 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
83
84
  | Create | ✅ | ✅ | ✅ | ✅ | ✅ |
84
85
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
85
86
  | View | ✅ | ✅ | ✅ | ✅ | ✅ |
86
- | Close | ✅ | ✅ | ✅ | ✅ | |
87
- | Reopen | ✅ | — | ✅ | ✅ | |
87
+ | Close | ✅ | ✅ | ✅ | ✅ | |
88
+ | Reopen | ✅ | — | ✅ | ✅ | |
88
89
  | Comment | ✅ | ✅ | ✅ | ✅ | ✅ |
89
- | Edit | ✅ | | ✅ | ✅ | |
90
+ | Edit | ✅ | | ✅ | ✅ | |
90
91
  | Delete | ✅ | — | — | — | — |
91
92
  | Pin/Unpin | ✅ | — | — | ✅ | — |
92
93
  | Search | ✅ | ✅ | — | ✅ | — |
93
94
  | Attachments | — | — | — | ✅ | — |
94
- | Labels (manage on issue) | ✅ | — | — | ✅ | |
95
+ | Labels (manage on issue) | ✅ | — | — | ✅ | |
95
96
  | Reactions | — | — | — | — | — |
96
97
  | Subscriptions | ✅ | — | — | ✅ | — |
97
- | Tracked times | ✅ | — | — | | ✅ |
98
+ | Tracked times | ✅ | — | — | | ✅ |
98
99
  | Dependencies | — | — | — | — | — |
99
100
  | Deadline | — | — | — | ✅ | — |
100
101
  | Templates | — | ✅ | — | — | — |
@@ -106,16 +107,16 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
106
107
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
107
108
  | View | ✅ | ✅ | ✅ | ✅ | ✅ |
108
109
  | Merge | ✅ | ✅ | ✅ | ✅ | ✅ |
109
- | Close | ✅ | | ✅ | ✅ | |
110
- | Reopen | ✅ | — | ✅ | ✅ | |
110
+ | Close | ✅ | | ✅ | ✅ | |
111
+ | Reopen | ✅ | — | ✅ | ✅ | |
111
112
  | Comment | ✅ | ✅ | ✅ | ✅ | ✅ |
112
- | Edit | ✅ | | ✅ | ✅ | — |
113
- | Checkout | ✅ | | ✅ | ✅ | ✅ |
114
- | Commits | ✅ | | — | | |
115
- | Files/changed | ✅ | | — | | — |
113
+ | Edit | ✅ | | ✅ | ✅ | — |
114
+ | Checkout | ✅ | | ✅ | ✅ | ✅ |
115
+ | Commits | ✅ | | — | | |
116
+ | Files/changed | ✅ | | — | | — |
116
117
  | Reviews | — | ✅ | — | ✅ | ✅ |
117
- | Diff/Patch | ✅ | | — | | |
118
- | Update branch | ✅ | — | — | | — |
118
+ | Diff/Patch | ✅ | | — | | |
119
+ | Update branch | ✅ | — | — | | — |
119
120
  | AGit (no-fork) | — | ✅ | — | — | — |
120
121
  | CI status | — | ✅ | — | — | — |
121
122
  | Templates | — | ✅ | — | — | — |
@@ -126,7 +127,7 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
126
127
  |---|---|---|---|---|---|
127
128
  | Create | ✅ | ✅ | ✅ | ✅ | ✅ |
128
129
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
129
- | View | ✅ | ✅ | ✅ | ✅ | |
130
+ | View | ✅ | ✅ | ✅ | ✅ | |
130
131
  | Upload assets | ✅ | — | ✅ | — | ✅ |
131
132
  | Delete | ✅ | — | — | ✅ | ✅ |
132
133
  | Edit | ✅ | — | — | ✅ | — |
@@ -139,12 +140,12 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
139
140
  | Create | ✅ | ✅ | ✅ | ✅ | ✅ |
140
141
  | List | ✅ | ✅ | ✅ | ✅ | ✅ |
141
142
  | View | ✅ | ✅ | ✅ | ✅ | ✅ |
142
- | Clone | ✅ | | ✅ | ✅ | — |
143
+ | Clone | ✅ | | ✅ | ✅ | — |
143
144
  | Fork | ✅ | ✅ | ✅ | ✅ | ✅ |
144
145
  | Delete | ✅ | — | ✅ | ✅ | — |
145
146
  | Star | ✅ | ✅ | ✅ | ✅ | — |
146
- | Unstar | ✅ | | ✅ | ✅ | — |
147
- | Watch/Unwatch | ✅ | | — | ✅ | — |
147
+ | Unstar | ✅ | | ✅ | ✅ | — |
148
+ | Watch/Unwatch | ✅ | | — | ✅ | — |
148
149
  | Edit | ✅ | ✅ | — | ✅ | — |
149
150
  | Migrate/Mirror | ✅ | ✅ | — | ✅ | — |
150
151
  | Branches | ✅ | — | — | ✅ | — |
@@ -182,7 +183,7 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
182
183
  |---|---|---|---|---|---|
183
184
  | List | ✅ | — | ✅ | ✅ | ✅ |
184
185
  | Mark read | — | — | — | ✅ | — |
185
- | Thread details | — | — | — | | — |
186
+ | Thread details | — | — | — | | — |
186
187
  | Per-repo | — | — | — | ✅ | — |
187
188
 
188
189
  ### Extra
@@ -200,7 +201,7 @@ Here's how `cb` stacks up against other Forgejo CLI tools. *Last updated: May 20
200
201
  | Config management | ✅ | — | ✅ | — | — |
201
202
  | Web browser flag | on view commands | — | — | ✅ | — |
202
203
 
203
- **`cb` is the most feature-complete Forgejo CLI** — by a wide margin. It dominates on repo management (branches, topics, languages, tags, commits, contents, collaborators, search, archive, transfer, watch/unwatch, sync-fork, migrate), issues (delete, pin, labels, search, subscribe, tracked times), PRs (diff, commits, files, reopen, update), releases (delete, edit, latest, by-tag), and extras (Actions, org/team management, `--json` on every command, raw API, release uploads). Built in Python with [Xclif](https://xclif.readthedocs.io) for a clean, hackable codebase. If something's missing, open an issue!
204
+ Built in Python with [Xclif](https://xclif.readthedocs.io) for a clean, hackable codebase. If something's missing, open an issue!
204
205
 
205
206
  ## License
206
207
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codeberg-cli"
3
- version = "0.4.0"
3
+ version = "0.4.2"
4
4
  description = "A Forgejo CLI — works with Codeberg and any Forgejo instance"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -16,6 +16,28 @@ _VERBS = {
16
16
  class ClientError(RuntimeError):
17
17
  """Raised when the API returns a non-2xx status."""
18
18
 
19
+ def __init__(self, message: str, status_code: int | None = None) -> None:
20
+ super().__init__(message)
21
+ self.status_code = status_code
22
+
23
+
24
+ def _response_error_message(response: httpx.Response) -> str:
25
+ if not response.text:
26
+ return response.reason_phrase or "unknown error"
27
+
28
+ try:
29
+ payload = response.json()
30
+ except ValueError:
31
+ return response.text.strip() or response.reason_phrase or "unknown error"
32
+
33
+ if isinstance(payload, dict):
34
+ for key in ("message", "error", "detail"):
35
+ message = payload.get(key)
36
+ if message:
37
+ return str(message)
38
+
39
+ return response.text.strip() or response.reason_phrase or "unknown error"
40
+
19
41
 
20
42
  class Client:
21
43
  """HTTP client for the Codeberg API."""
@@ -34,7 +56,12 @@ class Client:
34
56
  raw = raw.rstrip("/")
35
57
  if not raw.endswith("/api/v1"):
36
58
  raw += "/api/v1"
37
- self._client = httpx.Client(base_url=raw, headers=headers, timeout=30.0)
59
+ self._client = httpx.Client(
60
+ base_url=raw,
61
+ headers=headers,
62
+ timeout=30.0,
63
+ follow_redirects=True,
64
+ )
38
65
 
39
66
  @property
40
67
  def base_url(self) -> str:
@@ -80,12 +107,10 @@ class Client:
80
107
  with Status(f"{label}..."):
81
108
  response = self._client.request(method, path, **kwargs)
82
109
  if not response.is_success:
83
- msg = (
84
- response.json().get("message", "unknown error")
85
- if response.text
86
- else "unknown error"
110
+ msg = _response_error_message(response)
111
+ raise ClientError(
112
+ f"{response.status_code} {msg}", status_code=response.status_code
87
113
  )
88
- raise ClientError(f"{response.status_code} {msg}")
89
114
  if response.status_code == 204:
90
115
  return None
91
116
  return response.json()
@@ -0,0 +1,59 @@
1
+ from typing import Any, Callable, TypeVar
2
+
3
+ from codeberg_cli.client import ClientError
4
+ from xclif.errors import UsageError
5
+
6
+ T = TypeVar("T")
7
+
8
+
9
+ def actions_request(repo: str, call: Callable[[], T]) -> T:
10
+ """Run an Actions API *call*, turning a 404 into a clear message.
11
+
12
+ Forgejo returns 404 for Actions endpoints when Actions is not enabled on
13
+ the repository (or the repo does not exist), which is otherwise surfaced as
14
+ an opaque ``404 The target couldn't be found.`` traceback.
15
+ """
16
+ try:
17
+ return call()
18
+ except ClientError as exc:
19
+ if exc.status_code == 404:
20
+ raise UsageError(
21
+ f"No Actions found for {repo}.",
22
+ hint="Actions may be disabled for this repository, or the repository may not exist.",
23
+ ) from exc
24
+ raise
25
+
26
+
27
+ def _first(run: dict[str, Any], *keys: str, default: str = "") -> Any:
28
+ for key in keys:
29
+ value = run.get(key)
30
+ if value is not None and value != "":
31
+ return value
32
+ return default
33
+
34
+
35
+ def normalize_run(run: dict[str, Any]) -> dict[str, Any]:
36
+ return {
37
+ "id": run.get("id"),
38
+ "index_in_repo": run.get("index_in_repo"),
39
+ "title": _first(run, "title", "display_title", default=""),
40
+ "status": _first(run, "conclusion", "status", default="?"),
41
+ "event": _first(run, "trigger_event", "event", default="?"),
42
+ "workflow_id": run.get("workflow_id"),
43
+ "created": _first(run, "created", "created_at", default=""),
44
+ "updated": _first(run, "updated", "updated_at", default=""),
45
+ "started": run.get("started"),
46
+ "stopped": run.get("stopped"),
47
+ "ref": _first(run, "prettyref", "head_branch", default=""),
48
+ "commit": _first(run, "commit_sha", "head_sha", default=""),
49
+ "html_url": _first(run, "html_url", "url", default=""),
50
+ }
51
+
52
+
53
+ def list_runs(response: dict[str, Any] | list[dict[str, Any]]) -> list[dict[str, Any]]:
54
+ if isinstance(response, dict):
55
+ runs = response.get("workflow_runs", [])
56
+ if isinstance(runs, list):
57
+ return runs
58
+ return []
59
+ return response
@@ -23,9 +23,20 @@ def _(
23
23
  return 1
24
24
  repo = inferred
25
25
 
26
- client.post(
27
- f"/repos/{repo}/actions/workflows/{workflow}/dispatches",
28
- data={"ref": ref},
29
- action="Dispatching workflow",
30
- )
26
+ from codeberg_cli.client import ClientError
27
+ from xclif.errors import UsageError
28
+
29
+ try:
30
+ client.post(
31
+ f"/repos/{repo}/actions/workflows/{workflow}/dispatches",
32
+ data={"ref": ref},
33
+ action="Dispatching workflow",
34
+ )
35
+ except ClientError as exc:
36
+ if exc.status_code == 404:
37
+ raise UsageError(
38
+ f"No workflow {workflow!r} found in {repo}.",
39
+ hint="List workflows with 'cb actions workflows', or Actions may be disabled for this repository.",
40
+ ) from exc
41
+ raise
31
42
  rich.print(f"[green]Dispatched {workflow} on {ref} in {repo}.[/green]")
@@ -0,0 +1,56 @@
1
+ from typing import Annotated
2
+
3
+ import rich
4
+
5
+ from codeberg_cli.git import infer_repo
6
+ from codeberg_cli.helpers import is_json_mode, output, require_client
7
+ from xclif import Arg, Option, command
8
+
9
+ from codeberg_cli.routes.actions._format import normalize_run
10
+
11
+
12
+ @command("run")
13
+ def _(
14
+ run_id: Annotated[int, Arg(description="Run ID")],
15
+ repo: Annotated[str, Option(description="Repository (owner/repo)", name="repo")] = "",
16
+ ) -> None:
17
+ """View details of a specific action run."""
18
+ client = require_client()
19
+
20
+ if not repo:
21
+ inferred = infer_repo()
22
+ if not inferred:
23
+ rich.print("[bold red]Error:[/bold red] No repo specified and not in a git directory")
24
+ return 1
25
+ repo = inferred
26
+
27
+ from codeberg_cli.client import ClientError
28
+ from xclif.errors import UsageError
29
+
30
+ try:
31
+ run = client.get(f"/repos/{repo}/actions/runs/{run_id}")
32
+ except ClientError as exc:
33
+ if exc.status_code == 404:
34
+ raise UsageError(
35
+ f"No run #{run_id} found in {repo}.",
36
+ hint="Check the run ID with 'cb actions runs', or Actions may be disabled for this repository.",
37
+ ) from exc
38
+ raise
39
+
40
+ if is_json_mode():
41
+ output(run)
42
+ return
43
+
44
+ normalized = normalize_run(run)
45
+ commit = normalized["commit"] or "?"
46
+
47
+ rich.print(f"[bold]Run #{normalized['id']}:[/bold] {normalized['title']}")
48
+ rich.print(f" Status: {normalized['status']}")
49
+ rich.print(f" Event: {normalized['event']}")
50
+ rich.print(f" Workflow: {normalized['workflow_id'] or '?'}")
51
+ rich.print(f" Ref: {normalized['ref'] or '?'}")
52
+ rich.print(f" Commit: {commit[:12]}")
53
+ rich.print(f" Created: {normalized['created'] or '?'}")
54
+ rich.print(f" Updated: {normalized['updated'] or '?'}")
55
+ if normalized["html_url"]:
56
+ rich.print(f" URL: {normalized['html_url']}")
@@ -6,6 +6,8 @@ from codeberg_cli.git import infer_repo
6
6
  from codeberg_cli.helpers import print_table, require_client
7
7
  from xclif import Option, command
8
8
 
9
+ from codeberg_cli.routes.actions._format import actions_request, list_runs, normalize_run
10
+
9
11
 
10
12
  @command("runs")
11
13
  def _(
@@ -22,7 +24,11 @@ def _(
22
24
  return 1
23
25
  repo = inferred
24
26
 
25
- runs = client.get(f"/repos/{repo}/actions/runs", params={"limit": limit, "page": 1})
27
+ response = actions_request(
28
+ repo,
29
+ lambda: client.get(f"/repos/{repo}/actions/runs", params={"limit": limit, "page": 1}),
30
+ )
31
+ runs = list_runs(response)
26
32
 
27
33
  if not runs:
28
34
  rich.print(f"[dim]No action runs in {repo}.[/dim]")
@@ -31,19 +37,14 @@ def _(
31
37
  rows = []
32
38
  json_rows = []
33
39
  for run in runs:
34
- status = run.get("status", "?")
35
- conclusion = run.get("conclusion", "")
36
- label = f"{status}" if not conclusion else f"{conclusion}"
37
- rows.append((str(run["id"]), run["display_title"][:72], label, run["event"]))
38
- json_rows.append({
39
- "id": run["id"],
40
- "title": run["display_title"],
41
- "status": status,
42
- "conclusion": conclusion,
43
- "event": run["event"],
44
- "created_at": run.get("created_at", ""),
45
- "head_branch": run.get("head_branch", ""),
46
- })
40
+ normalized = normalize_run(run)
41
+ rows.append((
42
+ str(normalized["id"]),
43
+ normalized["title"][:72],
44
+ normalized["status"],
45
+ normalized["event"],
46
+ ))
47
+ json_rows.append(normalized)
47
48
 
48
49
  print_table(
49
50
  ["ID", "Title", "Status", "Event"],
@@ -0,0 +1,69 @@
1
+ from typing import Annotated
2
+
3
+ import rich
4
+
5
+ from codeberg_cli.client import ClientError
6
+ from codeberg_cli.git import infer_repo
7
+ from codeberg_cli.helpers import print_table, require_client
8
+ from xclif import Option, command
9
+
10
+
11
+ @command("workflows")
12
+ def _(
13
+ repo: Annotated[str, Option(description="Repository (owner/repo)", name="repo")] = "",
14
+ ref: Annotated[str, Option(description="Branch or ref", name="ref")] = "",
15
+ ) -> None:
16
+ """List workflows for a repository."""
17
+ client = require_client()
18
+
19
+ if not repo:
20
+ inferred = infer_repo()
21
+ if not inferred:
22
+ rich.print("[bold red]Error:[/bold red] No repo specified and not in a git directory")
23
+ return 1
24
+ repo = inferred
25
+
26
+ params = {}
27
+ if ref:
28
+ params["ref"] = ref
29
+
30
+ try:
31
+ workflows = client.get(
32
+ f"/repos/{repo}/contents/.forgejo/workflows",
33
+ params=params,
34
+ action="Fetching workflow files",
35
+ )
36
+ except ClientError as exc:
37
+ if exc.status_code == 404:
38
+ rich.print(f"[dim]No workflows in {repo}.[/dim]")
39
+ return
40
+ raise
41
+
42
+ if not workflows:
43
+ rich.print(f"[dim]No workflows in {repo}.[/dim]")
44
+ return
45
+ if not isinstance(workflows, list):
46
+ rich.print(f"[dim]No workflows in {repo}.[/dim]")
47
+ return
48
+
49
+ rows = []
50
+ json_rows = []
51
+ for wf in workflows:
52
+ if wf.get("type") != "file":
53
+ continue
54
+ rows.append((wf["name"], wf.get("path", ""), str(wf.get("size", ""))))
55
+ json_rows.append({
56
+ "filename": wf["name"],
57
+ "path": wf.get("path", ""),
58
+ "size": wf.get("size"),
59
+ })
60
+
61
+ if not rows:
62
+ rich.print(f"[dim]No workflows in {repo}.[/dim]")
63
+ return
64
+
65
+ print_table(
66
+ ["Filename", "Path", "Size"],
67
+ rows,
68
+ json_data=json_rows,
69
+ )