Merge pull request #40 from db9979/claude/project-thread-kjzcad

Paketquellen (Homebrew, apt, winget) und Webseite auf GitHub Pages
This commit is contained in:
db9979 authored and GitHub committed 2026-11-06 07:35:40 +01:00
commit bf533eaa27
45 files changed
+1322 -46

No files matched your search

+7
View File
@@ -18,3 +18,10 @@ jobs:
for t in windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64; do
CGO_ENABLED=0 GOOS=${t%/*} GOARCH=${t#*/} go build -o /dev/null ./cmd/sshtermy
done
packaging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y -qq apt-utils python3-yaml >/dev/null
- run: packaging/check.sh
+64
View File
@@ -0,0 +1,64 @@
# Webseite (site/, Englisch + Deutsch) und apt-Paketquelle auf GitHub Pages:
# https://db9979.github.io/sshtermy/ Anleitung
# https://db9979.github.io/sshtermy/apt/ apt-Quelle (.deb aus dem neuesten Release)
# Läuft nach jedem Release und bei Änderungen an der Webseite.
# Einmalig nötig: Settings → Pages → Source „GitHub Actions“.
name: pages
on:
push:
branches: [main]
paths: ["site/**", "docs/bilder/**", "packaging/apt-repo.sh", ".github/workflows/pages.yml"]
workflow_run:
workflows: [release]
types: [completed]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Webseite zusammenstellen
run: |
mkdir -p _site
cp -r site/. _site/
mkdir -p _site/bilder && cp docs/bilder/*.png _site/bilder/
- name: apt-Quelle aus dem neuesten Release
env:
GH_TOKEN: ${{ github.token }}
APT_GPG_PRIVATE_KEY: ${{ secrets.APT_GPG_PRIVATE_KEY }}
run: |
mkdir -p _site/apt
gh release download --repo "$GITHUB_REPOSITORY" --pattern '*.deb' --dir _site/apt || echo "noch kein Release mit .deb"
sudo apt-get install -y -qq apt-utils >/dev/null
packaging/apt-repo.sh _site/apt
ls -la _site/apt
- uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.d.outputs.page_url }}
steps:
- id: d
uses: actions/deploy-pages@v4
+28 -2
View File
@@ -1,12 +1,14 @@
# Bei jedem Push auf main: testen, Version hochzählen (MAJOR.MINOR aus VERSION,
# PATCH = Anzahl Commits), für alle Plattformen bauen, signieren und als
# GitHub Release veröffentlichen. Die App findet das Release per Auto-Update.
# Dazu: .deb-Pakete (apt-Quelle baut pages.yml) und die Homebrew-Formel
# (Formula/sshtermy.rb, dieses Repo ist der Tap). winget: winget.yml.
name: release
on:
push:
branches: [main]
paths-ignore: ["docs/**", "**.md"]
paths-ignore: ["docs/**", "site/**", "Formula/**", "**.md"]
workflow_dispatch:
permissions:
@@ -59,6 +61,13 @@ jobs:
done
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
- name: Debian-Pakete (amd64, arm64)
run: |
for a in amd64 arm64; do
packaging/deb.sh ${{ steps.v.outputs.version }} $a dist/sshtermy_linux_$a dist
done
cd dist && sha256sum sshtermy_* > checksums.txt && cat checksums.txt
- name: Signieren (Ed25519)
env:
UPDATE_SIGNING_KEY: ${{ secrets.UPDATE_SIGNING_KEY }}
@@ -70,7 +79,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
V=${{ steps.v.outputs.version }}
gh release create "v$V" dist/* --title "sshTermy v$V" --notes-file notes.md --latest
gh release create "v$V" dist/sshtermy_* dist/checksums.txt* --title "sshTermy v$V" --notes-file notes.md --latest
- name: Alte Releases aufräumen (die letzten 10 bleiben)
env:
@@ -79,3 +88,20 @@ jobs:
gh release list --limit 100 --json tagName --jq '.[10:][].tagName' | while read -r tag; do
gh release delete "$tag" --yes --cleanup-tag || true
done
- name: Homebrew-Formel aktualisieren (Formula/sshtermy.rb in main)
continue-on-error: true # z. B. Branch-Schutz: Release ist trotzdem draußen
run: |
V=${{ steps.v.outputs.version }}
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
for i in 1 2 3 4; do
git fetch -q origin main && git checkout -q -f -B formula origin/main
mkdir -p Formula && packaging/formula.sh "$V" dist/checksums.txt > Formula/sshtermy.rb
git add Formula/sshtermy.rb
git diff --cached --quiet && exit 0
git commit -q -m "Homebrew-Formel für v$V"
git push -q origin HEAD:main && exit 0
sleep $((i * 3))
done
exit 1
+36
View File
@@ -0,0 +1,36 @@
# Neueste Version bei winget einreichen (Pull Request an microsoft/winget-pkgs).
# Von Hand starten (Actions → winget → Run workflow), nicht bei jedem Release:
# jede Einreichung prüfen dort Menschen, tägliche PRs wären zu viel.
# Einmalig nötig: Secret WINGET_TOKEN = klassischer GitHub-Token mit „public_repo“
# (wingetcreate legt damit einen Fork von winget-pkgs im eigenen Konto an).
name: winget
on:
workflow_dispatch:
permissions:
contents: read
jobs:
submit:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Manifeste für das neueste Release schreiben
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName --jq .tagName)
gh release download "$tag" --repo "$GITHUB_REPOSITORY" --pattern checksums.txt --dir rel
packaging/winget.sh "${tag#v}" rel/checksums.txt out
echo "DIR=$(cygpath -w "$(ls -d out/manifests/d/db9979/sshTermy/*)")" >> "$GITHUB_ENV"
- name: Einreichen
env:
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
run: |
if (-not $env:WINGET_TOKEN) { throw "Secret WINGET_TOKEN fehlt (siehe Kommentar oben in winget.yml)" }
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe submit --token $env:WINGET_TOKEN $env:DIR
+1
View File
@@ -4,3 +4,4 @@
*.old
*.new
.DS_Store
tools/dev/gifs/out/
+15 -1
View File
@@ -72,7 +72,21 @@ Das Bedienkonzept der KI (Vorschläge, Ziel-Modus, feste Gefahrenregeln) stammt
## Installation
Lade die passende Datei aus den [Releases](https://github.com/db9979/sshtermy/releases/latest):
📖 Anleitung mit Animationen: **https://db9979.github.io/sshtermy/de/**
**Paketquellen** (die kümmern sich auch um Updates):
```
winget install db9979.sshTermy # Windows (sobald im winget-Katalog freigegeben)
brew tap db9979/sshtermy https://github.com/db9979/sshtermy # macOS und Linux
brew install sshtermy
echo "deb [trusted=yes] https://db9979.github.io/sshtermy/apt ./" | sudo tee /etc/apt/sources.list.d/sshtermy.list
sudo apt update && sudo apt install sshtermy # Debian, Ubuntu (amd64, arm64)
```
Über Homebrew oder apt installiert, tauscht sshTermy sich nicht selbst aus, sondern zeigt den Update-Befehl.
Oder lade die passende Datei aus den [Releases](https://github.com/db9979/sshtermy/releases/latest):
| System | Datei |
|---|---|
+15 -1
View File
@@ -72,7 +72,21 @@ The AI interaction concept (suggestions, goal mode, fixed danger rules) comes fr
## Installation
Download the matching file from the [Releases](https://github.com/db9979/sshtermy/releases/latest):
📖 Guide with animations: **https://db9979.github.io/sshtermy/**
**Package managers** (they also take care of updates):
```
winget install db9979.sshTermy # Windows (once approved in the winget catalog)
brew tap db9979/sshtermy https://github.com/db9979/sshtermy # macOS and Linux
brew install sshtermy
echo "deb [trusted=yes] https://db9979.github.io/sshtermy/apt ./" | sudo tee /etc/apt/sources.list.d/sshtermy.list
sudo apt update && sudo apt install sshtermy # Debian, Ubuntu (amd64, arm64)
```
Installed via Homebrew or apt, sshTermy does not replace itself but shows the update command instead.
Or download the matching file from the [Releases](https://github.com/db9979/sshtermy/releases/latest):
| System | File |
|---|---|
+39 -38
View File
@@ -3,11 +3,10 @@ package i18n
// en: deutscher Text → englische Fassung. Schlüssel sind die deutschen
// Texte aus dem Code (i18n.T); fehlt ein Eintrag, bleibt der deutsche Text.
var en = map[string]string{
"\n\nj = ja · n = nein": "\n\ny = yes · n = no",
"\n\nu = jetzt aktualisieren · ": "\n\nu = update now · ",
"\nDer Inhalt (%s) rückt in %s. Es wird keine Verbindung gelöscht.": "\nIts content (%s) moves to %s. No connection is deleted.",
"\nFingerprint: ": "\nFingerprint: ",
"\nLiegt in: ": "\nLocated in: ",
"\n\nj = ja · n = nein": "\n\ny = yes · n = no",
"\nDer Inhalt (%s) rückt in %s. Es wird keine Verbindung gelöscht.": "\nIts content (%s) moves to %s. No connection is deleted.",
"\nFingerprint: ": "\nFingerprint: ",
"\nLiegt in: ": "\nLocated in: ",
" Leertaste wählen · g Ordner · a alle": " Space selects · g folder · a all",
" ⏎ oder Doppelklick belegt neu · werden mit dem Sync übernommen": " ⏎ or double-click rebinds · synced to other computers",
" %d Datei(en) nicht lesbar": " %d file(s) not readable",
@@ -15,12 +14,12 @@ var en = map[string]string{
" %d gewählt · Ordner „%s“ · Benutzer %s": " %d selected · folder „%s“ · user %s",
" %d–%d von %d": " %d–%d of %d",
" (laufende Befehle, Tunnel und Dateiübertragungen brechen ab).\n\n": " (running commands, tunnels and file transfers are aborted).\n\n",
" (von Hand)": " (manual)",
" Esc schließen": " Esc closes",
" KI-Agent": " AI agent",
" Keine SSH-Geräte gefunden. Subnetz oder Port prüfen (r).": " No SSH devices found. Check subnet or port (r).",
" Keine Treffer.": " No matches.",
" Nichts gefunden.\n Esc = Filter aufheben": " Nothing found.\n Esc = clear filter",
" (von Hand)": " (manual)",
" Esc schließen": " Esc closes",
" KI-Agent": " AI agent",
" Keine SSH-Geräte gefunden. Subnetz oder Port prüfen (r).": " No SSH devices found. Check subnet or port (r).",
" Keine Treffer.": " No matches.",
" Nichts gefunden.\n Esc = Filter aufheben": " Nothing found.\n Esc = clear filter",
" Noch keine Protokolle.\n Jede SSH-Sitzung wird ab dem\n ersten Befehl mitgeschrieben.": " No logs yet.\n Every SSH session is recorded\n from its first command.",
" Noch keine Verbindung.\n n = neue Verbindung anlegen\n o = Ordner anlegen": " No connections yet.\n n = add a new connection\n o = add a folder",
" Port %d": " port %d",
@@ -1137,33 +1136,35 @@ var en = map[string]string{
"ungültiger Name": "invalid name",
"unter dieser Adresse antwortet kein WebDAV (HTTP %d)": "no WebDAV answers at this address (HTTP %d)",
"update: HTTP %d": "update: HTTP %d",
"update: Prüfsumme stimmt nicht, Download verworfen": "update: checksum does not match, download discarded",
"update: Release enthält %s oder checksums.txt nicht": "update: release does not contain %s or checksums.txt",
"update: Signatur fehlt": "update: signature missing",
"update: Signatur ungültig, Update abgelehnt": "update: signature invalid, update rejected",
"update: URL nicht erlaubt: %s": "update: URL not allowed: %s",
"update: Weiterleitung nach %s abgelehnt": "update: redirect to %s rejected",
"update: eingebauter Schlüssel ungültig": "update: built-in key invalid",
"update: keine Prüfsumme für ": "update: no checksum for ",
"update: keine Schreibrechte im Programmordner: %w": "update: no write permission in the program folder: %w",
"vault: DPAPI auf diesem System nicht verfügbar": "vault: DPAPI not available on this system",
"vault: DPAPI-Entsperren fehlgeschlagen: %v": "vault: DPAPI unlock failed: %v",
"vault: DPAPI: %w": "vault: DPAPI: %w",
"vault: Datei unlesbar: %w": "vault: file unreadable: %w",
"vault: Master-Passwort braucht mindestens 8 Zeichen": "vault: master password needs at least 8 characters",
"vault: Master-Passwort falsch oder Datei verändert": "vault: wrong master password or file modified",
"vault: gesperrt": "vault: locked",
"vault: kein Entsperr-Weg verfügbar (Passwort nötig)": "vault: no way to unlock (password needed)",
"vault: unbekanntes Format %q v%d": "vault: unknown format %q v%d",
"vault: ungültige KDF-Parameter": "vault: invalid KDF parameters",
"verbinde …": "connecting …",
"verbinden": "connect",
"verbindet": "connects",
"verbindet neu": "reconnects",
"verbindet neu (⏎ / Esc)": "reconnects (⏎ / Esc)",
"verboten (HTTP 403)": "forbidden (HTTP 403)",
"verschieben": "move",
"verschlüsselt gespeichert; leer für lokale Server": "stored encrypted; empty for local servers",
"update: Prüfsumme stimmt nicht, Download verworfen": "update: checksum does not match, download discarded",
"update: Release enthält %s oder checksums.txt nicht": "update: release does not contain %s or checksums.txt",
"update: Signatur fehlt": "update: signature missing",
"über eine Paketquelle installiert, aktualisieren mit: ": "installed from a package manager, update with: ",
"Aktualisieren mit: ": "Update with: ",
"update: Signatur ungültig, Update abgelehnt": "update: signature invalid, update rejected",
"update: URL nicht erlaubt: %s": "update: URL not allowed: %s",
"update: Weiterleitung nach %s abgelehnt": "update: redirect to %s rejected",
"update: eingebauter Schlüssel ungültig": "update: built-in key invalid",
"update: keine Prüfsumme für ": "update: no checksum for ",
"update: keine Schreibrechte im Programmordner: %w": "update: no write permission in the program folder: %w",
"vault: DPAPI auf diesem System nicht verfügbar": "vault: DPAPI not available on this system",
"vault: DPAPI-Entsperren fehlgeschlagen: %v": "vault: DPAPI unlock failed: %v",
"vault: DPAPI: %w": "vault: DPAPI: %w",
"vault: Datei unlesbar: %w": "vault: file unreadable: %w",
"vault: Master-Passwort braucht mindestens 8 Zeichen": "vault: master password needs at least 8 characters",
"vault: Master-Passwort falsch oder Datei verändert": "vault: wrong master password or file modified",
"vault: gesperrt": "vault: locked",
"vault: kein Entsperr-Weg verfügbar (Passwort nötig)": "vault: no way to unlock (password needed)",
"vault: unbekanntes Format %q v%d": "vault: unknown format %q v%d",
"vault: ungültige KDF-Parameter": "vault: invalid KDF parameters",
"verbinde …": "connecting …",
"verbinden": "connect",
"verbindet": "connects",
"verbindet neu": "reconnects",
"verbindet neu (⏎ / Esc)": "reconnects (⏎ / Esc)",
"verboten (HTTP 403)": "forbidden (HTTP 403)",
"verschieben": "move",
"verschlüsselt gespeichert; leer für lokale Server": "stored encrypted; empty for local servers",
"versteckte": "hidden",
"versteckte Dateien": "hidden files",
"vertrauen": "trust",
+4 -1
View File
@@ -85,6 +85,9 @@ func (a *App) aboutModal() *modal {
i18n.T("☕ Gefällt dir sshTermy? Spendier einen Kaffee: ") + version.Coffee + "\n\n"
if a.rel != nil {
b += i18n.T("⬆ Neue Version v") + a.rel.Version + i18n.T(" verfügbar.\n") + firstLines(a.rel.Notes, 6)
if cmd := update.Managed(); cmd != "" {
b += "\n\n" + i18n.T("Aktualisieren mit: ") + cmd
}
} else if a.restartPending != "" {
b += "v" + a.restartPending + i18n.T(" ist installiert.")
}
@@ -174,7 +177,7 @@ func (a *App) modalKey(k tea.KeyPressMsg) tea.Cmd {
case mAbout:
switch key {
case "u":
if a.rel != nil {
if a.rel != nil && update.Managed() == "" {
rel := a.rel
a.modal = &modal{kind: mBusy, title: "Update", body: i18n.T("Lade v") + rel.Version + i18n.T(", prüfe Signatur und Prüfsumme …")}
return func() tea.Msg { return applyDoneMsg{update.Apply(context.Background(), rel)} }
+4 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/db9979/sshtermy/internal/domain"
"github.com/db9979/sshtermy/internal/i18n"
"github.com/db9979/sshtermy/internal/termemu"
"github.com/db9979/sshtermy/internal/update"
)
// Maus
@@ -500,8 +501,10 @@ func (a *App) modalKeys() [][2]string {
case mInput:
keys = [][2]string{{"⏎", i18n.T("übernehmen")}, {"Esc", i18n.T("abbrechen")}}
case mAbout:
if a.rel != nil {
if a.rel != nil && update.Managed() == "" {
keys = append(keys, [2]string{"u", i18n.T("aktualisieren")})
} else if a.rel != nil {
// Paketquelle: Befehl steht im Dialog, kein „u“.
} else if a.restartPending != "" {
keys = append(keys, [2]string{"r", i18n.T("neu starten")})
} else {
+42
View File
@@ -0,0 +1,42 @@
package update
import (
"os"
"runtime"
"strings"
"github.com/db9979/sshtermy/internal/i18n"
)
// Managed: Befehl zum Aktualisieren, wenn sshTermy über eine Paketquelle
// installiert wurde (Homebrew, apt). Dann tauscht sshTermy sich nicht selbst
// aus: apt hält /usr/bin schreibgeschützt, und Homebrew würde eine fremd
// ausgetauschte Datei im Cellar nicht kennen. Leer = selbst aktualisieren.
// winget (portable) bleibt beim Selbst-Update, der Ordner gehört dem Nutzer.
func Managed() string {
exe, err := Executable()
if err != nil {
return ""
}
return managedBy(exe, runtime.GOOS, fileExists)
}
func managedBy(exe, goos string, exists func(string) bool) string {
p := strings.ReplaceAll(exe, "\\", "/")
if goos != "windows" && (strings.Contains(p, "/Cellar/") || strings.HasPrefix(p, "/opt/homebrew/") || strings.HasPrefix(p, "/home/linuxbrew/")) {
return "brew upgrade sshtermy"
}
if goos == "linux" && p == "/usr/bin/sshtermy" && exists("/var/lib/dpkg/info/sshtermy.list") {
return "sudo apt update && sudo apt install --only-upgrade sshtermy"
}
return ""
}
func fileExists(p string) bool { _, err := os.Stat(p); return err == nil }
// ManagedError: Fehlermeldung für Apply bei Paketquellen-Installation.
type ManagedError struct{ Cmd string }
func (e ManagedError) Error() string {
return i18n.T("über eine Paketquelle installiert, aktualisieren mit: ") + e.Cmd
}
+26
View File
@@ -0,0 +1,26 @@
package update
import "testing"
func TestManagedBy(t *testing.T) {
yes := func(string) bool { return true }
no := func(string) bool { return false }
cases := []struct {
exe, goos string
exists func(string) bool
want string
}{
{"/opt/homebrew/Cellar/sshtermy/1.0.40/bin/sshtermy", "darwin", no, "brew upgrade sshtermy"},
{"/usr/local/Cellar/sshtermy/1.0.40/bin/sshtermy", "darwin", no, "brew upgrade sshtermy"},
{"/home/linuxbrew/.linuxbrew/Cellar/sshtermy/1.0.40/bin/sshtermy", "linux", no, "brew upgrade sshtermy"},
{"/usr/bin/sshtermy", "linux", yes, "sudo apt update && sudo apt install --only-upgrade sshtermy"},
{"/usr/bin/sshtermy", "linux", no, ""},
{"/Users/d/Applications/sshTermy.app/Contents/Resources/sshtermy", "darwin", yes, ""},
{`C:\Users\d\AppData\Local\Microsoft\WinGet\Packages\db9979.sshTermy_x\sshtermy.exe`, "windows", yes, ""},
}
for _, c := range cases {
if got := managedBy(c.exe, c.goos, c.exists); got != c.want {
t.Errorf("%s: %q, want %q", c.exe, got, c.want)
}
}
}
+3
View File
@@ -166,6 +166,9 @@ func parse(v string) ([3]int, bool) {
// Apply lädt, prüft und tauscht die laufende Datei aus.
func Apply(ctx context.Context, rel *Release) error {
if cmd := Managed(); cmd != "" {
return ManagedError{cmd}
}
name := AssetName()
binURL, ok1 := rel.assets[name]
sumURL, ok2 := rel.assets["checksums.txt"]
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
# Baut ein flaches apt-Repository aus .deb-Dateien (für GitHub Pages):
# packaging/apt-repo.sh _site/apt (die .deb liegen schon dort)
# Mit APT_GPG_PRIVATE_KEY (ASCII-armored, ohne Passphrase) wird signiert:
# InRelease, Release.gpg und der öffentliche Schlüssel sshtermy.gpg.
# Ohne Schlüssel bleibt das Repo unsigniert (Einbinden mit [trusted=yes]).
set -eu
dir="$1"
cd "$dir"
rm -f Release InRelease Release.gpg
apt-ftparchive packages . >Packages
gzip -9kf Packages
apt-ftparchive \
-o APT::FTPArchive::Release::Origin=sshTermy \
-o APT::FTPArchive::Release::Label=sshTermy \
-o APT::FTPArchive::Release::Suite=stable \
-o APT::FTPArchive::Release::Codename=stable \
-o APT::FTPArchive::Release::Description="sshTermy – SSH terminal with an AI copilot" \
release . >Release
if [ -n "${APT_GPG_PRIVATE_KEY:-}" ]; then
export GNUPGHOME="$(mktemp -d)"
printf '%s\n' "$APT_GPG_PRIVATE_KEY" | gpg --batch --import 2>/dev/null
gpg --batch --yes --pinentry-mode loopback --clearsign -o InRelease Release
gpg --batch --yes --pinentry-mode loopback -abs -o Release.gpg Release
gpg --batch --export >sshtermy.gpg
rm -rf "$GNUPGHOME"
echo "apt: signiert"
else
echo "apt: ohne Signatur (Secret APT_GPG_PRIVATE_KEY fehlt)"
fi
+56
View File
@@ -0,0 +1,56 @@
#!/bin/sh
# CI-Prüfung der Paket-Skripte mit Dummy-Dateien und der Webseite (Links,
# Bilder). Lokal: packaging/check.sh
set -eu
t="$(mktemp -d)"
trap 'rm -rf "$t"' EXIT INT TERM
mkdir -p "$t/dist"
for n in windows_arm64.exe windows_386.exe windows_amd64.exe darwin_arm64 darwin_amd64 linux_amd64 linux_arm64; do
printf '#!/bin/sh\necho "sshTermy v1.0.0"\n' >"$t/dist/sshtermy_$n"
done
(cd "$t/dist" && sha256sum sshtermy_* >checksums.txt)
packaging/deb.sh 1.0.0 amd64 "$t/dist/sshtermy_linux_amd64" "$t/apt" >/dev/null
dpkg-deb -f "$t/apt/sshtermy_1.0.0_amd64.deb" Package Version Architecture
packaging/apt-repo.sh "$t/apt"
grep -q "^Filename: ./sshtermy_1.0.0_amd64.deb" "$t/apt/Packages"
packaging/formula.sh 1.0.0 "$t/dist/checksums.txt" >"$t/sshtermy.rb"
ruby -c "$t/sshtermy.rb"
[ "$(grep -c 'sha256 "[0-9a-f]\{64\}"' "$t/sshtermy.rb")" = 4 ]
d="$(packaging/winget.sh 1.0.0 "$t/dist/checksums.txt" "$t/w")"
python3 - "$d" <<'PY'
import sys, glob, yaml
files = glob.glob(sys.argv[1] + "/*.yaml")
assert len(files) == 4, files
for f in files:
m = yaml.safe_load(open(f, encoding="utf-8"))
assert m["PackageIdentifier"] == "db9979.sshTermy" and m["PackageVersion"] == "1.0.0", f
for i in m.get("Installers", []):
assert len(i["InstallerSha256"]) == 64, i
print("winget ok:", len(files), "Manifeste")
PY
# Webseite: jede lokale href/src muss existieren (bilder/ kommt aus docs/bilder).
python3 - <<'PY'
import re, os, sys
bad = 0
for root, _, files in os.walk("site"):
for f in files:
if not f.endswith(".html"):
continue
p = os.path.join(root, f)
for ref in re.findall(r'(?:href|src)="([^"#:?]+)"', open(p, encoding="utf-8").read()):
if ref.startswith("//"):
continue
q = os.path.normpath(os.path.join(root, ref))
if q.startswith("site/bilder/"):
q = "docs/bilder/" + q[len("site/bilder/"):]
if ref.endswith("/"):
q = os.path.join(q, "index.html")
if not os.path.exists(q):
print("fehlt:", p, "->", ref); bad += 1
sys.exit(1 if bad else 0)
PY
echo "packaging ok"
+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
# Baut ein .deb aus einer fertigen Programmdatei (kein Kompilieren hier).
# packaging/deb.sh 1.0.42 amd64 dist/sshtermy_linux_amd64 dist
# Ergebnis: dist/sshtermy_1.0.42_amd64.deb (Programm unter /usr/bin/sshtermy).
set -eu
ver="$1"; arch="$2"; bin="$3"; out="$4"
root="$(mktemp -d)"
trap 'rm -rf "$root"' EXIT INT TERM
chmod 755 "$root"
install -Dm755 "$bin" "$root/usr/bin/sshtermy"
install -d "$root/usr/share/doc/sshtermy" "$root/DEBIAN"
cat >"$root/usr/share/doc/sshtermy/copyright" <<'TXT'
sshTermy – SSH terminal with an AI copilot
Idea: Dominik Bornhäußer
Source: https://github.com/db9979/sshtermy
TXT
size="$(du -sk "$root/usr" | cut -f1)"
cat >"$root/DEBIAN/control" <<TXT
Package: sshtermy
Version: $ver
Architecture: $arch
Maintainer: Dominik Bornhäußer <noreply@github.com>
Installed-Size: $size
Section: net
Priority: optional
Homepage: https://db9979.github.io/sshtermy/
Description: SSH terminal with an AI copilot
sshTermy is a terminal application (TUI) with a connection manager,
encrypted store, SFTP, tunnels, broadcast and an AI copilot for any
OpenAI-compatible endpoint. Updates come through apt.
TXT
mkdir -p "$out"
dpkg-deb --root-owner-group --build "$root" "$out/sshtermy_${ver}_${arch}.deb" >/dev/null
echo "$out/sshtermy_${ver}_${arch}.deb"
+51
View File
@@ -0,0 +1,51 @@
#!/bin/sh
# Schreibt die Homebrew-Formel für ein Release (Tap = dieses Repo):
# packaging/formula.sh 1.0.42 dist/checksums.txt > Formula/sshtermy.rb
# Installation: brew tap db9979/sshtermy https://github.com/db9979/sshtermy
# brew install sshtermy
set -eu
ver="$1"; sums="$2"
sha() {
s="$(awk -v n="$1" '{f=$2; sub(/^\*/, "", f); if (f == n) print tolower($1)}' "$sums")"
[ -n "$s" ] || { echo "formula.sh: keine Prüfsumme für $1" >&2; exit 1; }
echo "$s"
}
u="https://github.com/db9979/sshtermy/releases/download/v$ver"
cat <<RB
# Wird von .github/workflows/release.yml bei jedem Release neu geschrieben.
class Sshtermy < Formula
desc "SSH terminal with an AI copilot"
homepage "https://db9979.github.io/sshtermy/"
version "$ver"
on_macos do
on_arm do
url "$u/sshtermy_darwin_arm64"
sha256 "$(sha sshtermy_darwin_arm64)"
end
on_intel do
url "$u/sshtermy_darwin_amd64"
sha256 "$(sha sshtermy_darwin_amd64)"
end
end
on_linux do
on_arm do
url "$u/sshtermy_linux_arm64"
sha256 "$(sha sshtermy_linux_arm64)"
end
on_intel do
url "$u/sshtermy_linux_amd64"
sha256 "$(sha sshtermy_linux_amd64)"
end
end
def install
bin.install Dir["sshtermy_*"].first => "sshtermy"
end
test do
assert_match version.to_s, shell_output("#{bin}/sshtermy --version")
end
end
RB
+88
View File
@@ -0,0 +1,88 @@
#!/bin/sh
# Schreibt die winget-Manifeste (portable .exe) für ein Release:
# packaging/winget.sh 1.0.42 dist/checksums.txt out/
# Ergebnis: out/manifests/d/db9979/sshTermy/1.0.42/*.yaml, so wie im Repo
# microsoft/winget-pkgs. Eingereicht wird mit .github/workflows/winget.yml.
set -eu
ver="$1"; sums="$2"; out="$3"
id="db9979.sshTermy"
sha() {
s="$(awk -v n="$1" '{f=$2; sub(/^\*/, "", f); if (f == n) print toupper($1)}' "$sums")"
[ -n "$s" ] || { echo "winget.sh: keine Prüfsumme für $1" >&2; exit 1; }
echo "$s"
}
u="https://github.com/db9979/sshtermy/releases/download/v$ver"
d="$out/manifests/d/db9979/sshTermy/$ver"
mkdir -p "$d"
mv_="1.6.0"
hdr="# yaml-language-server: \$schema=https://aka.ms/winget-manifest"
cat >"$d/$id.yaml" <<YML
$hdr.version.$mv_.schema.json
PackageIdentifier: $id
PackageVersion: $ver
DefaultLocale: en-US
ManifestType: version
ManifestVersion: $mv_
YML
cat >"$d/$id.installer.yaml" <<YML
$hdr.installer.$mv_.schema.json
PackageIdentifier: $id
PackageVersion: $ver
InstallerType: portable
Commands:
- sshtermy
ReleaseDate: $(date -u +%Y-%m-%d)
Installers:
- Architecture: x64
InstallerUrl: $u/sshtermy_windows_amd64.exe
InstallerSha256: $(sha sshtermy_windows_amd64.exe)
- Architecture: x86
InstallerUrl: $u/sshtermy_windows_386.exe
InstallerSha256: $(sha sshtermy_windows_386.exe)
- Architecture: arm64
InstallerUrl: $u/sshtermy_windows_arm64.exe
InstallerSha256: $(sha sshtermy_windows_arm64.exe)
ManifestType: installer
ManifestVersion: $mv_
YML
cat >"$d/$id.locale.en-US.yaml" <<YML
$hdr.defaultLocale.$mv_.schema.json
PackageIdentifier: $id
PackageVersion: $ver
PackageLocale: en-US
Publisher: Dominik Bornhäußer
PublisherUrl: https://github.com/db9979
PackageName: sshTermy
PackageUrl: https://db9979.github.io/sshtermy/
License: Freeware
ShortDescription: SSH terminal with an AI copilot
Description: Terminal application with connection manager, encrypted store, SFTP, tunnels, broadcast and an AI copilot for any OpenAI-compatible endpoint.
Moniker: sshtermy
Tags:
- ssh
- terminal
- tui
- sftp
- ai
ReleaseNotesUrl: https://github.com/db9979/sshtermy/releases/tag/v$ver
ManifestType: defaultLocale
ManifestVersion: $mv_
YML
cat >"$d/$id.locale.de-DE.yaml" <<YML
$hdr.locale.$mv_.schema.json
PackageIdentifier: $id
PackageVersion: $ver
PackageLocale: de-DE
Publisher: Dominik Bornhäußer
PackageName: sshTermy
PackageUrl: https://db9979.github.io/sshtermy/de/
License: Freeware
ShortDescription: SSH-Terminal mit KI-Copilot
ManifestType: locale
ManifestVersion: $mv_
YML
echo "$d"
+186
View File
@@ -0,0 +1,186 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>sshTermy – SSH-Terminal mit KI-Copilot</title>
<meta name="description" content="sshTermy ist ein SSH-Terminal (TUI) mit KI-Copilot für Windows, macOS und Linux: Verbindungsmanager, Ziel-Modus, Ghost-Text, SFTP, Tunnel, Broadcast. Idee: Dominik Bornhäußer.">
<link rel="alternate" hreflang="en" href="../">
<link rel="stylesheet" href="../style.css">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><text y='13' font-size='14' fill='%23bb9af7'>◆</text></svg>">
</head>
<body>
<header>
<div class="bar">
<a class="logo" href="./"><span>◆</span> sshTermy</a>
<nav>
<a href="#installieren">Installieren</a>
<a href="#rundgang">Rundgang</a>
<a href="#funktionen">Funktionen</a>
<a href="#ki">KI einrichten</a>
<a href="#tasten">Tasten</a>
<a href="#updates">Updates</a>
<a href="#faq">Fragen</a>
<a href="https://github.com/db9979/sshtermy">GitHub</a>
</nav>
<div class="lang"><a href="../">EN</a> · <b>DE</b></div>
</div>
</header>
<main>
<section class="hero">
<h1>SSH-Terminal mit <span class="accent">KI-Copilot</span></h1>
<p class="lead">Eine kleine Datei für Windows, macOS und Linux. Verbindungsmanager, echtes Terminal, SFTP und Tunnel, dazu eine KI, die Befehle vorschlägt, ein Ziel Schritt für Schritt umsetzt und Fehler erklärt. Jeder Befehl braucht deine Bestätigung.</p>
<p class="credit">Idee: Dominik Bornhäußer</p>
<div class="buttons">
<a class="btn primary" href="#installieren">Installieren</a>
<a class="btn" href="https://github.com/db9979/sshtermy/releases/latest">Download</a>
<a class="btn coffee" href="https://buymeacoffee.com/zquu1xu570">☕ Kaffee spendieren</a>
</div>
<figure>
<img src="../gifs/goal-de.gif" width="962" height="594" alt="Ziel-Modus: die KI richtet Nginx Schritt für Schritt ein, jeder Befehl wird mit Enter bestätigt">
<figcaption>Ziel-Modus (F2): Ziel beschreiben, die KI schlägt immer genau einen Befehl vor, du bestätigst.</figcaption>
</figure>
</section>
<section id="installieren">
<h2>Installieren</h2>
<p>Wähle dein System. Jeder Weg installiert dasselbe Release von GitHub.</p>
<div class="os">
<div class="card">
<h3>Windows <span class="tag">ARM64 · x64 · x86</span></h3>
<p>Mit winget (Windows 11 und 10):</p>
<div class="cmd" data-copy="Kopieren"><pre>winget install db9979.sshTermy</pre></div>
<p><small>Verfügbar, sobald das Paket im winget-Katalog freigegeben ist.</small></p>
<p>Oder die <code>.exe</code> für deinen Prozessor aus den <a href="https://github.com/db9979/sshtermy/releases/latest">Releases</a> laden und im <a href="https://aka.ms/terminal">Windows Terminal</a> starten.</p>
</div>
<div class="card">
<h3>macOS <span class="tag">Apple Silicon · Intel</span></h3>
<p>Mit Homebrew:</p>
<div class="cmd" data-copy="Kopieren"><pre>brew tap db9979/sshtermy https://github.com/db9979/sshtermy
brew install sshtermy</pre></div>
<p>Oder mit einer Zeile, die zusätzlich <code>~/Applications/sshTermy.app</code> anlegt:</p>
<div class="cmd" data-copy="Kopieren"><pre>curl -fsSL https://raw.githubusercontent.com/db9979/sshtermy/main/install.sh | sh</pre></div>
</div>
<div class="card">
<h3>Linux <span class="tag">amd64 · arm64</span></h3>
<p>Debian, Ubuntu, Raspberry Pi OS 64 Bit (apt):</p>
<div class="cmd" data-copy="Kopieren"><pre>echo "deb [trusted=yes] https://db9979.github.io/sshtermy/apt ./" | sudo tee /etc/apt/sources.list.d/sshtermy.list
sudo apt update && sudo apt install sshtermy</pre></div>
<p>Homebrew und der Einzeiler von oben gehen auch unter Linux.</p>
</div>
</div>
<p>Danach <code>sshtermy</code> eingeben. Beim ersten Start legst du ein Master-Passwort für deinen verschlüsselten Speicher fest.</p>
</section>
<section id="rundgang">
<h2>Rundgang</h2>
<div class="demo">
<div class="text">
<h3>Entsperren, Host wählen, los</h3>
<p>Verbindungen, Passwörter und Schlüssel liegen in einem verschlüsselten Speicher (AES-256-GCM, Argon2id, unter Windows zusätzlich DPAPI). Der Manager zeigt Ordner, Tags und Details, Enter verbindet. Die Statuszeile zeigt sofort Last, RAM und Platte des Servers.</p>
</div>
<figure><img src="../gifs/start-de.gif" width="962" height="594" alt="Startanimation, Entsperren mit dem Master-Passwort, Verbinden mit web-01" loading="lazy"></figure>
</div>
<div class="demo">
<div class="text">
<h3>Ghost-Text und Fehler erklärt</h3>
<p>Beim Tippen ergänzt die KI die Zeile in Grau, Tab übernimmt. Nach jedem Befehl gibt es Folgebefehle (Alt+1…4). Schlägt ein Befehl fehl, fragt Alt+0 die KI nach dem Grund, mit der Ausgabe als Kontext, und 1…9 fügt einen vorgeschlagenen Fix ein.</p>
</div>
<figure><img src="../gifs/ghost-de.gif" width="962" height="594" alt="Ghost-Text ergänzt systemctl status nginx, der Befehl schlägt fehl, Alt+0 erklärt den Grund und fügt den Fix ein" loading="lazy"></figure>
</div>
<div class="demo">
<div class="text">
<h3>Eine Palette für alles</h3>
<p><kbd>Strg</kbd>+<kbd>Leertaste</kbd> öffnet die Befehlspalette: Aktionen, Tunnel, Verbindungen und Runbooks. Freier Text wird ein Ziel (Enter) oder eine Frage an die KI (Tab).</p>
</div>
<figure><img src="../gifs/palette-de.gif" width="962" height="594" alt="Die Befehlspalette filtert Aktionen, dann geht eine Frage mit Terminal-Kontext an die KI" loading="lazy"></figure>
</div>
</section>
<section id="funktionen">
<h2>Funktionen</h2>
<div class="features">
<div class="card"><h3>Verbindungsmanager</h3><p>Ordner, Tags, Jump-Hosts, Import aus <code>~/.ssh/config</code>, PuTTY und MobaXterm.</p></div>
<div class="card"><h3>Echtes Terminal</h3><p>xterm-256color, Truecolor, vim, htop und tmux, Scrollback, Tabs, geteilte Ansicht, Suche.</p></div>
<div class="card"><h3>Auto-Reconnect</h3><p>Reißt WLAN oder VPN ab, kommt die Sitzung von selbst zurück, mit Tunneln und tmux/screen.</p></div>
<div class="card"><h3>Dateien (F5)</h3><p>SFTP über dieselbe Verbindung: links lokal, rechts der Server.</p></div>
<div class="card"><h3>Host-Übersicht (F6)</h3><p>CPU, Last, RAM, Platte und Updates bei Servern; Firmware, Ports und VLANs bei Aruba- und Cisco-Switches, mit Konfig-Sicherung und Diff.</p></div>
<div class="card"><h3>Tunnel</h3><p><code>-L</code>, <code>-R</code>, <code>-D</code> (SOCKS5) und Webdienste mit einem Klick.</p></div>
<div class="card"><h3>Broadcast</h3><p>Ein Befehl oder Runbook parallel auf einer ganzen Gruppe, Ergebnisse nebeneinander.</p></div>
<div class="card"><h3>Netzwerk-Scan</h3><p>SSH-Geräte in einem Subnetz finden und als Verbindungen anlegen.</p></div>
<div class="card"><h3>Gefahr-Regeln</h3><p>Feste Regeln markieren riskante Befehle rot; sie brauchen zweimal Enter, auch beim Einfügen.</p></div>
<div class="card"><h3>Sitzungsprotokoll</h3><p>Verschlüsselt, durchsuchbar, mit KI-Zusammenfassung und Markdown-Export.</p></div>
<div class="card"><h3>Sync</h3><p>Ende-zu-Ende-verschlüsselt über OneDrive, Dropbox, iCloud, Syncthing oder WebDAV (Synology, Nextcloud).</p></div>
<div class="card"><h3>Systemprofil</h3><p>Kennt Linux-Distributionen, macOS, Windows und Netzwerk-Dialekte, damit die KI passende Befehle vorschlägt.</p></div>
</div>
<div class="shots">
<figure><img src="../bilder/02-manager.png" alt="Verbindungsmanager" loading="lazy"><figcaption>Verbindungsmanager</figcaption></figure>
<figure><img src="../bilder/14-host-switch.png" alt="Host-Übersicht eines Switches" loading="lazy"><figcaption>Host-Übersicht eines Switches (F6)</figcaption></figure>
<figure><img src="../bilder/12-dateien.png" alt="Dateien per SFTP" loading="lazy"><figcaption>Dateien per SFTP (F5)</figcaption></figure>
<figure><img src="../bilder/04-gefahr.png" alt="Gefährlicher Befehl braucht Bestätigung" loading="lazy"><figcaption>Gefahr-Regeln</figcaption></figure>
</div>
</section>
<section id="ki">
<h2>KI einrichten</h2>
<p>sshTermy spricht mit jedem OpenAI-kompatiblen Endpunkt (<code>/v1/chat/completions</code>): Ollama, vLLM, SGLang, LiteLLM, LocalAI oder OpenAI selbst. Mit einem lokalen Modell bleibt dein Terminal-Inhalt auf deiner eigenen Hardware.</p>
<ol>
<li>Im Manager <kbd>s</kbd> drücken (KI-Einstellungen).</li>
<li>URL eintragen, z. B. <code>http://localhost:11434/v1</code> für Ollama, und einen API-Schlüssel, falls der Endpunkt einen braucht (wird verschlüsselt gespeichert).</li>
<li><kbd>Strg</kbd>+<kbd>T</kbd> testet den Endpunkt, <kbd>Strg</kbd>+<kbd>L</kbd> listet die Modelle zur Auswahl.</li>
</ol>
<p>Der Punkt oben rechts zeigt, ob die KI erreichbar ist (grün, gelb bei langsamer Antwort, rot bei Fehler). Die KI hat keine eigenen Werkzeuge: sie schlägt nur vor, du entscheidest, was läuft. Passwörter und Geheimnisse werden vor dem Senden aus dem Kontext entfernt.</p>
</section>
<section id="tasten">
<h2>Tasten</h2>
<table>
<tr><th>Taste</th><th>Wirkung</th></tr>
<tr><td><kbd>Strg</kbd>+<kbd>Leertaste</kbd></td><td>Befehlspalette</td></tr>
<tr><td><kbd>Tab</kbd> / <kbd>→</kbd></td><td>Ghost-Text übernehmen</td></tr>
<tr><td><kbd>Alt</kbd>+<kbd>1</kbd>…<kbd>4</kbd></td><td>Folgebefehl einfügen</td></tr>
<tr><td><kbd>Alt</kbd>+<kbd>0</kbd></td><td>Nach einem Fehler: Ursache und Fix</td></tr>
<tr><td><kbd>F2</kbd></td><td>Ziel-Modus (Agent)</td></tr>
<tr><td><kbd>F3</kbd></td><td>KI fragen, mit Terminal-Kontext</td></tr>
<tr><td><kbd>F4</kbd> / <kbd>F5</kbd> / <kbd>F6</kbd></td><td>Tunnel / Dateien (SFTP) / Host-Übersicht</td></tr>
<tr><td><kbd>F9</kbd>, <kbd>⇧</kbd>+<kbd>F1</kbd>…<kbd>F8</kbd></td><td>Schnellbefehle</td></tr>
<tr><td><kbd>F10</kbd></td><td>Zurück zum Manager (Sitzungen laufen weiter)</td></tr>
<tr><td><kbd>F1</kbd> / <kbd>F12</kbd> / <kbd>Strg</kbd>+<kbd>Q</kbd></td><td>Hilfe / Über und Update / Beenden</td></tr>
</table>
<p>Alle Tasten lassen sich ändern: <kbd>b</kbd> im Manager. Die ganze Liste steht in der <a href="https://github.com/db9979/sshtermy/blob/main/README.de.md">README</a> und in der App (<kbd>F1</kbd>).</p>
</section>
<section id="updates">
<h2>Updates</h2>
<p>Ein direkter Download oder der Einzeiler aktualisiert sich selbst: sshTermy fragt einmal am Tag bei GitHub nach, prüft die Prüfsumme und tauscht die Datei aus (<kbd>F12</kbd> → <kbd>u</kbd> oder <code>sshtermy --update</code>).</p>
<p>Über eine Paketquelle installiert, aktualisiert die Paketquelle:</p>
<table>
<tr><td>Homebrew</td><td><code>brew upgrade sshtermy</code></td></tr>
<tr><td>apt</td><td><code>sudo apt update && sudo apt upgrade</code></td></tr>
<tr><td>winget</td><td><code>winget upgrade db9979.sshTermy</code> (das eingebaute Update geht auch)</td></tr>
</table>
</section>
<section id="faq">
<h2>Fragen</h2>
<details><summary>Windows meldet „Der Computer wurde durch Windows geschützt“</summary><p>Die <code>.exe</code> ist noch nicht codesigniert, deshalb warnt SmartScreen beim ersten Start. „Weitere Informationen“ → „Trotzdem ausführen“. Mit winget installiert, kommt die Warnung meist nicht.</p></details>
<details><summary>macOS meldet, die App „kann nicht geöffnet werden“</summary><p>Mit dem Browser geladene Dateien bekommen eine Quarantäne-Markierung. Nimm Homebrew oder den Einzeiler, oder entferne die Markierung: <code>xattr -d com.apple.quarantine sshtermy_darwin_arm64</code>.</p></details>
<details><summary>Wo liegen meine Daten?</summary><p>Windows: <code>%APPDATA%\sshtermy</code>, macOS: <code>~/Library/Application Support/sshtermy</code>, Linux: <code>~/.config/sshtermy</code>. Die Umgebungsvariable <code>SSHTERMY_HOME</code> verlegt sie, z. B. auf einen USB-Stick.</p></details>
<details><summary>Welches Terminal soll ich nehmen?</summary><p>Unter Windows das Windows Terminal, unter macOS Terminal oder iTerm2, unter Linux jedes moderne Terminal. Funktionstasten und Truecolor sollten gehen.</p></details>
<details><summary>Geht das auch auf Englisch?</summary><p>Ja: <kbd>F12</kbd> → <kbd>l</kbd> oder Palette → „Sprache“. Beim ersten Start folgt sshTermy der Systemsprache.</p></details>
</section>
</main>
<footer>
<div class="bar">
<span><b>sshTermy</b> · Idee: Dominik Bornhäußer</span>
<a href="https://github.com/db9979/sshtermy">GitHub</a>
<a href="https://github.com/db9979/sshtermy/releases">Releases</a>
<a href="https://buymeacoffee.com/zquu1xu570">☕ Kaffee spendieren</a>
<a href="../">English</a>
</div>
</footer>
<script src="../site.js"></script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

