---
slug: /user/quickstart/292861/download
hide_table_of_contents: true
title: "Export function outputs"
---

# Quickstart

## Export function outputs

The `dagger download` command allows you to retrieve file, directory and container outputs from functions and write them to the host filesystem.

To see it in action, use `dagger download` with the `build` function used previously, to export the built application to an `out` directory on the host:

```shell
dagger download --output ./out build
```

Here's an example of the output:

```shell
✔ dagger download build [31.79s]
┃ Asset exported to "./out"
$ ls out/
asset-manifest.json  index.html   logo512.png    robots.txt
favicon.ico          logo192.png  manifest.json  static
```

The `dagger download` command also works with functions that return `Container` types, in which case the `Container` is exported as a TAR file to the host file system. Here's an example:

```shell
dagger download --output ./container.tar app-container
```

:::tip
Here are a few examples of using this command with modules from the [Daggerverse](https://daggerverse.dev/):

- `dagger -m github.com/kpenfound/dagger-modules/golang download build-remote --remote github.com/dagger/dagger --ref main --module "./cmd/dagger" --platform darwin`
   - Module information: https://daggerverse.dev/mod/github.com/kpenfound/dagger-modules/golang@683e3a5859438a85fdc39462d6f6439fea30e804
- `wget -q https://download.samplelib.com/mp4/sample-5s.mp4  && wget -q https://download.samplelib.com/mp4/sample-10s.mp4 && dagger download -m github.com/marcosnils/daggerverse/videostitch@main stitch --src-dir .`
   - Module information: https://daggerverse.dev/mod/github.com/marcosnils/daggerverse/videostitch@b86b76dcfc25fac08b96ead67479fb055f718df7
:::
