Appearance
ts import
Copy a repository from an upstream Turbo server into this one, and follow the copies in progress. The copy runs on the server, so the command returns as soon as the work is queued.
Usage
text
ts imports [--active] [-n N] [--csv] [--no-trunc]
ts import <namespace/name> --source=<domain> [--tag=TAG] [--max-history=N]
ts import sources
ts import cancel <id> [--force]Description
ts import sources lists the upstream servers this server is configured to pull from, by domain. A source has to exist before anything can be imported from it; sources are the federation sources configured in the Administration site under Hub → Federation.
ts import <namespace/name> --source=<domain> queues the copy and returns immediately with a run id. Nothing is downloaded while you wait — the server does the work in the background, which is what makes importing a large repository safe to start from a script or over a slow connection. --source takes a source's domain, in any case, or its id.
By default only the newest revision is copied. --max-history copies more of the history, and --tag restricts the copy to one release tag.
ts imports lists recent runs, newest first, with their progress and who started them; --active lists only the runs still queued or running. For a run that failed, the reason the server recorded follows the table.
ts import cancel <id> drops a run that has not started yet. Once the server has begun copying, a run can no longer be canceled and the command says so rather than appearing to succeed.
Starting and canceling an import are both recorded in the audit log.
Options
| Flag | Description | Default/Values | Notes |
|---|---|---|---|
--source | Upstream server to copy from. | Domain or source id | Required; see ts import sources. |
--tag | Copy only this release tag. | Default copies all tags on the revisions selected. | |
--max-history | How many revisions of history to copy. | Default 1; 1 to 999 | 1 is the newest revision only. |
--force, -f | Cancel without confirming. | Applies to cancel. Required when there is no terminal. | |
--active | List only runs still queued or running. | ts imports only. | |
--number, -n | How many recent runs to list. | Default 30; 1 to 200 | ts imports only; --active lists every active run. |
--csv | Tab-separated output, nothing truncated. | ts imports only. | |
--no-trunc | Do not truncate columns. | ts imports only. |
Examples
bash
# What can we pull from?
ts import sources
# Newest revision only
ts import turbo/git --source=https://hub.turbo.net
# A specific release, with more history
ts import turbo/git --source=https://hub.turbo.net --tag=2.44 --max-history=10
# Start several, then watch them
ts import turbo/git --source=https://hub.turbo.net
ts import turbo/python --source=https://hub.turbo.net
ts imports --active
# Change your mind before it starts
ts import cancel 0c5e2a9d-7b14-4f63-a8e1-3d6f9b2c4a70 --forceOutput
text
Queued import of turbo/git from https://hub.turbo.net (run 0c5e2a9d-7b14-4f63-a8e1-3d6f9b2c4a70). Watch it with 'ts imports --active'.ts imports shows progress and, for a run that failed, the reason the server recorded:
text
ID REPOSITORY TAG STATUS PROGRESS STARTED BY QUEUED
0c5e2a9d-7b14-4f63-a8e1-3d6f9b2c4a70 turbo/git - Running 3/10 rev, 41% alice 2026-07-30T00:58:53.0000000Z
5b8f1e36-2d90-4c7a-b4e5-9a1c0d7f3e28 turbo/py - Error 0/1 rev alice 2026-07-29T22:10:02.0000000Z
turbo/py: Repository 'turbo/py' was not found on 'https://hub.turbo.net'.Exit Codes
0 on success, including when a run is queued but later fails — the queueing succeeded. -1 when --source is missing or names no configured source, when --max-history or --number is out of range, and when the run can no longer be canceled. -4 when no account is signed in. -5 when the account is not a Server Administrator. -6 when cancel names a run that does not exist.
Related Commands
- ts repo — Inspect or remove the repositories an import produces.
