temps-plugin

Featured

Build external plugins for the Temps deployment platform. Use when the user wants to create, modify, or debug a Temps plugin binary — a standalone Rust process that communicates with Temps over a Unix domain socket. Also use when the user mentions "temps plugin", "external plugin", "plugin binary", "plugin for temps", "plugin UI", or asks about plugin architecture, plugin events, plugin manifest, or plugin SDK. Covers the full lifecycle: project scaffolding, manifest, router, events, SQLite persistence, embedded React UI, build.rs, testing, and deployment into the plugins directory.

DevOps & Infrastructure 655 stars 46 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 92/100

Stars 20%
94
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Temps Plugin Development Build external plugins as standalone Rust binaries that Temps discovers, spawns, and proxies to. ## Architecture Overview ``` Temps (main process) ├── Scans ~/.temps/plugins/ for binaries ├── Spawns each binary with --socket-path, --auth-secret, --data-dir ├── Reads JSON manifest from stdout (handshake phase 1) ├── Reads ready signal from stdout (handshake phase 2) ├── Opens WebSocket to plugin's /_temps/channel (bidirectional data access) ├── Proxies /api/x/{plugin_name}/* → Unix socket ├── Serves plugin UI at /api/x/{plugin_name}/ui/* └── Delivers platform events over the WebSocket channel ``` Plugins are **self-contained binaries**. They own their own HTTP routes (axum Router), optional React UI (embedded via `include_dir`), and SQLite database (via sea-orm in their `data_dir`). ## Critical Rules ### NEVER - Register a `/health` route — the SDK runtime already provides one. Axum panics on `Router::merge` with duplicate routes. - Use `rt.block_on()` directly inside `router()` — it deadlocks. Use `tokio::task::block_in_place(|| Handle::current().block_on(...))` instead. - Use `#[tokio::main]` — the SDK creates its own runtime via `run_plugin()`. - Access the Temps database directly — use `ctx.temps()` for platform data queries over the WebSocket channel. - Use `sea-orm` with the main Temps database — plugins get their own SQLite in `data_dir`. - Return `anyhow::Result` — use typed error enums with `thiserror`. - Use `.unwrap()...

Details

Author
gotempsh
Repository
gotempsh/temps
Created
10 months ago
Last Updated
today
Language
Rust
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

DevOps & Infrastructure Featured

temps

Manage, deploy, operate, and instrument applications with Temps. Use this skill whenever the user mentions Temps, `@temps-sdk/cli@0.1.34`, deploying or migrating an app to Temps, projects, environments, services, domains, backups, logs, monitoring, analytics, browser Performance Insights/Core Web Vitals, observability, error tracking, OpenTelemetry, tracing, session replay, or Temps Cloud. Also use it when preparing an application for production on Temps even if the user does not explicitly ask for the CLI. Route to focused references, proactively detect missing observability during create/link/deploy journeys, and use pinned `bunx` or `npx` CLI invocations with explicit target contexts.

655 Updated today
gotempsh
DevOps & Infrastructure Featured

temps-best-practices

Best-practices reference for preparing and instrumenting applications on Temps. Covers the app runtime contract (`.temps.yaml` health, HOST/PORT, readiness, SIGTERM, replicas, migrations) and production observability (errors, traces, metrics, logs, analytics, privacy, sampling, cardinality, credential boundaries). Use whenever building or reviewing an app for Temps, configuring health checks, adding telemetry, diagnosing missing/noisy signals, or checking OTLP/Sentry/analytics ingestion. Triggers include "temps best practices", "prepare this app for Temps", ".temps.yaml health", "temps health check", "ignore health checks in otel", "temps observability", "wire up telemetry", and "instrument this app for temps". Prefer focused setup skills for a single SDK. Use temps-cli for executing deploy and resource-management commands.

655 Updated today
gotempsh
DevOps & Infrastructure Featured

start-temps

Start (or restart) a local Temps control plane built from this checkout, and the web dev server (`bun dev`) in `<checkout>/web`. Invoke when the user says "start temps", "restart temps", "launch the server", "kill and restart temps", or asks to bring the local server up after backend changes. Ports, database and data dir are allocated PER CHECKOUT (a "slot") so several worktrees/branches run side by side without killing each other or corrupting each other's schema — the first checkout you start in claims slot 0 (the familiar `:8080` / `:3000`); every other worktree gets its own slot and its own `temps_s<N>` database. Uses the `fast` cargo profile (release semantics, no debug symbols, parallel codegen) for quick rebuilds. Pass `split` (e.g. "start temps split", "/start-temps split") to launch the two-process proxy/console topology for testing that feature.

655 Updated today
gotempsh