Skip to main content

Run the web UI

The web UI lets you browse, edit, and publish prompts in the browser. You can read every version of a prompt, check the semantic impact of an edit before you publish it, and branch, promote, and roll back.

It's a SvelteKit app. Browsers can't speak gRPC, so the app's server side calls Priompt over gRPC and sends the page plain JSON. Your token stays on that server and never reaches the browser.

Run it​

You need Node 20+, pnpm, and a running Priompt server, v0.7.4 or later (see Quick start). The Branches tab needs the branch and commit listing that v0.7.4 added.

git clone https://github.com/priompt/ui.git && cd ui
pnpm install
echo "PRIOMPT_URL=priompt://localhost:8443" > .env
pnpm dev # http://127.0.0.1:5173

If the server has auth on, put the token in the URL: PRIOMPT_URL=priompt://<token>@localhost:8443.

Sample data

With no PRIOMPT_URL or PRIOMPT_HOST set, the UI runs on built-in sample data and shows an amber banner at the top. Set the variable and restart pnpm dev.

Configuration​

The UI reads these from .env or the environment:

VariableDefaultPurpose
PRIOMPT_URLnonepriompt://[token@]host:port. Sets the host and token unless they're set separately.
PRIOMPT_HOSTnoneServer address. Wins over the host in PRIOMPT_URL.
PRIOMPT_TOKENemptyBearer token. Wins over the token in PRIOMPT_URL.
PRIOMPT_TLSfalsetrue connects over TLS.
PRIOMPT_ORGemptyThe org to list when the token is org-scoped.
PRIOMPT_NATS_URLnoneNATS broker, for example nats://127.0.0.1:4222. Turns on the Live badge, which refreshes an open prompt when someone changes it.

Add sample prompts​

On a fresh server there's only the demo prompt. To get several prompts with history, run the seed script from a clone of the server repo:

sh priompt/seed-dev.sh localhost:8443

It publishes about seven prompts under acme, some with several versions. Commits made from the CLI have no message. Commits you make in the UI do.

What you can do​

TaskWhere
Browse orgs and folders/, then an org
Read a prompt and its slotsOpen a .prompt file
Check an edit's impact, then publish itEdit → Check impact → Commit changes
Create a promptNew prompt in an org
See a prompt's history and each diffHistory on a prompt, then a commit
Branch, merge, promote, and roll backBranches tab, then pick a prompt
Compare two branchesCompare on a branch row, or on a prompt shown on another branch
Search paths and contentThe navbar search box inside an org
Check the server connectionOrg Settings → Connection

Limitations​

  • Some controls are placeholders that do nothing yet: the account menu, pull requests, inbox, upload, the Ctrl+K dialog on the home page, /settings, /init, and everything below Connection on an org's settings page.