---
title: Initialize a pipeline
description: How to initialize and develop a dlt pipeline using CLI, workspace, or verified sources
keywords: [create a pipeline, verified source, workspace, rest client, how to, dlt init]
---
# Initialize a pipeline

This guide walks you through creating and initializing a `dlt` pipeline in dltHub Workspace—whether manually, with agentic help, or from one of the **verified sources** maintained by dltHub team.

## Overview

A `dlt` pipeline moves data from a source (like an API or database) into a destination (like DuckDB, Snowflake, or Iceberg). Initializing a pipeline is the first step in the data workflow.
You can create one in two CLI-based ways:

| Method          | Command                                                | Best for                                                       |
| --------------- | ------------------------------------------------------ | -------------------------------------------------------------- |
| Manual          | `dlthub pipeline init <source> <destination>`          | Developers who prefer manual setup                             |
| Verified source | `dlthub pipeline init <verified_source> <destination>` | Prebuilt, tested connectors from the community and dltHub team |

Outside of a workspace (plain OSS `dlt`), the same scaffold is reachable as `dlt init <source> <destination>`. Inside a dltHub workspace, `dlthub pipeline init` is the canonical entry point—it adds the pipeline to the current workspace.

## Step 0: Install dlt with workspace support

Before you start, make sure you followed the [installation instructions](../getting-started/installation.md) and have a dltHub workspace initialized. The fastest way is:

```cli
uvx dlthub-init@latest
```

This scaffolds a workspace with `.dlt/.workspace` already set, the AI toolkits vendored, and `dlt[hub]` synced. See the [installation guide](../getting-started/installation.md) for the alternative paths (adding to an existing project, or enabling workspace mode by hand).

**dltHub Workspace** is a unified environment for developing, running, and maintaining data pipelines—from local development to production.

[More about dlt Workspace](../getting-started/installation.md#what-is-a-dlthub-workspace)

## Step 1: Initialize a custom pipeline

### Manual setup (standard workflow)

A lightweight, code-first approach ideal for developers comfortable with Python.

```cli
dlthub pipeline init <source> duckdb
````

for example:

```cli
dlthub pipeline init my_github_pipeline duckdb
```

It scaffolds the pipeline template—a minimal starter project with a single Python script that shows three quick ways to load data into DuckDB using dlt:

- fetch JSON from a public REST API (chess.com as an example) with requests,
- read a public CSV with pandas, and
- pull rows from a SQL database via SQLAlchemy.

The file also includes an optional GitHub REST client example (a `@dlt.resource` + `@dlt.source`) that can use a token from `.dlt/secrets.toml`, but will work unauthenticated at low rate limits.
It’s meant as a hands-on playground you can immediately run and then adapt into a real pipeline.

Learn how to build you own dlt pipeline with [dlt Fundamentals course.](https://dlthub.learnworlds.com/course/dlt-fundamentals)

### Agentic setup

A collaborative AI-human workflow that integrates `dlt` with AI editors and agents like:

- **Claude**
- **Cursor**
- **Codex**
- [the full list](./rest-api-source.md#setup)

Start with the [`/find-source` skill](./rest-api-source.md#find-source--discover-your-data-source) to describe your data source in natural language—the assistant identifies a verified source or researches the API, then chains into pipeline scaffolding.

[Read more about running a pipeline](../../walkthroughs/run-a-pipeline)

## Update verified source

`dlthub pipeline init` copies the code of a verified source into your workspace. `dlthub pipeline init --list-sources` shows the core sources and the verified sources. Verified sources with a version come first. `dlthub ai status` and `dlthub local info` list the verified sources in your workspace.

To see which verified sources in your workspace have a newer version:

```cli
dlthub pipeline update -l
```

```text
jira: 2.0.0 -> 2.1.0 (update available)
pipedrive: a1b2c3d (2026-03-01) (up to date)
```

A source with a version has an update only when the newest version is different. Sources without a version show the commit of the verified sources repository they were copied from. To update verified source to the newest version:

```cli
dlthub pipeline update jira
```

The command updates only the files of the source. Your config, secrets and pipeline scripts do not change. The command prints the dependencies of the newest version.

dlt detects your modifications to the source files and tries to merge them with the newest version. Files that the newest version does not have are deleted. Files that you added stay.

If dlt cannot merge your modifications, the command asks what to do with the conflicting files. Without a prompt, for example in an agent session, you choose with `--on-conflict`:

- `keep-current` (the default): the conflicting files stay as they are and all other files are updated. The command shows the folder with the newest version, so you can merge the incoming changes yourself. The next update does not report these files again.
- `keep-incoming`: the conflicting files are replaced with the newest version and your modifications are lost.
- `skip`: no files change and the command fails.

```cli
dlthub pipeline update jira --on-conflict keep-incoming
```

To overwrite all files of the source and drop your modifications, add `--reinstall`:

```cli
dlthub pipeline update jira --reinstall
```

`dlthub pipeline init` does not add a verified source that is already in your workspace. To add the source again, delete its folder.

## Next steps: Deploy and scale

Once your pipeline runs locally:

* [Monitor via the workspace dashboard](../../general-usage/dataset-access/data-quality-dashboard)
* Set up [Profiles](../pipeline-operations/profiles.md) to manage separate dev, prod, and test environments
* [Deploy to runtime](../pipeline-operations/deployments.md)
