Repository management: zfj repo #36

Closed
opened 2026-10-22 22:13:07 -05:00 by jeff · 1 comment
Owner

A zfj repo porcelain group for managing repositories: view, list, clone, create, fork, edit and delete. Plumbing stays as it is; zfj op repoGet and the rest already reach every repository operation.

Decisions

  • One group, zfj repo, in src/cli/repo.zig, built on porcelain.dispatch / Runner like issue and pr.
  • The repository is positional, [<owner>/<repo>], falling back to the clone's upstream/origin remote. A bare name means the authenticated user's repository for create, view and clone only. edit takes no bare name. delete takes the repository only as an argument, never from the remote. See docs/adr/0006-repo-commands-name-the-repository-positionally.md.
  • git is touched only when asked: --clone, --remote, or zfj repo clone itself.
  • Clone protocol: --protocol ssh|https per command; a per-instance default set by zfj login ... --protocol; https when neither says.
  • Vocabulary: Repository, Owner, Clone, Fork, Unit, in GLOSSARY.md.

Deferred

archive/unarchive (they are edit --archive), transfer, migrate and mirrors, mirror-sync, topics, generating from a template, starring, list filters (through repoSearch), showing the README in view. Each is reachable through zfj op meanwhile.

Commands

One commit per command, each with its tests and its lines in a new README "Repositories" section.

  • #37 view
  • #38 list
  • #39 clone, and login --protocol
  • #40 create
  • #41 fork
  • #42 edit
  • #43 delete, and confirmation
A `zfj repo` porcelain group for managing repositories: `view`, `list`, `clone`, `create`, `fork`, `edit` and `delete`. Plumbing stays as it is; `zfj op repoGet` and the rest already reach every repository operation. ## Decisions - **One group, `zfj repo`**, in `src/cli/repo.zig`, built on `porcelain.dispatch` / `Runner` like `issue` and `pr`. - **The repository is positional**, `[<owner>/<repo>]`, falling back to the clone's `upstream`/`origin` remote. A bare name means the authenticated user's repository for `create`, `view` and `clone` only. `edit` takes no bare name. `delete` takes the repository only as an argument, never from the remote. See `docs/adr/0006-repo-commands-name-the-repository-positionally.md`. - **git is touched only when asked**: `--clone`, `--remote`, or `zfj repo clone` itself. - **Clone protocol**: `--protocol ssh|https` per command; a per-instance default set by `zfj login ... --protocol`; https when neither says. - **Vocabulary**: Repository, Owner, Clone, Fork, Unit, in `GLOSSARY.md`. ## Deferred `archive`/`unarchive` (they are `edit --archive`), `transfer`, `migrate` and mirrors, `mirror-sync`, topics, generating from a template, starring, `list` filters (through `repoSearch`), showing the README in `view`. Each is reachable through `zfj op` meanwhile. ## Commands One commit per command, each with its tests and its lines in a new README "Repositories" section. - [ ] #37 view - [ ] #38 list - [ ] #39 clone, and `login --protocol` - [ ] #40 create - [ ] #41 fork - [ ] #42 edit - [ ] #43 delete, and confirmation
Author
Owner

Done: every command in the first slice is on main.

One departure from the plan: repo create --remote is a flag that always adds the repository as origin, since an option with an optional value would take the next option as its value. What was deferred (archive, transfer, migrate and mirrors, topics, templates, starring, list filters, the README in view) is still reachable through zfj op.

Done: every command in the first slice is on main. - #37 `repo view`: 2169861 - #38 `repo list`: ca52e41 - #39 `repo clone`, and `login --protocol`: a154ece - #40 `repo create`: 53ff118 - #41 `repo fork`: 00863ce - #42 `repo edit`: b9a2070 - #43 `repo delete`, and its confirmation: 5dd73af One departure from the plan: `repo create --remote` is a flag that always adds the repository as `origin`, since an option with an optional value would take the next option as its value. What was deferred (archive, transfer, migrate and mirrors, topics, templates, starring, list filters, the README in view) is still reachable through `zfj op`.
jeff closed this issue 2026-10-22 23:35:48 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeff/zfj#36
No description provided.