> For the complete documentation index, see [llms.txt](https://docs.duplicati.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplicati.com/duplicati-programs/command-line-interface-cli-1/sourcetool.md).

# SourceTool

This page describes the SourceTool for inspecting remote sources

The SourceTool lists or downloads the files that a remote source exposes. It is useful for checking that a remote source URL works, and for seeing what Duplicati would back up from it, before using it in a backup.

The SourceTool is called `Duplicati.CommandLine.SourceTool.exe` on Windows and `duplicati-source-tool` on Linux and MacOS.

The URL can be any source provider, such as the [Microsoft 365](https://docs.duplicati.com/automation-and-integration/office-365-backup-and-restore.md) or [Google Workspace](https://docs.duplicati.com/automation-and-integration/google-workspace-backup-and-restore.md) sources, or a [destination](https://docs.duplicati.com/backup-destinations/destination-overview.md) that supports browsing folders. In 2.4 these are the File, SSH, SMB, S3, IDrive e2, Box, Dropbox, Google Drive, and Microsoft Graph based (OneDrive, SharePoint, Microsoft Group) destinations.

## List

To list the files and folders of a remote source, run:

```
duplicati-source-tool list <url>
```

By default the whole tree is listed. Use `--max-depth=<n>` to limit how many folder levels are visited; `0` means no limit.

## Download

To download the files of a remote source to a local folder, run:

```
duplicati-source-tool download <url> --destination=<local folder>
```

If `--destination` is not given, the files are downloaded to the current folder. The options are:

* `--max-depth`: The number of folder levels to visit. `0` (the default) means no limit.
* `--max-size`: Skip files larger than this size in bytes. `0` (the default) means no limit.
* `--overwrite`: Overwrite files that already exist in the destination folder.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.duplicati.com/duplicati-programs/command-line-interface-cli-1/sourcetool.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
