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.
Install and sign in
npm install -g @displaydev/cli
dsp logindsp 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
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:
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.
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.
Update the artifact
Get the artifact's current version, then publish the new file at the same URL:
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 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.
To publish from a build pipeline, use an API key instead of dsp login. See Publish from CI/CD.
See CLI commands for every command and flag.