Skip to content

Add templates API and launch wizard UI#3605

Merged
peterschmidt85 merged 13 commits intomasterfrom
launch-templates
Feb 25, 2026
Merged

Add templates API and launch wizard UI#3605
peterschmidt85 merged 13 commits intomasterfrom
launch-templates

Conversation

@peterschmidt85
Copy link
Contributor

@peterschmidt85 peterschmidt85 commented Feb 24, 2026

Summary

  • Add a server-side templates API (POST /api/project/{name}/templates/list) that loads UI templates from a configurable Git repo (DSTACK_SERVER_TEMPLATES_REPO) and serves them to the frontend.
  • Replace the old CreateDevEnvironment page with a new Launch wizard that supports all run types (dev environments, tasks, services) driven by templates. The wizard has four steps: template selection, resource/GPU pick, settings (name, IDE, env, image, repo), and YAML configuration review.
  • Add an Endpoint section on the run details page for service-type runs that shows readiness status (waiting → ready) and displays the service URL once the service and its probes are up.
  • Made GPU configuration in Resources optional.

Example templates repo: https://github.com/peterschmidt85/dstack-templates

TODO

  • When gateway: true is configured but no gateway exists, show a banner (similar to "No fleets") with a link to the gateway documentation.

Warning

Templates is an experimental feature.

peterschmidt85 and others added 13 commits February 12, 2026 10:47
Add POST /api/project/{project_name}/templates/list endpoint that serves
UI templates from an external git repo configured via DSTACK_SERVER_TEMPLATES_REPO.

Templates are YAML files under .dstack/templates/ in the repo, parsed into
typed pydantic models with a discriminated union for parameter types.
Results are cached with a 3-minute TTL using cachetools.TTLCache.

Currently returns only server-wide templates; project-specific templates
will be added in a future iteration.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match codebase pattern for version-dependent HTTPBearer status codes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Added default project
Template Choice as cards
Default spot-policy filter for offers
Fix small defects
Align backend and frontend with the updated template format:
type "template" (was "ui-template"), name (was id), description (new),
configuration (was template). Improve the launch wizard with proper
env parameter handling ($random-password detection, copy-before-proceed
validation, password input, info panel), clickable template cards with
description and type sections, and renamed routes/labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace inline description with a short label, description text, and
an Info link that opens a help panel with Cloudscape-styled external
links to dev environments, tasks, and services concept pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resources step: GPU toggle (off by default) inside OfferList header
with disabled prop to skip API/hide content when off. Generates
resources.gpu:0 when disabled, passes backends only from user filter.

Env params: respect $random-password, password input with copy-before-
proceed validation, info panel, dynamic env variable name in YAML.

Also: fix useFilters permanentFilters dep, add onChangeBackendFilter
callback, FormToggle errorText support, configuration info panel with
concept links.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename directory, component, localStorage key, translation keys,
and all references from the old dev-environment-specific naming
to the generalized Launch naming.

Co-authored-by: Cursor <cursoragent@cursor.com>
Show service readiness status with waiting states and the endpoint URL
once the service is up and probes (if configured) have passed.
Replaces the inline service URL in the General section.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Disable line wrapping in jsYaml.dump to preserve multi-line command
  formatting from templates
- Handle numeric and object resource values (e.g. gpu: 0) in addition
  to string shorthand
- Show empty placeholder for disabled offer cards

Co-authored-by: Cursor <cursoragent@cursor.com>
@peterschmidt85 peterschmidt85 marked this pull request as ready for review February 24, 2026 15:10
@olgenn olgenn self-requested a review February 25, 2026 22:10
@peterschmidt85 peterschmidt85 merged commit 80f9c39 into master Feb 25, 2026
28 checks passed
@peterschmidt85 peterschmidt85 deleted the launch-templates branch February 25, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants