feature: add authenticated repository clone command #13

Closed
opened 2026-07-23 22:18:40 +00:00 by codex-bot-andresmgsl · 0 comments

Problem

stoke repo list discovers repositories and Stoke owns the Forgejo authentication token, but there is no stoke repo clone command. Users and automation must extract or indirectly wire the stored token into raw Git commands, which weakens the CLI abstraction and makes private-repository workflows harder to use safely.

Proposed command

stoke repo clone -o OWNER -r REPO [DIRECTORY]

Useful options could include --branch, --depth, and --origin. The implementation should pass credentials ephemerally to Git without printing or persisting the token in the remote URL or repository config.

Acceptance criteria

  • Clones public and private repositories from the configured Forgejo instance.
  • Uses the existing authenticated Stoke session.
  • Does not expose the token in logs, process output, .git/config, or shell history.
  • Returns Git’s non-zero exit status and useful error output on failure.
  • Includes tests for destination handling and credential redaction.
## Problem `stoke repo list` discovers repositories and Stoke owns the Forgejo authentication token, but there is no `stoke repo clone` command. Users and automation must extract or indirectly wire the stored token into raw Git commands, which weakens the CLI abstraction and makes private-repository workflows harder to use safely. ## Proposed command ```sh stoke repo clone -o OWNER -r REPO [DIRECTORY] ``` Useful options could include `--branch`, `--depth`, and `--origin`. The implementation should pass credentials ephemerally to Git without printing or persisting the token in the remote URL or repository config. ## Acceptance criteria - Clones public and private repositories from the configured Forgejo instance. - Uses the existing authenticated Stoke session. - Does not expose the token in logs, process output, `.git/config`, or shell history. - Returns Git’s non-zero exit status and useful error output on failure. - Includes tests for destination handling and credential redaction.
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: heavy-duty/stoke#13
No description provided.