Add token list command

This commit is contained in:
mpabi
2026-04-26 22:28:31 +02:00
parent bd2d530852
commit 8c6f713de5
4 changed files with 300 additions and 53 deletions
+31
View File
@@ -331,6 +331,37 @@ Przyklad:
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
```
## `tokens list store|remote|both`
Wypisuje jedno zrodlo bez porownywania go z drugim. `list` jest read-only:
pokazuje co jest w `tokens.json`, co jest w git remote albo oba zrodla jako
osobne wiersze. `scan` sluzy do porownania zgodnosci.
Przelaczniki:
- `--repo PATH`
Repo, z ktorego listowane sa git remotes. Domyslnie repo zawierajace `rvctl`.
- `--server ENDPOINT`
Ogranicza wynik do jednego endpointu.
Typowy wynik:
```text
tokens
item source kind server proto host org repo user remote token valid scope org repo
---- ------ ----- ------ ----- ------------------ --------- ----------- ---- ------ ------------ ------------------- aAimnopru oawrc- oawr--
1 store auth gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 e59cc...13be forever --------- +++++ ++++
2 remote auth gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 e59cc...13be
```
Przyklady:
```bash
./rvctl tokens list store
./rvctl tokens list remote
./rvctl tokens list both
```
## `tokens add REMOTE_ID`
Dodaje pusty szkielet tokena do `tokens.json`. `REMOTE_ID` musi byc taki sam