Initial: gitea-api (read-only) + sporel-commit tools with Claude skills

This commit is contained in:
Calic
2026-06-17 11:47:37 +00:00
commit 5c377a15e0
6 changed files with 304 additions and 0 deletions

53
README.md Normal file
View File

@@ -0,0 +1,53 @@
# gitea-devtools
Small dev tools for the Gitea / Sporel setup. Usable two ways:
1. **Directly in a shell** (any dev environment) — clone and run the scripts.
2. **As Claude Code skills**`skills/` are symlinked into `~/.claude/skills/`
and allowlisted, so the recurring privileged chains run without per-step
permission prompts.
## Tools
### `gitea-api.sh` — read-only Gitea API helper
```bash
./gitea-api.sh /orgs/sporel/repos?limit=100 | jq '.[].full_name'
./gitea-api.sh repos/calic/claude-config
```
GET requests only — safe to allowlist. Path may omit the leading `/` and the
`api/v1/` prefix. Pretty-prints via `jq` if present.
### `sporel-commit.sh` — multi-repo commit + push
```bash
./sporel-commit.sh --dry-run "wip" # preview
./sporel-commit.sh "lib-core: bump manifests to 0.4.0"
```
Commits every **dirty** local Sporel repo with one message, using each repo's
**own last-commit author** (Sporel repos have mixed Calic/Axel Meyer authors;
email always `axel.meyer@durania.net`), then pushes if ahead and not diverged.
Diverged repos are reported, never force-pushed. CI fires on tags, not master
pushes, so WIP pushes are safe.
Pair with [`sporel-sync`](https://git.davoryn.de/calic/claude-config) (in
claude-config) which handles pull/push reconciliation.
## Configuration (env vars)
| Var | Default | Used by |
|-----|---------|---------|
| `GITEA_URL` | `http://localhost:3100` | gitea-api.sh — set to `https://git.davoryn.de` off-host |
| `GITEA_TOKEN` | _(auto via docker `gitea` container)_ | gitea-api.sh — set this in dev environments without the container |
| `GITEA_USER` | `calic` | gitea-api.sh |
| `SPOREL_ROOT` | `/root/projects/Sporel` | sporel-commit.sh |
In dev environments without the local `gitea` container, set `GITEA_URL` and a
read-scope `GITEA_TOKEN`; `gitea-api.sh` then needs no docker access.
## Self-maintaining
On failure each script prints the error + a diagnostic hint. If the output was
insufficient to diagnose, improve the script and push this repo.