# spin cp

**Spinbox is experimental: APIs change and data may be lost.** What is built and what proves it is on [Status](https://spin-stack.github.io/website/reference/status.md); what Spinbox does not do is on [Limitations](https://spin-stack.github.io/website/overview/limitations.md).

> spin cp: Copy files to or from a workspace.

<!-- Generated by tools/refgen from spin:cmd/cli. Edit the source, not this file. -->

```
Copy files and directories, recursively, between this machine and a workspace.

One of the two is <workspace>:<path>, a path in the workspace (relative to the user's
home); the other is a path here. The copy is SFTP over the same brokered connection as
'spin ssh', with the same key.

Examples:
  spin cp ./dist my-workspace:/srv/app/
  spin cp my-workspace:build.log .

Usage:
  spin cp <from> <to> [flags]

Flags:
  -h, --help               help for cp
  -i, --identity string    Identity file (private key)
      --start              Start the workspace first if it is stopped
      --timeout duration   How long to wait for the workspace to be running; by default, until the control plane gives up on it
  -u, --user string        User to copy as (default "root")

Global Flags:
      --config string    config file (default is $HOME/.spin/config.yaml)
  -o, --output string    text for a person, or json: one document of what the API answered, and no prose (default "text")
      --profile string   named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
```
