---
title: What is a workspace
description: A dltHub workspace is one data project kept as code. It bundles pipelines, datasets, transformations, agents, jobs and profiles, runs on your machine, and deploys to the dltHub platform in one or more environments.
keywords: [workspace, dlthub, local workspace, remote workspace, workspace deployment, environments, profiles, deployment]
---
# What is a workspace?

A **workspace** is one data project kept as code, together with its configuration and profiles. It bundles everything that the project is made of:

| Entity                                                                                 | What it does                                                                              |
| -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [Pipelines](../../general-usage/pipeline.md)                                           | load data from sources into a destination                                                 |
| [Datasets](../data-discovery/datasets.md) and [schemas](../../general-usage/schema.md) | the data that the pipelines write, and the description of its tables                      |
| [Transformations](../transformations/index.md)                                         | model the loaded data                                                                     |
| [Data quality](../data-quality/index.md) checks and metrics                            | validate the data and track it over time                                                  |
| [Notebooks and data apps](../data-apps/build-marimo-notebook.md)                       | read the data                                                                             |
| [Agents](../agents/index.md)                                                           | run unattended, for example to diagnose a failed job run                                  |
| [Jobs](deployments.md)                                                                 | run any of the above on a [schedule or after another job](triggers.md)                    |
| [Profiles](profiles.md)                                                                | hold the credentials and settings that the code runs with, and control access to the data |

On your machine, the workspace is a Python project, typically a git repository: the **local workspace**. Here you write and run the code with local profiles, which never leave your machine.

On the dltHub platform, it is a **remote workspace**. Connecting creates a trusted link from the local workspace to the platform. The remote workspace mirrors the local one: the same code and configuration, prepared to run.

You deploy the local workspace to an **environment**, `prod` by default. That creates a **workspace deployment**: the code with the remote profiles of that environment, the jobs, and their runs and logs, shown to the people that you invite. Each environment has a workspace deployment of its own, so production and staging never share jobs, job runs or credentials. The remote workspace holds all of them, in one **organization**.

```mermaid
flowchart LR
  LW["local workspace"]
  subgraph RW["remote workspace"]
    P["prod"]
    S["staging"]
  end
  LW -->|deploy| P
  LW -->|deploy| S
```

## The local workspace

The local workspace is a regular Python project with a `.dlt` folder. You run and test everything here first, with the local profiles `dev` and `tests`. It contains:

- **`.dlt/.workspace`**: the file that turns on the `dlthub` CLI and declares the [profiles and environments](profiles.md). Without this file you are using plain OSS `dlt`.
- **`.dlt/config.toml`** and **`.dlt/secrets.toml`**: the settings and credentials of every profile. A profile adds [settings files](profiles.md#settings-files) of its own.
- **`pyproject.toml`** (or `requirements.txt`): the dependencies, such as `dlt[hub]`, `duckdb` and `marimo`.
- **Pipeline files** and a deployment module, **`__deployment__.py`** by default: the code that you run, and the jobs that a deployment has.
- **AI toolkit configuration**: skills, rules and the MCP server for Claude Code, Cursor or Codex, see the [AI Harness](../ai-harness/introduction.md).

## The remote workspace and its deployments

When you [connect the local workspace](workspace-setup.md#3-connect-to-a-remote-workspace), the dltHub platform creates its counterpart in your organization. From then on, each environment that you deploy to has one workspace deployment there. A workspace deployment holds:

- the code and the settings files of the remote profiles of its environment, [versioned separately](deployments.md#deployments-and-configurations-are-versioned-separately)
- the jobs with their triggers, their job runs and their logs, see [Monitoring and debugging](monitoring.md)
- the [environment variables](environment-variables.md) of its job runs
- its members, each with a [workspace role](../platform-capabilities/users-and-roles.md#workspace-roles): owner, developer or viewer

The dltHub web app lists each workspace deployment as a workspace, named after the local workspace and the environment: `ingest` for `prod` and `ingest-staging` for `staging`. Roles, API keys and variables belong to one workspace deployment.

A new workspace has one environment, `prod`, so it starts with a single workspace deployment. Add a `staging` environment when you want to review changes before they reach production, see [Create a staging environment](profiles.md#create-a-staging-environment-with-its-own-workspace-deployment).

When you create an account, dltHub also creates a personal [Playground workspace](playground-workspace.md), so you can try things without any setup.

## A workspace for a team

A workspace gives a team three things to share:

- **The repository shares the code.** Pipelines, schemas, transformations and checks live in version control. Each person works on a branch with the local profiles, which never leave their machine.
- **A workspace deployment shares the running project.** Invite a colleague as a viewer to look at job runs, logs and notebooks, or as a developer to deploy and run jobs. Nobody needs your credentials for that.
- **Profiles share the data.** Each profile gives the jobs that run with it write, read or no [data access](profiles.md#data-access). A viewer opens a notebook that runs with `access`, the profile with read data access.

CI can deploy for you with a [workspace API key](../platform-capabilities/settings.md#workspace-api-keys). The [CI/CD blueprint](../../examples/dlthub_cicd.md) deploys a pull request to `staging` and the merged code to `prod`.

## Creating a workspace

```cli
uv run dlthub login
uv run dlthub workspace connect "<name>" --create
```

When you [deploy](deployments.md), all files from your local project directory are mirrored to the workspace deployment on the dltHub platform. To exclude files you don't want deployed (temp directories, data/state directories, local IDE files), list them in `.gitignore`. Files not excluded can cause deployments to fail with:

```text
Upload failed (HTTP 413): {"status_code":413,"detail":"Request Entity Too Large"}
```

## Next steps

* [Workspace setup](workspace-setup.md): convert a Python project into a workspace, connect it and set up destinations.
* [Profiles and environments](profiles.md): control access to your data and deploy to more than one environment.
* [The Playground workspace](playground-workspace.md): the auto-created workspace for trying dltHub.
