---
title: "Link an existing workflow"
description: "Continue working on a workflow after cloning its repository, or choose a different workflow to publish to."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://tilebox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Link an existing workflow

Linking connects a local project to an existing workflow in Tilebox. Once linked, you can publish new releases from that project without specifying the workflow each time.

New projects created with `tilebox workflow init`, including templates, are linked automatically when you first publish. You only need to link manually when you want to work on a workflow that already exists.

## Continue working after cloning a repository

After cloning a workflow repository, run this from the project directory. Replace `<workflow-reference>` with the workflow you want to publish to:

```bash
tilebox workflow link <workflow-reference>
```

If you need to find the reference, use `tilebox workflow list`.

You can now edit the code and publish your changes to that workflow:

```bash
tilebox workflow publish-release
```

The link belongs to your local copy of the repository, so teammates can choose their own workflow. The same step works when setting up a CI job or a coding agent in a fresh checkout.

When submitting jobs, add `--workflow .` to use the linked workflow. See [Run and inspect a job](/docs/guides/workflows/build-and-deploy-workflow#run-and-inspect-a-job) for a complete example.

## Publish to a different workflow

To point an already-linked project at another existing workflow, use `--replace`:

```bash
tilebox workflow link <other-workflow-reference> --replace
```

Future publications go to the new workflow. Changing the link does not publish your code or move existing releases.

If you want to start a new workflow based on someone else's code, [start from a template](/docs/guides/workflows/build-and-deploy-workflow#start-from-a-template) instead. Your copy will get its own workflow when you publish it.

Source: https://tilebox.com/docs/workflows/build-and-deploy/linking/index.mdx
