deskssh 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +26 -55
  2. package/bin/deskssh.js +36 -0
  3. package/dist/server.js +851 -0
  4. package/dist/web/assets/index-Bf6XF_tt.css +32 -0
  5. package/dist/web/assets/index-D17lV7-E.js +234 -0
  6. package/{packages/web/dist → dist/web}/index.html +3 -2
  7. package/package.json +34 -38
  8. package/.eslintrc.cjs +0 -21
  9. package/.github/workflows/ci.yml +0 -40
  10. package/.prettierignore +0 -5
  11. package/.prettierrc.json +0 -6
  12. package/CONTRIBUTING.md +0 -59
  13. package/LICENSE +0 -661
  14. package/packages/cli/README.md +0 -11
  15. package/packages/cli/bin/deskssh.js +0 -12
  16. package/packages/cli/package.json +0 -37
  17. package/packages/core/dist/index.d.ts +0 -2
  18. package/packages/core/dist/index.d.ts.map +0 -1
  19. package/packages/core/dist/index.js +0 -6
  20. package/packages/core/dist/index.js.map +0 -1
  21. package/packages/core/package.json +0 -22
  22. package/packages/core/src/index.test.ts +0 -8
  23. package/packages/core/src/index.ts +0 -6
  24. package/packages/core/tsconfig.json +0 -9
  25. package/packages/server/dist/index.d.ts +0 -3
  26. package/packages/server/dist/index.d.ts.map +0 -1
  27. package/packages/server/dist/index.js +0 -7
  28. package/packages/server/dist/index.js.map +0 -1
  29. package/packages/server/package.json +0 -19
  30. package/packages/server/src/index.ts +0 -8
  31. package/packages/server/tsconfig.json +0 -10
  32. package/packages/web/dist/assets/index-DNUNZ8WK.js +0 -65
  33. package/packages/web/index.html +0 -12
  34. package/packages/web/node_modules/.bin/browserslist +0 -17
  35. package/packages/web/node_modules/.bin/vite +0 -17
  36. package/packages/web/package.json +0 -27
  37. package/packages/web/src/App.tsx +0 -17
  38. package/packages/web/src/i18n/en.ts +0 -8
  39. package/packages/web/src/i18n/es.ts +0 -7
  40. package/packages/web/src/i18n/index.ts +0 -27
  41. package/packages/web/src/main.tsx +0 -12
  42. package/packages/web/tsconfig.json +0 -14
  43. package/packages/web/vite.config.ts +0 -6
  44. package/pnpm-workspace.yaml +0 -2
  45. package/specs/001-core/plan.md +0 -246
  46. package/specs/001-core/spec.md +0 -206
  47. package/specs/001-core/tasks.md +0 -110
  48. package/specs/constitution.md +0 -110
  49. package/specs/glossary.md +0 -35
  50. package/specs/vision.md +0 -145
  51. package/tsconfig.base.json +0 -23
  52. package/tsconfig.json +0 -4
  53. package/vitest.config.ts +0 -7
package/README.md CHANGED
@@ -1,66 +1,37 @@
1
- <h1 align="center">DeskSSH</h1>
1
+ # DeskSSH
2
2
 
3
- <p align="center">
4
- <strong>A graphical desktop over plain SSH.</strong><br>
5
- The GUI is synthesized on the client; every action is translated into commands
6
- executed on the remote host. <em>It is not remote desktop.</em>
7
- </p>
3
+ **A graphical desktop over plain SSH.** The GUI is synthesized on the client and
4
+ every action is translated into commands executed on the remote host. _Not remote
5
+ desktop. Agentless._
8
6
 
9
- ---
7
+ ## Run it
10
8
 
11
- ## What is it?
9
+ DeskSSH runs on **your** machine and connects to **your** servers. No install:
12
10
 
13
- You connect via SSH to a server **with no graphical environment** and DeskSSH
14
- shows you a familiar desktop —file manager, terminal, system monitor, editor,
15
- service manager…—. Behind the scenes, every click runs the equivalent command
16
- (`ls`, `stat`, `mv`, `systemctl`, `ps`…) and the interface is built from its
17
- output.
11
+ ```bash
12
+ npx deskssh
13
+ ```
18
14
 
19
- ### What makes it different
15
+ …or install it globally:
20
16
 
21
- - **Not VNC/RDP/X.** No pixels travel: the GUI is generated locally.
22
- - **Agentless.** Installs nothing on the server; only needs SSH and standard POSIX
23
- utilities.
24
- - **Transparent.** You can always see the command behind each action.
25
- - **100% open source.**
17
+ ```bash
18
+ npm install -g deskssh
19
+ deskssh
20
+ ```
26
21
 
