SSH Workspace
SSH Workspace is a small Visual Studio Code extension for users who are already connected to a Linux server through VS Code Remote-SSH. It does not create SSH connections, manage SSH hosts, or edit SSH configuration files.
This project was developed with support from ChatGPT. The extension scope, behavior, and final code decisions remain project-owned and reviewable in this repository.
Überblick
SSH Workspace ist eine kleine VS-Code-Extension für Remote-SSH-Workspaces. Sie hilft dabei, wichtige Serverdateien bewusst zu tracken, einfache Systeminfos zu sehen und Notizen direkt auf dem verbundenen Server abzulegen.
Die Extension läuft im bereits verbundenen Remote-Workspace. Remote-SSH bleibt für Verbindung, Authentifizierung und Host-Verwaltung zuständig.
Funktionen
- Eigener Activity-Bar-Bereich
SSH Workspace
- Views:
Aktionen, Arbeitsseite, System, Notizen
- Initialisierung von
~/.ssh-workspace/ auf dem Remote-Host
- Datei-Tracking für bewusst ausgewählte Serverdateien
- Klarname und Kommentar pro getrackter Datei
- Optionale Start/Stop/Restart-Befehle pro getrackter Datei
- Optionaler Systemd-Service pro Datei für automatische Standardaktionen
- Zusätzliche frei benennbare Befehle pro Datei
- Drag-and-Drop-Sortierung in der Arbeitsliste
- Rohlog für erkannte Änderungen an getrackten Dateien
- Systeminfos wie Hostname, OS, Kernel, Architektur und Haupt-IP
- Notizen in
NOTIZEN.md
- Manuell pflegbarer Systemstatus in
SYSTEMSTATUS.md
- Sprachumschaltung Deutsch/Englisch über
sshWorkspace.language
Nicht enthalten
- Keine eigene SSH-Verbindung
- Keine SSH-Config-Verwaltung
- Keine Server-/Host-Merkliste
- Keine Services oder Hintergrundkomponente
- Keine Webview
- Kein Cockpit-Ersatz
- Kein automatisches Tracking beliebiger Terminal-Edits
- Kein Parsing von
~/.bash_history als Rohlog-Quelle
Dateien, die mit nano, vim, cat > file oder sudo im Terminal bearbeitet werden, werden nicht automatisch entdeckt. Sobald eine Datei einmal getrackt ist, kann Aktualisieren ihre Metadaten und Änderungen erfassen.
~/.bash_history ist bewusst nicht Teil des Rohlogs. Die Shell-History ist in Linux typischerweise benutzerbezogen statt repo-bezogen, oft zeitversetzt geschrieben und bei sudo oder su schnell unvollständig.
Remote-Dateien
Beim Initialisieren legt die Extension auf dem verbundenen Remote-Host diesen Ordner an:
~/.ssh-workspace/
Darin liegen:
SYSTEMSTATUS.md
NOTIZEN.md
workspace-data.json
Vor dem Command SSH Workspace: Initialisieren wird nichts auf dem Server angelegt.
Hinweis zur Umbenennung: Aeltere Versionen haben ihre Remote-Daten unter ~/.ssh-server-workspace/ gespeichert. Die aktuelle Version verwendet ~/.ssh-workspace/. Falls du bestehende Daten uebernehmen willst, musst du sie auf dem Remote-Host einmalig in den neuen Ordner kopieren oder verschieben.
Aktionen
Bündelt die globalen Befehle:
- Initialisieren
- Aktualisieren
- Pfad tracken
- Aktuelle Datei tracken
- Notiz hinzufügen
- Daten neu erstellen
Arbeitsseite
Die Arbeitsseite besteht aus:
Arbeitsliste: bewusst getrackte Dateien
Rohlog: erkannte Änderungen im Format Datum Uhrzeit | Pfad
Eine Datei kann auf zwei Wegen aufgenommen werden:
Aktuelle Datei tracken: trackt die Datei, die gerade im VS-Code-Editor aktiv ist
Pfad tracken: nimmt einen absoluten Remote-Pfad auf, zum Beispiel /etc/systemd/system/hostapd-healthcheck.timer
Pro getrackter Datei können Klarname und Kommentar gepflegt werden. Die Arbeitsliste kann per Drag and Drop manuell sortiert werden. Interne Server-Workspace-Dateien wie NOTIZEN.md, SYSTEMSTATUS.md und workspace-data.json werden nicht in der Arbeitsliste angezeigt.
Zusätzlich kann jede getrackte Datei einen optionalen Systemd-Service hinterlegen, zum Beispiel nginx.service. Dann werden Starten, Stoppen, Neustarten und Status automatisch über systemctl im integrierten Remote-Terminal ausgeführt.
Für Sonderfälle können Standardaktionen weiterhin mit eigenen Shell-Befehlen überschrieben werden. Außerdem lassen sich pro Datei zusätzliche frei benennbare Befehle anlegen und später wieder entfernen.
System
Zeigt einfache Systeminfos:
- Hostname
- OS-Name
- OS-Version
- Kernel
- Architektur
- Haupt-IP
- letzter Refresh
Notizen
Die Notizen-View bietet:
Notiz hinzufügen: schreibt eine neue Zeile in NOTIZEN.md
NOTIZEN.md: öffnet die Notizdatei zur freien Bearbeitung
SYSTEMSTATUS.md: öffnet die Datei für Rolle, Zweck und Bemerkungen
- Anzeige der letzten Notizzeilen
Installation zum Testen
Abhängigkeiten installieren und kompilieren:
npm install
npm run compile
VSIX bauen:
npm run package
Danach im Remote-SSH-Fenster:
Extensions: Install from VSIX... ausführen.
- Die erzeugte Datei
ssh-workspace-*.vsix auswählen.
Developer: Reload Window ausführen.
- In der Activity Bar
SSH Workspace öffnen.
- In
Aktionen den Command Initialisieren ausführen.
Sprache umschalten
Die Extension bringt eine eigene Einstellung mit:
"sshWorkspace.language": "de"
Mögliche Werte:
Die Einstellung wirkt auf Tree-View-Inhalte, Eingabedialoge und Benachrichtigungen der Extension. VS-Code-Manifest-Texte wie View-Namen und Command-Palette-Titel sind statisch und können von VS Code nicht vollständig zur Laufzeit über eine Extension-eigene Einstellung umgeschaltet werden.
Entwicklung
npm install
npm run compile
npm run package
Die Extension ist als Workspace-Extension konfiguriert:
"extensionKind": ["workspace"]
Damit ist sie für den Einsatz im Remote-SSH-Workspace gedacht.
KI-Unterstützung
ChatGPT war an Planung, Code-Erstellung und Iteration dieser Extension beteiligt. Der Einsatz von ChatGPT ist hier transparent dokumentiert; die Extension bleibt ein normales, prüfbares Open-Source-Projekt.
Overview
SSH Workspace is a small VS Code extension for Remote-SSH workspaces. It helps users deliberately track important server files, view basic system information, and keep notes directly on the connected server.
The extension runs inside an already connected remote workspace. VS Code Remote-SSH remains responsible for connection handling, authentication, and host management.
Features
- Dedicated
SSH Workspace Activity Bar container
- Views:
Aktionen (Actions), Arbeitsseite (Work Page), System, Notizen (Notes)
- Initializes
~/.ssh-workspace/ on the remote host
- File tracking for deliberately selected server files
- Display name and comment per tracked file
- Optional start/stop/restart commands per tracked file
- Optional systemd service per file for automatic default actions
- Additional custom-named commands per file
- Drag-and-drop ordering in the work list
- Raw log for detected changes in tracked files
- System information such as hostname, OS, kernel, architecture, and main IP
- Notes in
NOTIZEN.md
- Manually maintained system status in
SYSTEMSTATUS.md
- German/English language switch through
sshWorkspace.language
Not Included
- No SSH connection handling
- No SSH config management
- No saved SSH host list
- No service or background backend component
- No webview
- No Cockpit replacement
- No automatic tracking of arbitrary terminal edits
- No parsing of
~/.bash_history as a raw-log source
Files edited through nano, vim, cat > file, or sudo in a terminal are not discovered automatically. Once a file is tracked, Refresh can update its metadata and detect changes.
~/.bash_history is intentionally not used for the raw log. On Linux, shell history is usually user-scoped rather than repo-scoped, often written late, and becomes unreliable quickly once sudo or su gets involved.
Remote Files
Initialization creates this folder on the connected remote host:
~/.ssh-workspace/
It contains:
SYSTEMSTATUS.md
NOTIZEN.md
workspace-data.json
No server-side files are created before running SSH Workspace: Initialisieren.
Aktionen
Collects global commands:
- Initialisieren (initialize)
- Aktualisieren (refresh)
- Pfad tracken (track path)
- Aktuelle Datei tracken (track current file)
- Notiz hinzufügen (add note)
- Daten neu erstellen (recreate data)
Arbeitsseite
The work page contains:
Arbeitsliste: deliberately tracked files
Rohlog: detected changes in the format date time | path
A file can be added in two ways:
Aktuelle Datei tracken: tracks the file currently active in the VS Code editor
Pfad tracken: tracks an absolute remote path, for example /etc/systemd/system/hostapd-healthcheck.timer
Each tracked file can have a display name and a comment. The work list can be manually sorted with drag and drop. Internal SSH Workspace files such as NOTIZEN.md, SYSTEMSTATUS.md, and workspace-data.json are hidden from the work list.
Each tracked file can also store an optional systemd service such as nginx.service. When set, Start, Stop, Restart, and Status are derived automatically through systemctl and executed in the integrated remote terminal.
For special cases, these default actions can still be overridden with custom shell commands. In addition, each tracked file can store extra custom-named commands that can be added and removed later.
System
Shows basic system information:
- Hostname
- OS name
- OS version
- Kernel
- Architecture
- Main IP
- Last refresh
Notizen
The notes view offers:
Notiz hinzufügen: appends a new line to NOTIZEN.md
NOTIZEN.md: opens the notes file for manual editing
SYSTEMSTATUS.md: opens the file for role, purpose, and remarks
- A preview of the latest note lines
Test Installation
Install dependencies and compile:
npm install
npm run compile
Build a VSIX:
npm run package
Then, in the Remote-SSH window:
- Run
Extensions: Install from VSIX....
- Select the generated
ssh-workspace-*.vsix file.
- Run
Developer: Reload Window.
- Open
SSH Workspace in the Activity Bar.
- Run
Initialisieren from the Aktionen view.
Language Setting
The extension provides its own setting:
"sshWorkspace.language": "en"
Supported values:
The setting affects tree view contents, input prompts, and notifications provided by the extension. VS Code manifest texts such as view names and command palette titles are static and cannot be fully switched at runtime through an extension-specific setting.
Development
npm install
npm run compile
npm run package
The extension is configured as a workspace extension:
"extensionKind": ["workspace"]
It is intended to run inside the Remote-SSH workspace.
AI Assistance
ChatGPT assisted with planning, code generation, and iteration for this extension. This involvement is documented transparently; the extension remains a normal, reviewable open-source project.