diff --git a/ct/slidev.sh b/ct/slidev.sh new file mode 100644 index 0000000000..0044a8e91e --- /dev/null +++ b/ct/slidev.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# Engine comes from community-scripts/core; this repo only ships the scripts. +# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core), +# so a fork or branch of core can be tested without editing this file. +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/shared/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/shared/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Filan-glitch +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://sli.dev/ + +APP="Slidev" +var_tags="${var_tags:-presentation;markdown}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /home/slidev/my-slides ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Stopping ${APP}" + systemctl stop slidev + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP}" + su - slidev -c "cd my-slides && npm install" /etc/systemd/system/slidev.service +[Unit] +Description=Slidev Presentation Server +After=network.target + +[Service] +Type=simple +User=slidev +WorkingDirectory=/home/slidev/my-slides +ExecStart=/usr/bin/npm run dev -- --remote --port 3030 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now slidev +msg_ok "Created service" + +msg_info "Installing Slidev MCP server helper" +su - slidev -c "cd my-slides && npm install -D @slidev/cli@latest" /home/slidev/mcp-start.sh +#!/usr/bin/env bash +cd /home/slidev/my-slides +exec npx slidev mcp --entry slides.md +EOF +chmod +x /home/slidev/mcp-start.sh +chown slidev:slidev /home/slidev/mcp-start.sh +msg_ok "Installed Slidev MCP server helper" + +motd_ssh +customize + +if [[ -n "$SLIDEV_SSH_PASS" ]]; then + msg_ok "SSH login for slidev user: slidev / ${SLIDEV_SSH_PASS}" +else + msg_ok "SSH login for slidev user: key-based (root's authorized_keys)" +fi +cleanup_lxc diff --git a/json/slidev.json b/json/slidev.json new file mode 100644 index 0000000000..53ea945a7d --- /dev/null +++ b/json/slidev.json @@ -0,0 +1,44 @@ +{ + "name": "Slidev", + "slug": "slidev", + "categories": [12], + "date_created": "2026-08-10", + "type": "ct", + "updateable": true, + "privileged": false, + "architectures": ["amd64"], + "interface_port": 3030, + "documentation": "https://sli.dev/", + "website": "https://sli.dev/", + "repository": "https://github.com/slidevjs/slidev", + "logo": "https://sli.dev/favicon.png", + "description": "Slidev is a markdown-based slide deck maker and presenter, built for developers. Self-hosted instance runs a live dev server with hot reload, plus an MCP server entrypoint so AI agents (Claude Code/Desktop) can edit slides directly.", + "install_methods": [ + { + "type": "default", + "script": "ct/slidev.sh", + "config_path": "/home/slidev/my-slides/slides.md", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": "slidev", + "password": null + }, + "notes": [ + { + "text": "Dev server binds 0.0.0.0:3030, no auth built in — restrict to LAN/firewall.", + "type": "warning" + }, + { + "text": "MCP server entrypoint at /home/slidev/mcp-start.sh, invoke over SSH from client-side Claude Code config.", + "type": "info" + } + ] +}