---
title: Publish from your terminal
description: Install the Display.dev CLI, sign in, and publish an HTML or Markdown file.
slug: /docs/publish-from-terminal
group: publish
updatedAt: 2026-10-05
---

Publish an HTML or Markdown file from your terminal with `dsp`, the Display.dev command-line tool (CLI). Use this path when you run the commands yourself. To have your AI tool publish for you, see [Publish with your agent](/docs/publish-with-agent).

## Install and sign in

```bash
npm install -g @displaydev/cli
dsp login
```

`dsp login` asks for your email address and sends a one-time password (OTP) to it. Enter the 6-digit code to finish. If your organization requires single sign-on, the command opens your browser instead.

## Publish a file

```bash
dsp publish <file> --name "Project update"
```

Replace `<file>` with your file's path. The CLI prints the artifact's URL. Open it in your browser and sign in if asked.

The artifact starts as Private. Only you can open it until you invite someone or change who can open it.

## Choose who can open it

Set the audience when you publish:

```bash
dsp publish <file> --name "Project update" --visibility company
```

- `--visibility private` – only you and the people you invite. This is the default.
- `--visibility company` – members of your organization, after they sign in.
- `--visibility public` – anyone with the link, with no sign-in.
- `--share <email>` – invite one person. Repeat the flag to invite more.

To change the audience later, run `dsp share <shortId> --visibility company`, or see [Sharing and access](/docs/visibility).

Organization policy can reject Public publishing or new outside recipients. In
that case, choose Company or Private, remove outside recipients, or ask an
Owner to change the setting in Organization Security. The CLI does not expose
commands for changing those controls. See
[Organization artifact access](/docs/artifact-access).

## Update the artifact

Get the artifact's current version, then publish the new file at the same URL:

```bash
dsp get-metadata <shortId>
dsp publish <file> --id <shortId> --base-version <currentVersion>
```

`--base-version` prevents you from overwriting a newer update. See [Update an artifact](/docs/update-artifact) for exact-text edits and version conflicts.

## Publish without signing in

If you have not run `dsp login`, `dsp publish` creates a public preview and prints a single-use claim link. See [Publish without an account](/docs/claimable).

To publish from a build pipeline, use an API key instead of `dsp login`. See [Publish from CI/CD](/docs/ci-cd).

See [CLI commands](/docs/cli-reference) for every command and flag.