+187
View File
@@ -0,0 +1,187 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>sshTermy – SSH terminal with an AI copilot</title>
<meta name="description" content="sshTermy is an SSH terminal (TUI) with an AI copilot for Windows, macOS and Linux: connection manager, goal mode, ghost text, SFTP, tunnels, broadcast. Idea: Dominik Bornhäußer.">
<link rel="alternate" hreflang="de" href="de/">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><text y='13' font-size='14' fill='%23bb9af7'>◆</text></svg>">
</head>
<body>
<header>
<div class="bar">
<a class="logo" href="./"><span>◆</span> sshTermy</a>
<nav>
<a href="#install">Install</a>
<a href="#tour">Tour</a>
<a href="#features">Features</a>
<a href="#ai">AI setup</a>
<a href="#keys">Keys</a>
<a href="#updates">Updates</a>
<a href="#faq">FAQ</a>
<a href="https://github.com/db9979/sshtermy">GitHub</a>
</nav>
<div class="lang"><b>EN</b> · <a href="de/">DE</a></div>
</div>
</header>
<main>
<section class="hero">
<h1>SSH terminal with an <span class="accent">AI copilot</span></h1>
<p class="lead">One small file for Windows, macOS and Linux. Connection manager, real terminal, SFTP and tunnels, plus an AI that suggests commands, works towards a goal step by step and explains errors. Every command needs your confirmation.</p>
<p class="credit">Idea: Dominik Bornhäußer</p>
<div class="buttons">
<a class="btn primary" href="#install">Install</a>
<a class="btn" href="https://github.com/db9979/sshtermy/releases/latest">Download</a>
<a class="btn coffee" href="https://buymeacoffee.com/zquu1xu570">☕ Buy me a coffee</a>
</div>
<figure>
<img src="gifs/goal-en.gif" width="962" height="594" alt="Goal mode: the AI sets up nginx step by step, each command is confirmed with Enter">
<figcaption>Goal mode (F2): describe a goal, the AI suggests exactly one command at a time, you confirm.</figcaption>
</figure>
</section>
<section id="install">
<h2>Install</h2>
<p>Pick your system. Every way installs the same release from GitHub.</p>
<div class="os">
<div class="card">
<h3>Windows <span class="tag">ARM64 · x64 · x86</span></h3>
<p>With winget (Windows 11 and 10):</p>
<div class="cmd"><pre>winget install db9979.sshTermy</pre></div>
<p><small>Available as soon as the package is approved in the winget catalog.</small></p>
<p>Or download the <code>.exe</code> for your processor from the <a href="https://github.com/db9979/sshtermy/releases/latest">releases</a> and start it in <a href="https://aka.ms/terminal">Windows Terminal</a>.</p>
</div>
<div class="card">
<h3>macOS <span class="tag">Apple Silicon · Intel</span></h3>
<p>With Homebrew:</p>
<div class="cmd"><pre>brew tap db9979/sshtermy https://github.com/db9979/sshtermy
brew install sshtermy</pre></div>
<p>Or with one line, which also creates <code>~/Applications/sshTermy.app</code>:</p>
<div class="cmd"><pre>curl -fsSL https://raw.githubusercontent.com/db9979/sshtermy/main/install.sh | sh</pre></div>
</div>
<div class="card">
<h3>Linux <span class="tag">amd64 · arm64</span></h3>
<p>Debian, Ubuntu, Raspberry Pi OS 64-bit (apt):</p>
<div class="cmd"><pre>echo "deb [trusted=yes] https://db9979.github.io/sshtermy/apt ./" | sudo tee /etc/apt/sources.list.d/sshtermy.list
sudo apt update && sudo apt install sshtermy</pre></div>
<p>Homebrew and the one-line installer above work on Linux too.</p>
</div>
</div>
<p>Then type <code>sshtermy</code>. On first start you choose a master password for your encrypted store.</p>
</section>
<section id="tour">
<h2>Tour</h2>
<div class="demo">
<div class="text">
<h3>Unlock, pick a host, go</h3>
<p>Your connections, passwords and keys live in an encrypted store (AES-256-GCM, Argon2id, plus DPAPI on Windows). The manager shows folders, tags and details; Enter connects. The status line shows load, RAM and disk of the server right away.</p>
</div>
<figure><img src="gifs/start-en.gif" width="962" height="594" alt="Start animation, unlock with the master password, connect to web-01" loading="lazy"></figure>
</div>
<div class="demo">
<div class="text">
<h3>Ghost text and errors explained</h3>
<p>While you type, the AI completes the line in grey; Tab accepts. After every command it offers follow-ups (Alt+1…4). When a command fails, Alt+0 asks the AI why, with the output as context, and 1…9 inserts a suggested fix.</p>
</div>
<figure><img src="gifs/ghost-en.gif" width="962" height="594" alt="Ghost text completes systemctl status nginx, the command fails, Alt+0 explains why and inserts the fix" loading="lazy"></figure>
</div>
<div class="demo">
<div class="text">
<h3>One palette for everything</h3>
<p><kbd>Ctrl</kbd>+<kbd>Space</kbd> opens the command palette: actions, tunnels, connections and runbooks. Plain text becomes a goal (Enter) or a question to the AI (Tab).</p>
</div>
<figure><img src="gifs/palette-en.gif" width="962" height="594" alt="Command palette filters actions, then a question goes to the AI with terminal context" loading="lazy"></figure>
</div>
</section>
<section id="features">
<h2>Features</h2>
<div class="features">
<div class="card"><h3>Connection manager</h3><p>Folders, tags, jump hosts, import from <code>~/.ssh/config</code>, PuTTY and MobaXterm.</p></div>
<div class="card"><h3>Real terminal</h3><p>xterm-256color, truecolor, vim, htop and tmux, scrollback, tabs, split view, search.</p></div>
<div class="card"><h3>Auto-reconnect</h3><p>When Wi-Fi or VPN drops, the session comes back by itself, with tunnels and tmux/screen.</p></div>
<div class="card"><h3>Files (F5)</h3><p>SFTP over the same connection: local on the left, server on the right.</p></div>
<div class="card"><h3>Host overview (F6)</h3><p>CPU, load, RAM, disk and updates for servers; firmware, ports and VLANs for Aruba and Cisco switches, with config backup and diff.</p></div>
<div class="card"><h3>Tunnels</h3><p><code>-L</code>, <code>-R</code>, <code>-D</code> (SOCKS5) and web services with one click.</p></div>
<div class="card"><h3>Broadcast</h3><p>One command or runbook on a whole group in parallel, results side by side.</p></div>
<div class="card"><h3>Network scan</h3><p>Find SSH devices in a subnet and create them as connections.</p></div>
<div class="card"><h3>Danger rules</h3><p>Fixed rules mark risky commands red; they need Enter twice, also when pasted.</p></div>
<div class="card"><h3>Session log</h3><p>Encrypted, searchable, with AI summary and Markdown export.</p></div>
<div class="card"><h3>Sync</h3><p>End-to-end encrypted via OneDrive, Dropbox, iCloud, Syncthing or WebDAV (Synology, Nextcloud).</p></div>
<div class="card"><h3>System profile</h3><p>Knows Linux distributions, macOS, Windows and network OS dialects, so the AI suggests matching commands.</p></div>
</div>
<div class="shots">
<figure><img src="bilder/02-manager.png" alt="Connection manager" loading="lazy"><figcaption>Connection manager</figcaption></figure>
<figure><img src="bilder/14-host-switch.png" alt="Host overview of a switch" loading="lazy"><figcaption>Host overview of a switch (F6)</figcaption></figure>
<figure><img src="bilder/12-dateien.png" alt="Files via SFTP" loading="lazy"><figcaption>Files via SFTP (F5)</figcaption></figure>
<figure><img src="bilder/04-gefahr.png" alt="Dangerous command needs confirmation" loading="lazy"><figcaption>Danger rules</figcaption></figure>
</div>
<p><small>The screenshots show the German interface; the English one looks the same.</small></p>
</section>
<section id="ai">
<h2>AI setup</h2>
<p>sshTermy talks to any OpenAI-compatible endpoint (<code>/v1/chat/completions</code>): Ollama, vLLM, SGLang, LiteLLM, LocalAI or OpenAI itself. A local model keeps your terminal content on your own hardware.</p>
<ol>
<li>In the manager press <kbd>s</kbd> (AI settings).</li>
<li>Enter the URL, e.g. <code>http://localhost:11434/v1</code> for Ollama, and an API key if the endpoint needs one (stored encrypted).</li>
<li><kbd>Ctrl</kbd>+<kbd>T</kbd> tests the endpoint, <kbd>Ctrl</kbd>+<kbd>L</kbd> lists the models to pick from.</li>
</ol>
<p>The dot in the top right shows whether the AI is reachable (green, yellow when slow, red on error). The AI has no tools of its own: it only suggests, you decide what runs. Passwords and secrets are removed from the context before it is sent.</p>
</section>
<section id="keys">
<h2>Keys</h2>
<table>
<tr><th>Key</th><th>Effect</th></tr>
<tr><td><kbd>Ctrl</kbd>+<kbd>Space</kbd></td><td>Command palette</td></tr>
<tr><td><kbd>Tab</kbd> / <kbd>→</kbd></td><td>Accept ghost text</td></tr>
<tr><td><kbd>Alt</kbd>+<kbd>1</kbd>…<kbd>4</kbd></td><td>Insert follow-up command</td></tr>
<tr><td><kbd>Alt</kbd>+<kbd>0</kbd></td><td>After a failure: cause and fix</td></tr>
<tr><td><kbd>F2</kbd></td><td>Goal mode (agent)</td></tr>
<tr><td><kbd>F3</kbd></td><td>Ask AI with terminal context</td></tr>
<tr><td><kbd>F4</kbd> / <kbd>F5</kbd> / <kbd>F6</kbd></td><td>Tunnels / files (SFTP) / host overview</td></tr>
<tr><td><kbd>F9</kbd>, <kbd>⇧</kbd>+<kbd>F1</kbd>…<kbd>F8</kbd></td><td>Quick commands</td></tr>
<tr><td><kbd>F10</kbd></td><td>Back to the manager (sessions keep running)</td></tr>
<tr><td><kbd>F1</kbd> / <kbd>F12</kbd> / <kbd>Ctrl</kbd>+<kbd>Q</kbd></td><td>Help / about and update / quit</td></tr>
</table>
<p>All shortcuts can be changed: <kbd>b</kbd> in the manager. The full list is in the <a href="https://github.com/db9979/sshtermy#usage">README</a> and in the app (<kbd>F1</kbd>).</p>
</section>
<section id="updates">
<h2>Updates</h2>
<p>A direct download or the one-line installer updates itself: sshTermy checks GitHub once a day, verifies the checksum and swaps the file (<kbd>F12</kbd> → <kbd>u</kbd>, or <code>sshtermy --update</code>).</p>
<p>Installed with a package manager, the package manager updates it:</p>
<table>
<tr><td>Homebrew</td><td><code>brew upgrade sshtermy</code></td></tr>
<tr><td>apt</td><td><code>sudo apt update && sudo apt upgrade</code></td></tr>
<tr><td>winget</td><td><code>winget upgrade db9979.sshTermy</code> (the built-in update works as well)</td></tr>
</table>
</section>
<section id="faq">
<h2>FAQ</h2>
<details><summary>Windows says “Windows protected your PC”</summary><p>The <code>.exe</code> is not code-signed yet, so SmartScreen warns on the first start. Click “More info” → “Run anyway”. Installing with winget usually avoids the warning.</p></details>
<details><summary>macOS says the app “cannot be opened”</summary><p>Files downloaded with the browser get a quarantine mark. Use Homebrew or the one-line installer, or remove the mark: <code>xattr -d com.apple.quarantine sshtermy_darwin_arm64</code>.</p></details>
<details><summary>Where is my data?</summary><p>Windows: <code>%APPDATA%\sshtermy</code>, macOS: <code>~/Library/Application Support/sshtermy</code>, Linux: <code>~/.config/sshtermy</code>. The environment variable <code>SSHTERMY_HOME</code> moves it, e.g. onto a USB stick.</p></details>
<details><summary>Which terminal should I use?</summary><p>Windows Terminal on Windows, Terminal or iTerm2 on macOS, any modern terminal on Linux. Function keys and truecolor should work.</p></details>
<details><summary>Can I switch to German?</summary><p>Yes: <kbd>F12</kbd> → <kbd>l</kbd> or palette → “Language”. On first start sshTermy follows the system language.</p></details>
</section>
</main>
<footer>
<div class="bar">
<span><b>sshTermy</b> · Idea: Dominik Bornhäußer</span>
<a href="https://github.com/db9979/sshtermy">GitHub</a>
<a href="https://github.com/db9979/sshtermy/releases">Releases</a>
<a href="https://buymeacoffee.com/zquu1xu570">☕ Buy me a coffee</a>
<a href="de/">Deutsch</a>
</div>
</footer>
<script src="site.js"></script>
</body>
</html>
+11
View File
@@ -0,0 +1,11 @@
// Kopier-Knöpfe an den Befehlen.
document.querySelectorAll('.cmd').forEach(function (box) {
var b = document.createElement('button');
b.className = 'copy'; b.type = 'button'; b.textContent = box.dataset.copy || 'Copy';
b.addEventListener('click', function () {
navigator.clipboard.writeText(box.querySelector('pre').innerText.trim()).then(function () {
var t = b.textContent; b.textContent = '✓'; setTimeout(function () { b.textContent = t; }, 1200);
});
});
box.appendChild(b);
});
+78
View File
@@ -0,0 +1,78 @@
/* sshTermy – Webseite. Farben wie die App (dunkel). */
:root {
--bg: #0d1117; --panel: #161b22; --line: #2a2e45; --fg: #c9d1d9; --dim: #8b949e;
--blue: #7aa2f7; --violet: #bb9af7; --green: #9ece6a; --yellow: #e0af68; --red: #f7768e; --cyan: #7dcfff;
--mono: "Cascadia Code", "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
code { background: #1f2430; padding: .1em .35em; border-radius: 4px; }
kbd { background: #1f2430; border: 1px solid var(--line); border-bottom-width: 2px; padding: 0 .4em; border-radius: 4px; white-space: nowrap; }
header { position: sticky; top: 0; z-index: 10; background: rgba(13,17,23,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 22px; }
.logo { font-family: var(--mono); font-weight: 700; color: var(--fg); font-size: 18px; }
.logo span { color: var(--violet); }
nav { display: flex; gap: 18px; flex: 1; overflow-x: auto; white-space: nowrap; }
nav a { color: var(--dim); font-size: 15px; }
nav a:hover { color: var(--fg); text-decoration: none; }
.lang { font-size: 14px; color: var(--dim); white-space: nowrap; }
.lang b { color: var(--fg); }
main { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
section { padding: 56px 0 8px; }
h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.1; margin: 0 0 14px; }
h1 .accent { background: linear-gradient(90deg, var(--blue), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 30px; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 24px 0 6px; }
p.lead { font-size: 19px; color: var(--dim); max-width: 760px; margin: 0 0 8px; }
.credit { font-style: italic; color: var(--dim); margin: 0 0 22px; }
.hero { padding-top: 56px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 34px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); color: var(--fg); background: var(--panel); font-weight: 600; }
.btn:hover { text-decoration: none; border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #0d1117; }
.btn.coffee { background: #ffdd00; border-color: #ffdd00; color: #111; }
figure { margin: 0; }
figure img { display: block; max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
figcaption { color: var(--dim); font-size: 14px; margin-top: 8px; }
.os { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.card h3 { margin-top: 0; }
.card p { margin: 8px 0; color: var(--dim); font-size: 15px; }
.cmd { position: relative; background: #0b0e14; border: 1px solid var(--line); border-radius: 8px; padding: 10px 70px 10px 12px; margin: 8px 0 12px; }
.cmd pre { margin: 0; color: var(--green); white-space: pre; overflow-x: auto; }
.copy { position: absolute; top: 6px; right: 6px; background: var(--panel); color: var(--dim); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; padding: 2px 8px; cursor: pointer; }
.copy:hover { color: var(--fg); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #1f2430; color: var(--cyan); margin-left: 6px; vertical-align: middle; }
.demo > * { min-width: 0; }
.demo { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; align-items: center; margin: 34px 0; }
.demo:nth-of-type(even) { grid-template-columns: 1.6fr 1fr; }
.demo:nth-of-type(even) .text { order: 2; }
.demo .text p { color: var(--dim); }
@media (max-width: 860px) { .demo, .demo:nth-of-type(even) { grid-template-columns: 1fr; } .demo:nth-of-type(even) .text { order: 0; } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.features .card h3 { font-size: 16px; margin: 0 0 4px; }
.features .card p { margin: 0; font-size: 14.5px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; }
td:first-child { white-space: nowrap; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p, details ul { color: var(--dim); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; }
footer { border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
footer .bar { height: auto; padding: 22px 20px; flex-wrap: wrap; }
+13 -2
View File
@@ -4,7 +4,7 @@
//
// Regeln (passen zu .github/workflows/release.yml):
// - Jeder Commit auf main (first-parent) ist ein Release, außer er ändert
// nur docs/** oder *.md. Dessen Neuerungen wandern ins nächste Release.
// nur docs/**, site/**, Formula/** oder *.md. Dessen Neuerungen wandern ins nächste Release.
// - Version = MAJOR.MINOR aus VERSION + Anzahl Commits bis dahin.
// - Text: aus dem PR-Abschnitt „## Was ist neu“ (Stichpunkte für Nutzer).
// Fehlt er, der PR-Titel. Steht dort nur „intern“ oder „-“, entfällt der
@@ -139,13 +139,24 @@ func releases(c commit, root bool) bool {
return true
}
for _, f := range strings.Fields(files) {
if !strings.HasPrefix(f, "docs/") && !strings.HasSuffix(f, ".md") {
if !noRelease(f) {
return true
}
}
return false
}
// noRelease: Pfade aus paths-ignore in release.yml (Doku, Webseite, die
// vom Release selbst geschriebene Homebrew-Formel).
func noRelease(f string) bool {
for _, p := range []string{"docs/", "site/", "Formula/"} {
if strings.HasPrefix(f, p) {
return true
}
}
return strings.HasSuffix(f, ".md")
}
func itemsFor(c commit, gh *github) []string {
m := mergeRe.FindStringSubmatch(c.subject)
if m == nil {
+11
View File
@@ -16,3 +16,14 @@ func TestNewsSection(t *testing.T) {
t.Fatal("ohne Abschnitt")
}
}
func TestNoRelease(t *testing.T) {
for f, want := range map[string]bool{
"docs/bilder/a.png": true, "site/index.html": true, "Formula/sshtermy.rb": true,
"README.md": true, "internal/ui/app.go": false, "packaging/deb.sh": false,
} {
if noRelease(f) != want {
t.Errorf("%s: %v", f, !want)
}
}
}
+19
View File
@@ -0,0 +1,19 @@
# GIFs für die Webseite (site/gifs)
Aufnahme der echten App in tmux gegen den Test-SSH-Server und ein Demo-LLM,
Bild für Bild über Chromium (Playwright) gerendert und mit ffmpeg zum GIF gebaut.
```sh
go build -ldflags "-X github.com/db9979/sshtermy/internal/version.Version=1.0.96" -o /tmp/st/sshtermy ./cmd/sshtermy
(cd tools/dev/devsshd && go build -o /tmp/st/devsshd .)
PATH=$PWD/tools/dev/gifs/fakebin:$PATH /tmp/st/devsshd & # docker, curl, systemctl … als Attrappen
cd tools/dev/gifs
DEMO_LANG=en python3 demollm.py & # Port 11434, Antworten auf Englisch (de = Deutsch)
python3 prepare.py en # Master-Passwort demo1234, drei Verbindungen
# einmal von Hand mit web-01 verbinden und den Host-Key bestätigen
python3 scenes.py en start goal ghost palette
cp out/*.gif ../../../site/gifs/
```
Für Deutsch `demollm.py` mit `DEMO_LANG=de` neu starten und `prepare.py de` / `scenes.py de …`.
Braucht tmux, ffmpeg, Node mit Playwright und Python 3.
+62
View File
@@ -0,0 +1,62 @@
import re, sys, html
PAL = ["#15161e","#f7768e","#9ece6a","#e0af68","#7aa2f7","#bb9af7","#7dcfff","#a9b1d6","#414868","#f7768e","#9ece6a","#e0af68","#7aa2f7","#bb9af7","#7dcfff","#c0caf5"]
def x256(n):
if n < 16: return PAL[n]
if n < 232:
n -= 16; r, g, b = n//36, (n//6)%6, n%6
f = lambda v: 0 if v == 0 else 55 + v*40
return "#%02x%02x%02x" % (f(r), f(g), f(b))
v = 8 + (n-232)*10; return "#%02x%02x%02x" % (v, v, v)
DFG, DBG = "#c0caf5", "#1a1b26"
def conv(text):
out = []; st = {"fg": None, "bg": None, "b": False, "i": False, "u": False, "rev": False, "dim": False}
for line in text.split("\n"):
parts = re.split(r"(\x1b\[[0-9;:]*m)", line); spans = []
for p in parts:
if p.startswith("\x1b["):
codes = p[2:-1].replace(":", ";").split(";") if p[2:-1] else ["0"]; i = 0
while i < len(codes):
c = int(codes[i] or 0)
if c == 0: st = {"fg": None, "bg": None, "b": False, "i": False, "u": False, "rev": False, "dim": False}
elif c == 1: st["b"] = True
elif c == 2: st["dim"] = True
elif c == 3: st["i"] = True
elif c == 4: st["u"] = True
elif c == 7: st["rev"] = True
elif c == 22: st["b"] = st["dim"] = False
elif c == 23: st["i"] = False
elif c == 24: st["u"] = False
elif c == 27: st["rev"] = False
elif 30 <= c <= 37: st["fg"] = PAL[c-30]
elif 90 <= c <= 97: st["fg"] = PAL[c-90+8]
elif 40 <= c <= 47: st["bg"] = PAL[c-40]
elif 100 <= c <= 107: st["bg"] = PAL[c-100+8]
elif c == 39: st["fg"] = None
elif c == 49: st["bg"] = None
elif c in (38, 48):
key = "fg" if c == 38 else "bg"
if codes[i+1] == "5": st[key] = x256(int(codes[i+2])); i += 2
elif codes[i+1] == "2": st[key] = "#%02x%02x%02x" % tuple(int(x) for x in codes[i+2:i+5]); i += 4
i += 1
continue
if not p: continue
fg, bg = st["fg"] or DFG, st["bg"]
if st["rev"]: fg, bg = (bg or DBG), fg
css = "color:%s;" % fg + ("background:%s;" % bg if bg else "")
if st["b"]: css += "font-weight:700;"
if st["i"]: css += "font-style:italic;"
if st["u"]: css += "text-decoration:underline;"
if st["dim"]: css += "opacity:.6;"
spans.append('<span style="%s">%s</span>' % (css, html.escape(p)))
out.append("".join(spans))
return "\n".join(out)
def page(text, title):
return """<!doctype html><html><head><meta charset="utf-8"><style>
body{margin:0;background:#0d1117;padding:0;font-family:'DejaVu Sans Mono',monospace}
.win{display:inline-block;border-radius:10px;overflow:hidden;border:1px solid #2a2e45}
.bar{background:#24283b;height:30px;display:flex;align-items:center;padding:0 12px;gap:7px;color:#a9b1d6;font:13px system-ui,sans-serif}
.d{width:11px;height:11px;border-radius:50%%}.t{margin-left:12px}
pre{margin:0;width:120ch;height:%dem;background:#1a1b26;color:#c0caf5;font-size:13px;line-height:1.25;padding:8px 10px;font-family:'DejaVu Sans Mono',monospace;overflow:hidden}
</style></head><body><div class="win"><div class="bar"><span class="d" style="background:#f7768e"></span><span class="d" style="background:#e0af68"></span><span class="d" style="background:#9ece6a"></span><span class="t">%s</span></div><pre>%s</pre></div></body></html>""" % (ROWS*1.25, html.escape(title), conv(text))
ROWS = 34
+64
View File
@@ -0,0 +1,64 @@
# Demo-LLM für die GIFs (Englisch/Deutsch über DEMO_LANG).
import json, re, time, os
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
EN = os.environ.get("DEMO_LANG", "en") == "en"
T = (lambda en, de: en) if EN else (lambda en, de: de)
STEPS = [
{"befehl": "docker --version", "grund": T("Check whether Docker is already installed.", "Prüfen, ob Docker schon installiert ist."),
"plan": [T("Check Docker", "Docker prüfen"), T("Start nginx container", "Nginx-Container starten"), T("Test with curl", "Test mit curl")]},
{"befehl": "docker run -d --name proxy -p 80:80 -v ~/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro nginx:stable",
"grund": T("Start nginx as reverse proxy with its own config.", "Nginx als Reverse Proxy mit eigener Konfiguration starten."),
"plan": [T("Start nginx container", "Nginx-Container starten"), T("Test with curl", "Test mit curl")]},
{"befehl": "curl -sI http://localhost", "grund": T("Check that port 80 answers through the proxy.", "Prüfen, ob Port 80 über den Proxy antwortet."),
"plan": [T("Test with curl", "Test mit curl")]},
{"fertig": True, "grund": T("nginx is running and forwards port 80 to the app on :3000.", "Nginx läuft und leitet Port 80 an die App auf :3000 weiter.")},
]
ANSWER = T(
"nginx does not start because port 80 is already in use (`bind() failed`). Check who is listening:\n\n```sh\nsudo ss -tlnp | grep :80\n```\n\nIf it is an old Apache, stop it:\n\n```sh\nsudo systemctl stop apache2\n```\n",
"Nginx startet nicht, weil Port 80 schon belegt ist (`bind() failed`). Prüfe, wer lauscht:\n\n```sh\nsudo ss -tlnp | grep :80\n```\n\nIst es ein alter Apache, stoppe ihn:\n\n```sh\nsudo systemctl stop apache2\n```\n")
DISK = T(
"`/` is 4% full, so the space is likely used by Docker images or logs. Find the biggest folders:\n\n```sh\nsudo du -xh / --max-depth=2 | sort -h | tail -15\n```\n\nOld images and stopped containers:\n\n```sh\ndocker system df\n```\n",
"`/` ist zu 4 % belegt, der Platz steckt also eher in Docker-Images oder Logs. Die größten Ordner finden:\n\n```sh\nsudo du -xh / --max-depth=2 | sort -h | tail -15\n```\n\nAlte Images und gestoppte Container:\n\n```sh\ndocker system df\n```\n")
class H(BaseHTTPRequestHandler):
def log_message(self, *a): pass
def do_GET(self):
if self.path.rstrip("/").endswith("/models"):
out = json.dumps({"object": "list", "data": [{"id": m, "object": "model"} for m in ["qwen3-coder:30b", "gpt-oss:20b"]]}).encode()
self.send_response(200); self.send_header("Content-Type", "application/json"); self.send_header("Content-Length", str(len(out))); self.end_headers(); self.wfile.write(out)
else:
self.send_response(404); self.end_headers()
def do_POST(self):
body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))
sysm = body["messages"][0]["content"]; user = body["messages"][-1]["content"]
if "vervollständigst" in sysm:
typed = re.search(r"Bisher getippt: (.*)", user).group(1)
table = ["docker ps --format 'table {{.Names}}\\t{{.Status}}'", "systemctl status nginx --no-pager", "journalctl -u nginx -n 50 --no-pager", "free -h"]
out = typed
for v in table:
if typed and v.startswith(typed): out = v; break
text = json.dumps({"zeile": out})
elif "2 bis 4" in sysm:
text = json.dumps([{"befehl": "journalctl -u nginx -n 50 --no-pager", "grund": T("last log lines", "letzte Logzeilen")},
{"befehl": "sudo ss -tlnp | grep :80", "grund": T("who uses port 80", "wer belegt Port 80")},
{"befehl": "sudo nginx -t", "grund": T("check config", "Konfiguration prüfen")}])
elif "Ziel" in sysm:
n = len(re.findall(r"^\d+\. .*\((ausgeführt[^)]*|vom Menschen übersprungen)\)$", user, re.M))
text = json.dumps(STEPS[min(n, len(STEPS)-1)])
elif sysm.startswith("Antworte nur mit"):
text = "OK"
elif "disk" in user or "Platte" in user:
text = DISK
else:
text = ANSWER
if body.get("stream"):
self.send_response(200); self.send_header("Content-Type", "text/event-stream"); self.end_headers()
for i in range(0, len(text), 6):
self.wfile.write(("data: " + json.dumps({"choices": [{"delta": {"content": text[i:i+6]}}]}) + "\n\n").encode()); self.wfile.flush(); time.sleep(0.03)
self.wfile.write(b"data: [DONE]\n\n"); return
time.sleep(0.25)
out = json.dumps({"choices": [{"message": {"role": "assistant", "content": text}}]}).encode()
self.send_response(200); self.send_header("Content-Type", "application/json"); self.send_header("Content-Length", str(len(out))); self.end_headers(); self.wfile.write(out)
ThreadingHTTPServer(("127.0.0.1", 11434), H).serve_forever()
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
printf 'HTTP/1.1 200 OK\nServer: nginx/1.26.2\nContent-Type: text/html; charset=utf-8\n'
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
case "$1" in
--version) echo "Docker version 27.3.1, build ce12230" ;;
run) echo "Unable to find image 'nginx:stable' locally"; sleep 0.4; echo "stable: Pulling from library/nginx"; sleep 0.3; echo "Status: Downloaded newer image for nginx:stable"; echo "3f9c1e7b2a4d8e6f0c5b9a1d7e3f2c4b6a8d0e1f3c5b7a9d1e3f5c7b9a1d3e5f" ;;
ps) printf 'NAMES STATUS\nproxy Up 2 minutes\napp Up 3 days\n' ;;
*) echo "docker: '$1' is not a docker command." ;;
esac
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
printf ' total used free shared buff/cache available\nMem: 119Gi 14Gi 92Gi 1.1Gi 13Gi 104Gi\nSwap: 8.0Gi 0B 8.0Gi\n'
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
echo 'LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("apache2",pid=912,fd=4))'
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
exec "$@"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
printf '\033[1;31m×\033[0m nginx.service - A high performance web server and a reverse proxy server\n Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)\n Active: \033[1;31mfailed\033[0m (Result: exit-code) since Fri 2026-11-06 07:12:41 CET; 4s ago\n Process: 4711 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)\n\nNov 06 07:12:41 web-01 nginx[4711]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)\nNov 06 07:12:41 web-01 systemd[1]: nginx.service: Failed with result '"'"'exit-code'"'"'.\n'
exit 3
+11
View File
@@ -0,0 +1,11 @@
import sys, shutil
from record import Rec
lang = sys.argv[1]; home = f"/tmp/st/home-{lang}"
shutil.rmtree(home, ignore_errors=True)
r = Rec(lang, home, "--no-intro")
r.wait(2); r.type("demo1234", 0.02); r.k("Tab"); r.type("demo1234", 0.02); r.k("Enter", d=2); r.k("Escape", d=0.8)
for alias, host, user, tags in [("web-01", "127.0.0.1", "dominik", "web"), ("db-01", "127.0.0.2", "postgres", "db"), ("spark", "127.0.0.3", "dominik", "lab")]:
r.k("n", d=1); r.type(alias, 0.01); r.k("Tab"); r.type(host, 0.01); r.k("Tab"); r.k("BSpace", "BSpace", d=0.2); r.type("2222", 0.01); r.k("Tab")
r.type(user, 0.01); r.k("Tab"); r.k("Right", "Right", d=0.3); r.k("Tab"); r.type("secret", 0.01); r.k("Tab", "Tab", d=0.3); r.type(tags, 0.01); r.k("C-s", d=1)
print(r.screen())
r.stop = True; import subprocess; subprocess.run(["tmux", "kill-session", "-t", "g"])
+61
View File
@@ -0,0 +1,61 @@
import subprocess as sp, time, threading, sys, os, shutil, json
sys.path.insert(0, os.path.dirname(__file__))
import ansiconv
S = os.path.dirname(os.path.abspath(__file__))
BIN = os.environ.get("SSHTERMY_BIN", "/tmp/st/sshtermy")
OUT = os.environ.get("GIF_OUT", os.path.join(S, "out"))
COLS, ROWS = 120, 34
ansiconv.ROWS = ROWS
def tm(*a): return sp.run(["tmux", *a], capture_output=True, text=True).stdout
class Rec:
def __init__(self, lang, home, args=""):
self.lang = lang
tm("kill-session", "-t", "g")
loc = "en_US.UTF-8" if lang == "en" else "de_DE.UTF-8"
tm("new-session", "-d", "-s", "g", "-x", str(COLS), "-y", str(ROWS),
f"SSHTERMY_HOME={home} LANG={loc} LC_ALL={loc} TERM=xterm-256color {BIN} {args}")
self.frames, self.on, self.stop = [], False, False
self.t = threading.Thread(target=self.loop, daemon=True); self.t.start()
def loop(self):
while not self.stop:
if self.on:
s = tm("capture-pane", "-e", "-p", "-t", "g")
if not self.frames or self.frames[-1][1] != s:
self.frames.append((time.time(), s))
time.sleep(0.08)
def k(self, *keys, d=0.5):
for key in keys: tm("send-keys", "-t", "g", key)
time.sleep(d)
def type(self, text, d=0.07, after=0.4):
for ch in text:
tm("send-keys", "-t", "g", "-l", ch); time.sleep(d)
time.sleep(after)
def wait(self, s): time.sleep(s)
def screen(self): return tm("capture-pane", "-p", "-t", "g")
def until(self, text, timeout=10):
end = time.time() + timeout
while time.time() < end:
if text in self.screen(): return True
time.sleep(0.1)
print("TIMEOUT waiting for", repr(text)); print(self.screen()); return False
def finish(self, name, hold=3.0):
time.sleep(0.3); self.stop = True; self.t.join()
tm("kill-session", "-t", "g")
render(self.frames, name, hold)
def render(frames, name, hold):
d = os.path.join(OUT, "frames", name); shutil.rmtree(d, ignore_errors=True); os.makedirs(d)
lines = []
for i, (ts, s) in enumerate(frames):
open(f"{d}/{i:04d}.html", "w", encoding="utf-8").write(ansiconv.page(s, "sshTermy"))
dur = (frames[i+1][0] - ts) if i + 1 < len(frames) else hold
lines += [f"file '{d}/{i:04d}.png'", f"duration {max(dur, 0.04):.3f}"]
sp.run(["node", os.path.join(S, "shot.js"), d, str(len(frames))], check=True)
lines.append(f"file '{d}/{len(frames)-1:04d}.png'")
open(f"{d}/list.txt", "w").write("\n".join(lines) + "\n")
out = os.path.join(OUT, name + ".gif"); os.makedirs(os.path.dirname(out), exist_ok=True)
sp.run(["ffmpeg", "-y", "-loglevel", "error", "-f", "concat", "-safe", "0", "-i", f"{d}/list.txt",
"-vf", "split[a][b];[a]palettegen=max_colors=128:stats_mode=full[p];[b][p]paletteuse=dither=none", "-loop", "0", out], check=True)
print(name, len(frames), "frames", os.path.getsize(out) // 1024, "KB")
+45
View File
@@ -0,0 +1,45 @@
import sys
from record import Rec
lang = sys.argv[1]; which = sys.argv[2:]
home = f"/tmp/st/home-{lang}"
L = lambda en, de: en if lang == "en" else de
def connected(args="--no-intro"):
r = Rec(lang, home, args)
r.wait(1.5); r.type("demo1234", 0.01); r.k("Enter", d=1.5)
r.k("Down", "Down", "Down", d=0.3); r.k("Enter"); r.until("dgx-spark"); r.wait(1.5)
return r
def start():
r = Rec(lang, home, ""); r.on = True
r.wait(4.5); r.type("demo1234", 0.09, 0.4); r.k("Enter", d=2)
r.k("Down", d=0.6); r.k("Down", d=0.6); r.k("Down", d=1); r.k("Enter"); r.until("dgx-spark"); r.wait(1.5)
r.type("free -h", 0.1, 0.8); r.k("Enter", d=2.5)
r.finish("start-" + lang)
def goal():
r = connected(); r.on = True; r.wait(0.8)
r.k("F2", d=0.8); r.type(L("Set up nginx as reverse proxy for my app on :3000", "Nginx als Reverse Proxy für meine App auf :3000 einrichten"), 0.045, 0.6)
r.k("Enter"); r.until("docker --version"); r.wait(2)
r.k("Enter"); r.until("docker run"); r.wait(2.5)
r.k("Enter"); r.until("curl -sI"); r.wait(2.5)
r.k("Enter"); r.until(L("forwards port 80", "leitet Port 80"), 15); r.wait(1)
r.finish("goal-" + lang, 4)
def ghost():
r = connected(); r.on = True; r.wait(0.8)
r.type("sys", 0.25, 1.6); r.k("Tab", d=1.2); r.k("Enter", d=3.5)
r.k("M-0", d=5)
r.k("1", d=1.5); r.k("Enter", d=3)
r.finish("ghost-" + lang, 4)
def palette():
r = connected(); r.on = True; r.wait(0.8)
r.k("C-Space", d=2)
r.type("tun", 0.25, 2)
r.k("C-u", d=0.6)
r.type(L("why is the disk full", "warum ist die Platte voll"), 0.06, 1.5)
r.k("Tab"); r.until("docker system df", 10); r.wait(1)
r.finish("palette-" + lang, 4)
for w in which: globals()[w]()
+12
View File
@@ -0,0 +1,12 @@
const { chromium } = require('playwright');
(async () => {
const dir = process.argv[2], n = +process.argv[3];
const b = await chromium.launch(); const p = await b.newPage({ deviceScaleFactor: 1, viewport: { width: 1200, height: 900 } });
const fs = require('fs');
for (let i = 0; i < n; i++) {
const f = `${dir}/${String(i).padStart(4, '0')}`;
await p.setContent(fs.readFileSync(f + '.html', 'utf8'));
await p.locator('.win').screenshot({ path: f + '.png' });
}
await b.close();
})();