repo:clone

Clone a hosted projection v4 repository over the network, including boundary-parent and cross-repository tag-scope identities, into a new local directory.

Reference for flywheel repo:clone.

Create a local repository from a hosted projection v4 repository, including cross-repository lineage and tag-scope identities, and persist its service/profile association. Reading a public or shared node gives no repository membership: an existing repository returns 403 repository_forbidden (CLI exit 3) without a sufficient role. Missing and retired repositories return 404 repository_not_found. To add your own node under a readable parent without joining its repository, run flywheel hosted:node:create --parent <node_id> --title 'My addition'; without a write role there, it lands in your fork.

If the server returns HTTP 426, the CLI prints http_error, with client_version_unsupported or repository_snapshot_format_unsupported in server_response.body.detail (or its type field); run flywheel update --yes and retry. If the directory's parent is a symbolic link, such as /tmp on macOS, the command refuses with repository_target_parent_symlink before contacting the server; run it again with the real path it suggests.

If a hosted request fails during the clone (the connection is refused or drops, the request times out, the answer can't be read, or HTTP 408, 429, 502, 503 or 504 is still the answer after the CLI's retries), the error keeps its code and adds step, clone_transfer (downloading the hosted repository: the clone session, its chunks and, with --objects all, its objects), and next_action, the same command as typed, with the same arguments. Clone has no --idempotency-key, so the rerun has none. A clone builds the checkout in a private staging folder and moves it into place only at the end, so a failed request leaves nothing at the directory; run next_action once the hosted service can be reached again. A hosted repository_busy answer gets a step and this next_action too, and keeps its code repository_busy.

Reading one public node does not let you clone its whole repository. First add under that node through server placement, then clone your fork.

Command Group

Local Repository

Summary

Clone a hosted projection v4 repository over the network, including boundary-parent and cross-repository tag-scope identities, into a new local directory.

Usage

flywheel repo:clone [FLAGS] <repository_id> [directory]

Arguments

ArgumentRequiredChoicesDescription
<repository_id>YesHosted repository UUID.
[directory]NoTarget repository directory.

Required flags

None.

Optional flags

FlagValueDefaultChoicesDescription
--objectsstringlazy, allObject transfer mode: lazy defers artifact bytes for repo:artifact:download; all downloads every reachable object.
--formatFORMATjson, tsv, csv, tableOutput format for command results.
--envPROFILEUse a configured CLI profile for this invocation.
--outPATHWrite output to a file path, or use - for stdout.
--openOpen browser-bound URLs when supported.
--no-retryDisable transient-error retries.
--retry-maxNMaximum transient-error retry attempts.
--waitBlock on async operations until a terminal state is reached.
--wait-timeoutSECONDS600Seconds to wait for --wait before timing out. Defaults to 600.
--allow-selfAllow mutating the currently active credential.
--timeoutSECONDSSet the per-request timeout budget in seconds.
--idempotency-keyKEYReuse an Idempotency-Key so ambiguous write failures can be retried with the same key.
--forceForce safety-gated operations where supported.
--yesSkip confirmation prompts for destructive operations.
--debugPrint structured request debugging with secrets masked.
--verbosePrint verbose progress for long-running operations.
-h, --helpShow this help.

Examples

Clone a hosted projection v4 repository over the network, including boundary-parent and cross-repository tag-scope identities, into a new local directory.

flywheel repo:clone <repository_id> --format=json