cursor_Setup
This commit is contained in:
1 parent
c607cd1833
commit
dc87e7f3b8
13 files changed
+1328
No files matched your search
@@ -0,0 +1,68 @@
|
||||
# Gitea API – lokales CLI
|
||||
|
||||
Dient dazu, **Issues** auf deiner Gitea-Instanz zu lesen und anzulegen – mit den in **`.env`** gesetzten Variablen (nicht committen).
|
||||
|
||||
## Umgebungsvariablen (Root `.env`)
|
||||
|
||||
| Variable | Beispiel |
|
||||
|----------|----------|
|
||||
| `GITEA_BASE_URL` | `http://192.168.2.144:3000` |
|
||||
| `GITEA_TOKEN` | Personal Access Token (nur Scope **repo** + **issue** nötig) |
|
||||
| `GITEA_OWNER` | `Lars` |
|
||||
| `GITEA_REPO` | `mitai-jinkendo` |
|
||||
|
||||
## Voraussetzung
|
||||
|
||||
Python 3.10+ (nur Standardbibliothek).
|
||||
|
||||
## Aufruf (im Repo-Root)
|
||||
|
||||
```powershell
|
||||
# Issues auflisten (offen)
|
||||
python scripts/gitea/gitea_api.py issues list
|
||||
|
||||
# Issues mit State
|
||||
python scripts/gitea/gitea_api.py issues list --state all
|
||||
|
||||
# Ein Issue lesen
|
||||
python scripts/gitea/gitea_api.py issues get 42
|
||||
|
||||
# Issue anlegen (Titel + Body aus Datei oder direkt)
|
||||
python scripts/gitea/gitea_api.py issues create --title "Fix: …" --body "…"
|
||||
|
||||
python scripts/gitea/gitea_api.py issues create --title "Fix: …" --body-file path/to/body.md
|
||||
|
||||
# Kommentar
|
||||
python scripts/gitea/gitea_api.py issues comment 42 --body "…"
|
||||
|
||||
# Schließen / wieder öffnen
|
||||
python scripts/gitea/gitea_api.py issues close 42
|
||||
python scripts/gitea/gitea_api.py issues reopen 42
|
||||
|
||||
# Alle Issues (alle Seiten, Vorsicht bei großen Repos)
|
||||
python scripts/gitea/gitea_api.py issues list --all-pages --state open
|
||||
|
||||
# Markdown-Datei (z. B. Audit-Template) als Issue-Body
|
||||
python scripts/gitea/gitea_api.py issues create --title "…" --body-file .claude/docs/audit/.../gitea/TEMPLATE_P0-....md
|
||||
```
|
||||
|
||||
## Repository-Inhalt (read-only)
|
||||
|
||||
```powershell
|
||||
# Datei über Gitea-API (bei Dateien: Text-Inhalt; bei Verzeichnissen: JSON-Listing)
|
||||
python scripts/gitea/gitea_api.py repo file README.md
|
||||
|
||||
python scripts/gitea/gitea_api.py repo file backend/main.py --ref develop
|
||||
|
||||
# Clone/Push: normales `git remote` – Token nicht dauerhaft in der Remote-URL; SSH oder Credential Helper.
|
||||
```
|
||||
|
||||
## Sicherheit
|
||||
|
||||
- **Niemals** `GITEA_TOKEN` ins Git oder in Issues/Pastebins.
|
||||
- Token, das in Chat oder Logs gelandet ist, in Gitea **widerrufen** und **neu erzeugen**.
|
||||
- Cursor-Agenten können das CLI über das Terminal nutzen, wenn `.env` gesetzt und Netzwerk zu `GITEA_BASE_URL` erreichbar ist.
|
||||
|
||||
## MCP (Tools direkt im Agent)
|
||||
|
||||
Siehe [`MCP_SETUP.md`](./MCP_SETUP.md) und [`../.cursor/mcp.json.example`](../../.cursor/mcp.json.example).
|
||||
Reference in new issue
Block a user