27
- ## Origin and motivation
22
+ This starts DeskSSH on `http://127.0.0.1:8717` and opens your browser. Enter a
23
+ server's host, port, user and a password or private key, and you get a familiar
24
+ desktop — file manager, terminal, text editor (Stallman), system monitor — all
25
+ over plain SSH.
28
26
 
29
- DeskSSH started as a project in **ASP.NET with .NET 8**. As it grew, I felt
30
- overwhelmed by the sheer number of commands and cases the tool could end up
31
- covering. I began reviewing and improving the code with the help of AI, but ended
32
- up making a more radical decision: **restart the project from scratch**, also with
33
- AI, in order to:
27
+ > It binds to `127.0.0.1` by default (it is an SSH gateway and should not be
28
+ > exposed by accident). Override with `HOST` / `PORT` env vars if you know what
29
+ > you're doing.
34
30
 
35
- - use languages and technologies **more widely accepted by the community**, and
36
- - leverage **npm's ease of distribution** for simple adoption.
31
+ Requirements: **Node.js >= 20**. Remote host: a Linux server with SSH
32
+ (Debian/Ubuntu/Mint in v1).
37
33
 
38
- This rewrite is developed with **Spec-Driven Development**: decisions are
39
- documented in `specs/` before any code is written.
34
+ ## Links
40
35
 
41
- The reason for making it **open source** is simple: I want DeskSSH to become a
42
- **genuinely useful and popular** tool, built and improved by the community.
43
-
44
- ## Status
45
-
46
- 🚧 **In design.** The project is developed with **Spec-Driven Development**: right
47
- now only the specification exists; code comes later. Start with:
48
-
49
- - [`specs/vision.md`](specs/vision.md) — the why and the where-to (the vision).
50
- - [`specs/constitution.md`](specs/constitution.md) — the project's principles.
51
- - [`specs/001-core/spec.md`](specs/001-core/spec.md) — what DeskSSH does.
52
- - [`specs/001-core/plan.md`](specs/001-core/plan.md) — how it will be built.
53
- - [`specs/glossary.md`](specs/glossary.md) — the domain vocabulary.
54
-
55
- ## How to contribute
56
-
57
- This project follows SDD: design discussions happen in `specs/` **before** they
58
- reach the code. To propose something, open the conversation on the relevant
59
- document. (Detailed contribution guide: pending — `M0`.)
60
-
61
- ## License
62
-
63
- [**GNU AGPL-3.0-or-later**](LICENSE). Strong copyleft with a network clause: if you
64
- modify DeskSSH and offer it as a network-accessible service, you must publish your
65
- changes. Chosen so the project and all its improvements stay free. See
66
- [`specs/constitution.md`](specs/constitution.md), Article 9.
36
+ - Repository & docs: https://github.com/nestorrguez/DeskSSH
37
+ - License: **AGPL-3.0-or-later**
package/bin/deskssh.js ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ // DeskSSH launcher. Starts the gateway (which also serves the web UI) on
3
+ // 127.0.0.1 and opens the browser. DeskSSH runs on *your* machine and connects to
4
+ // *your* servers; it binds to localhost so it is never exposed by accident.
5
+
6
+ import { spawn } from 'node:child_process';
7
+ import { fileURLToPath } from 'node:url';
8
+ import { dirname, join } from 'node:path';
9
+ import { startGateway } from '../dist/server.js';
10
+
11
+ const here = dirname(fileURLToPath(import.meta.url));
12
+ const staticDir = join(here, '..', 'dist', 'web');
13
+
14
+ const port = Number(process.env.PORT ?? 8717);
15
+ const host = process.env.HOST ?? '127.0.0.1';
16
+ const url = `http://${host}:${port}`;
17
+
18
+ startGateway({ port, host, staticDir });
19
+
20
+ console.log(`\n DeskSSH is running at ${url}\n Press Ctrl+C to stop.\n`);
21
+
22
+ if (process.env.DESKSSH_NO_OPEN !== '1') openBrowser(url);
23
+
24
+ function openBrowser(target) {
25
+ const cmd =
26
+ process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
27
+ try {
28
+ spawn(cmd, [target], {
29
+ stdio: 'ignore',
30
+ detached: true,
31
+ shell: process.platform === 'win32',
32
+ }).unref();
33
+ } catch {
34
+ // Opening the browser is best-effort; the URL is printed above.
35
+ }
36
+ }