@fabioplunser/epd 0.5.11 → 0.5.13

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.
package/README.md CHANGED
@@ -32,20 +32,23 @@ across every server's replicas, so one machine can serve while another is down.
32
32
 
33
33
  ## Install
34
34
 
35
- ### Global CLI via NPM or Bun
35
+ ### Option 1: Zero-Dependency Standalone Installer (Recommended)
36
+
37
+ Installs the self-contained, pre-compiled standalone binary for Linux (`x64` / `arm64`) or macOS (`Apple Silicon` / `Intel`). **No Node.js, Bun, or NPM runtime required:**
36
38
 
37
39
  ```bash
38
- npm install -g @fabioplunser/epd
39
- # or
40
- bun install -g @fabioplunser/epd
40
+ curl -fsSL https://raw.githubusercontent.com/FabioPlunser/epd/main/install.sh | bash
41
41
  ```
42
42
 
43
- Once installed, use `epd` anywhere:
43
+ ### Option 2: Global CLI via Bun or NPM
44
+
44
45
  ```bash
45
- epd --help
46
+ bun install -g @fabioplunser/epd
47
+ # or
48
+ npm install -g @fabioplunser/epd
46
49
  ```
47
50
 
48
- ### Run directly without installing (npx / bunx)
51
+ ### Option 3: Run directly without installing (npx / bunx)
49
52
 
50
53
  ```bash
51
54
  npx @fabioplunser/epd deploy
@@ -53,17 +56,7 @@ npx @fabioplunser/epd deploy
53
56
  bunx @fabioplunser/epd deploy
54
57
  ```
55
58
 
56
- ### Standalone Precompiled Executables (Zero Runtime Dependencies)
57
-
58
- Download single-file standalone binaries directly from [GitHub Releases](https://github.com/FabioPlunser/epd/releases):
59
- - `epd-linux-x64` / `epd-linux-arm64`
60
- - `epd-darwin-x64` / `epd-darwin-arm64` (macOS Intel & Apple Silicon)
61
- - `epd-windows-x64.exe`
62
-
63
- ```bash
64
- curl -fsSL https://github.com/FabioPlunser/epd/releases/latest/download/epd-linux-x64 -o /usr/local/bin/epd
65
- chmod +x /usr/local/bin/epd
66
- ```
59
+ Standalone binaries are also downloadable directly from [GitHub Releases](https://github.com/FabioPlunser/epd/releases).
67
60
 
68
61
  ### From source
69
62
 
package/dist/cli.js CHANGED
@@ -2579,6 +2579,9 @@ var init_bootstrap = __esm(() => {
2579
2579
  import { chmodSync as chmodSync2, existsSync as existsSync5, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
2580
2580
  import { tmpdir } from "os";
2581
2581
  import { join as join5 } from "path";
2582
+ function setSudoPassword(key, pw) {
2583
+ sudoPasswords.set(key, pw);
2584
+ }
2582
2585
  function needsSudoPassword(res) {
2583
2586
  return /a password is required|no tty present|a terminal is required|incorrect password attempt|Sorry, try again/i.test(`${res.stderr}
2584
2587
  ${res.stdout}`);
@@ -2810,8 +2813,8 @@ var init_ssh = __esm(() => {
2810
2813
  });
2811
2814
 
2812
2815
  // src/core/ssh-setup.ts
2813
- import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync5 } from "fs";
2814
- import { homedir as homedir3 } from "os";
2816
+ import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync5, unlinkSync, writeFileSync as writeFileSync5 } from "fs";
2817
+ import { homedir as homedir3, tmpdir as tmpdir2 } from "os";
2815
2818
  import { join as join6 } from "path";
2816
2819
  async function prepareSsh(host, canInstallKey = interactive()) {
2817
2820
  const probe = () => run([
@@ -2834,7 +2837,11 @@ async function prepareSsh(host, canInstallKey = interactive()) {
2834
2837
  }
2835
2838
  const setup = setupQueue.then(async () => {
2836
2839
  const key = await publicKeyFor(host);
2837
- log.info(`${host.target}: installing a public SSH key; SSH may ask for the account password or key passphrase`);
2840
+ log.info(`${host.target}: setting up SSH key authentication...`);
2841
+ let password = "";
2842
+ if (interactive()) {
2843
+ password = await askPassword(`Enter SSH password for ${host.target} to install public key: `);
2844
+ }
2838
2845
  const script = `set -eu
2839
2846
  umask 077
2840
2847
  mkdir -p "$HOME/.ssh"
@@ -2842,20 +2849,67 @@ chmod 700 "$HOME/.ssh"
2842
2849
  touch "$HOME/.ssh/authorized_keys"
2843
2850
  chmod 600 "$HOME/.ssh/authorized_keys"
2844
2851
  grep -qxF -- ${shq(key)} "$HOME/.ssh/authorized_keys" || printf '\\n%s\\n' ${shq(key)} >> "$HOME/.ssh/authorized_keys"`;
2845
- const installed = await run([
2846
- "ssh",
2847
- "-o",
2848
- "BatchMode=no",
2849
- "-o",
2850
- "ControlPath=none",
2851
- "-o",
2852
- "PreferredAuthentications=keyboard-interactive,password,publickey",
2853
- ...host.sshOptions(),
2854
- host.target,
2855
- "--",
2856
- script
2857
- ], { stream: true, allowFailure: true, label: `${host.target}: install public key` });
2858
- if (installed.code !== 0) {
2852
+ let installedCode = 1;
2853
+ if (password) {
2854
+ const askpassScript = join6(tmpdir2(), `epd-askpass-${Date.now()}-${Math.random().toString(36).slice(2)}.sh`);
2855
+ try {
2856
+ writeFileSync5(askpassScript, `#!/bin/sh
2857
+ cat << 'EPDEOF'
2858
+ ${password}
2859
+ EPDEOF
2860
+ `, { mode: 448 });
2861
+ const res = await run([
2862
+ "ssh",
2863
+ "-o",
2864
+ "BatchMode=no",
2865
+ "-o",
2866
+ "ControlPath=none",
2867
+ "-o",
2868
+ "StrictHostKeyChecking=accept-new",
2869
+ "-o",
2870
+ "PreferredAuthentications=password,keyboard-interactive",
2871
+ ...host.sshOptions(),
2872
+ host.target,
2873
+ "--",
2874
+ script
2875
+ ], {
2876
+ env: {
2877
+ SSH_ASKPASS: askpassScript,
2878
+ SSH_ASKPASS_REQUIRE: "force",
2879
+ DISPLAY: ":0"
2880
+ },
2881
+ allowFailure: true,
2882
+ label: `${host.target}: install public key`
2883
+ });
2884
+ installedCode = res.code;
2885
+ if (installedCode === 0) {
2886
+ setSudoPassword(host.sudoKey, password);
2887
+ }
2888
+ } finally {
2889
+ if (existsSync6(askpassScript))
2890
+ unlinkSync(askpassScript);
2891
+ }
2892
+ }
2893
+ if (installedCode !== 0) {
2894
+ log.info(`${host.target}: installing public key via terminal login prompt...`);
2895
+ const installed = await run([
2896
+ "ssh",
2897
+ "-o",
2898
+ "BatchMode=no",
2899
+ "-o",
2900
+ "ControlPath=none",
2901
+ "-o",
2902
+ "StrictHostKeyChecking=accept-new",
2903
+ "-o",
2904
+ "PreferredAuthentications=keyboard-interactive,password,publickey",
2905
+ ...host.sshOptions(),
2906
+ host.target,
2907
+ "--",
2908
+ script
2909
+ ], { stream: true, allowFailure: true, label: `${host.target}: install public key` });
2910
+ installedCode = installed.code;
2911
+ }
2912
+ if (installedCode !== 0) {
2859
2913
  throw new EpdError(`Could not install an SSH key for ${host.target}`, "Authorize the public key through your server provider or another administrator if password login is disabled.");
2860
2914
  }
2861
2915
  const verified = await probe();
@@ -2896,7 +2950,7 @@ async function publicKeyFor(host) {
2896
2950
  return validateKey(keys[Number(selected)]);
2897
2951
  }
2898
2952
  const sshDir = join6(homedir3(), ".ssh");
2899
- for (const name of ["id_ed25519", "id_ecdsa", "id_rsa"]) {
2953
+ for (const name of ["id_ed25519", "gh_deploy", "id_ecdsa", "id_rsa"]) {
2900
2954
  const path = join6(sshDir, `${name}.pub`);
2901
2955
  if (existsSync6(path))
2902
2956
  return validateKey(readFileSync5(path, "utf8"));
@@ -2906,8 +2960,8 @@ async function publicKeyFor(host) {
2906
2960
  throw new EpdError(`Missing public key for ${keyPath}`, "Load it with ssh-add, or set ssh.key to its path, then retry.");
2907
2961
  }
2908
2962
  mkdirSync5(sshDir, { recursive: true, mode: 448 });
2909
- log.info(`Creating ${keyPath}; ssh-keygen will ask you for a passphrase`);
2910
- const generated = await run(["ssh-keygen", "-t", "ed25519", "-f", keyPath, "-C", "epd"], { stream: true, allowFailure: true });
2963
+ log.info(`Creating ${keyPath} with ed25519 algorithm...`);
2964
+ const generated = await run(["ssh-keygen", "-t", "ed25519", "-f", keyPath, "-N", "", "-C", "epd"], { stream: true, allowFailure: true });
2911
2965
  if (generated.code !== 0)
2912
2966
  throw new EpdError("SSH key generation failed");
2913
2967
  const loaded = await run(["ssh-add", keyPath], { stream: true, allowFailure: true });
@@ -2928,11 +2982,12 @@ var init_ssh_setup = __esm(() => {
2928
2982
  init_prompt();
2929
2983
  init_proc();
2930
2984
  init_misc();
2985
+ init_ssh();
2931
2986
  setupQueue = Promise.resolve();
2932
2987
  });
2933
2988
 
2934
2989
  // src/proxy/detect.ts
2935
- import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "fs";
2990
+ import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync6 } from "fs";
2936
2991
  import { basename as basename2, resolve as resolve2 } from "path";
2937
2992
  async function detectExistingProxy(host, checkPorts = [80, 443]) {
2938
2993
  const portsSet = new Set(checkPorts);
@@ -3161,7 +3216,7 @@ function updateLocalConfigDisableProxy(configPath = "epd.yml") {
3161
3216
  `);
3162
3217
  }
3163
3218
  if (updated !== raw) {
3164
- writeFileSync5(configFile, updated, "utf8");
3219
+ writeFileSync6(configFile, updated, "utf8");
3165
3220
  log.ok("Updated epd.yml: set proxy: false");
3166
3221
  }
3167
3222
  } catch (err) {
@@ -7350,9 +7405,15 @@ ${c.bold("SEVALLA MANAGED DATABASES")} (${dbs.length})
7350
7405
  });
7351
7406
 
7352
7407
  // src/core/update.ts
7353
- import { chmodSync as chmodSync3, existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync7, renameSync, writeFileSync as writeFileSync6 } from "fs";
7408
+ import { chmodSync as chmodSync3, existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync7, renameSync, writeFileSync as writeFileSync7 } from "fs";
7354
7409
  import { homedir as homedir4 } from "os";
7355
- import { dirname as dirname3, join as join9 } from "path";
7410
+ import { basename as basename3, dirname as dirname3, join as join9 } from "path";
7411
+ function isCompiledExecutable(execPath, isBun) {
7412
+ return isBun && !["bun", "bun.exe"].includes(basename3(execPath).toLowerCase());
7413
+ }
7414
+ function packageUpdateCommand(manager, pkgSpec, platform = process.platform) {
7415
+ return platform === "win32" && manager === "npm" ? [process.env.ComSpec || "cmd.exe", "/d", "/s", "/c", `npm install -g ${pkgSpec}`] : [manager, "install", "-g", pkgSpec];
7416
+ }
7356
7417
  function parseSemver(v) {
7357
7418
  const clean = v.replace(/^v/, "").trim();
7358
7419
  const parts = clean.split("-")[0].split(".").map((n) => Number(n) || 0);
@@ -7388,7 +7449,7 @@ function writeCache(latestVersion) {
7388
7449
  const p = getCachePath();
7389
7450
  mkdirSync6(dirname3(p), { recursive: true });
7390
7451
  const data = { lastChecked: Date.now(), latestVersion };
7391
- writeFileSync6(p, JSON.stringify(data));
7452
+ writeFileSync7(p, JSON.stringify(data));
7392
7453
  } catch {}
7393
7454
  }
7394
7455
  async function fetchLatestNpmVersion() {
@@ -7431,7 +7492,7 @@ async function checkForUpdate(currentVersion, options = {}) {
7431
7492
  async function performUpdate(targetVersion) {
7432
7493
  const isBun = typeof process.isBun !== "undefined";
7433
7494
  const execPath = process.execPath || "";
7434
- const isCompiledBinary = isBun && !execPath.endsWith("bun");
7495
+ const isCompiledBinary = isCompiledExecutable(execPath, isBun);
7435
7496
  if (isCompiledBinary) {
7436
7497
  try {
7437
7498
  const platform = process.platform;
@@ -7449,13 +7510,14 @@ async function performUpdate(targetVersion) {
7449
7510
  binaryName = "epd-windows-x64.exe";
7450
7511
  if (binaryName) {
7451
7512
  log.step(`Downloading ${binaryName} from GitHub Releases...`);
7452
- const url = `https://github.com/FabioPlunser/epd/releases/latest/download/${binaryName}`;
7513
+ const release = targetVersion ? `download/v${targetVersion}` : "latest/download";
7514
+ const url = `https://github.com/FabioPlunser/epd/releases/${release}/${binaryName}`;
7453
7515
  const res = await fetch(url);
7454
7516
  if (!res.ok)
7455
7517
  throw new Error(`HTTP ${res.status} ${res.statusText}`);
7456
7518
  const buf = await res.arrayBuffer();
7457
7519
  const tmpPath = `${execPath}.tmp.${Date.now()}`;
7458
- writeFileSync6(tmpPath, Buffer.from(buf));
7520
+ writeFileSync7(tmpPath, Buffer.from(buf));
7459
7521
  chmodSync3(tmpPath, 493);
7460
7522
  renameSync(tmpPath, execPath);
7461
7523
  return true;
@@ -7467,20 +7529,17 @@ async function performUpdate(targetVersion) {
7467
7529
  const isBunGlobal = (process.argv[1] || "").includes(".bun");
7468
7530
  const pkgMgr = isBunGlobal ? "bun" : "npm";
7469
7531
  const pkgSpec = targetVersion ? `@fabioplunser/epd@${targetVersion}` : "@fabioplunser/epd@latest";
7470
- try {
7471
- log.step(`Updating via ${pkgMgr}...`);
7472
- const res = await runShell(`${pkgMgr} install -g ${pkgSpec}`, { stream: true, allowFailure: true });
7473
- return res.code === 0;
7474
- } catch {
7475
- const fallback = pkgMgr === "bun" ? "npm" : "bun";
7532
+ for (const manager of [pkgMgr, pkgMgr === "bun" ? "npm" : "bun"]) {
7476
7533
  try {
7477
- log.step(`Trying ${fallback}...`);
7478
- const res = await runShell(`${fallback} install -g ${pkgSpec}`, { stream: true, allowFailure: true });
7479
- return res.code === 0;
7480
- } catch {
7481
- return false;
7534
+ log.step(`Updating via ${manager}...`);
7535
+ const res = await run(packageUpdateCommand(manager, pkgSpec), { stream: true, allowFailure: true });
7536
+ if (res.code === 0)
7537
+ return true;
7538
+ } catch (error) {
7539
+ log.debug(`${manager} update failed: ${error}`);
7482
7540
  }
7483
7541
  }
7542
+ return false;
7484
7543
  }
7485
7544
  async function promptAutoUpdate(currentVersion) {
7486
7545
  if (!interactive() || process.env.CI || process.env.EPD_NO_UPDATE_CHECK === "1" || process.env.EPD_NO_UPDATE_CHECK === "true") {
@@ -7515,14 +7574,23 @@ var init_update = __esm(() => {
7515
7574
  init_proc();
7516
7575
  });
7517
7576
 
7577
+ // package.json
7578
+ var version = "0.5.13";
7579
+ var init_package = () => {};
7580
+
7518
7581
  // src/version.ts
7519
- var VERSION = "0.5.7";
7582
+ var VERSION;
7583
+ var init_version = __esm(() => {
7584
+ init_package();
7585
+ VERSION = version;
7586
+ });
7520
7587
 
7521
7588
  // src/commands/update.ts
7522
7589
  var update;
7523
7590
  var init_update2 = __esm(() => {
7524
7591
  init_log();
7525
7592
  init_update();
7593
+ init_version();
7526
7594
  update = {
7527
7595
  name: "update",
7528
7596
  aliases: ["upgrade"],
@@ -8435,7 +8503,7 @@ Options
8435
8503
 
8436
8504
  // src/commands/restore.ts
8437
8505
  import { createReadStream, existsSync as existsSync11 } from "fs";
8438
- import { basename as basename3, resolve as resolve4 } from "path";
8506
+ import { basename as basename4, resolve as resolve4 } from "path";
8439
8507
  var restore;
8440
8508
  var init_restore = __esm(() => {
8441
8509
  init_log();
@@ -8466,7 +8534,7 @@ Options
8466
8534
  throw new EpdError(`Backup file not found: ${absPath}`);
8467
8535
  const loaded = ctx.load();
8468
8536
  const cfg = loaded.config;
8469
- const fileBase = basename3(absPath);
8537
+ const fileBase = basename4(absPath);
8470
8538
  const accessories = cfg.accessories;
8471
8539
  if (!accessories.length)
8472
8540
  throw new EpdError("No accessories configured in epd.yml.");
@@ -9181,6 +9249,7 @@ init_prompt();
9181
9249
  init_load();
9182
9250
  init_commands();
9183
9251
  init_update();
9252
+ init_version();
9184
9253
  import { parseArgs } from "util";
9185
9254
  var CATEGORIES = [
9186
9255
  {
@@ -14,6 +14,7 @@ export default defineConfig({
14
14
  siteTitle: "EPD",
15
15
  nav: [
16
16
  { text: "Getting Started", link: "/guide/getting-started" },
17
+ { text: "AI Agents", link: "/agents" },
17
18
  { text: "Guide", link: "/guide" },
18
19
  { text: "CI/CD", link: "/ci-cd" },
19
20
  { text: "Hetzner & DNS", link: "/hetzner-dns" },
@@ -22,11 +23,13 @@ export default defineConfig({
22
23
  items: [
23
24
  { text: "CLI Commands", link: "/reference/cli" },
24
25
  { text: "Configuration (epd.yml)", link: "/reference/config" },
26
+ { text: "For AI Agents", link: "/agents" },
27
+ { text: "llms.txt (Raw Feed)", link: "/llms.txt" },
25
28
  { text: "Troubleshooting", link: "/guide/troubleshooting" },
26
29
  ],
27
30
  },
28
31
  {
29
- text: "v0.5.0",
32
+ text: "v0.5.12",
30
33
  items: [
31
34
  { text: "Releases & Changelog", link: "https://github.com/FabioPlunser/epd/releases" },
32
35
  { text: "NPM Package", link: "https://www.npmjs.com/package/@fabioplunser/epd" },
@@ -39,6 +42,7 @@ export default defineConfig({
39
42
  items: [
40
43
  { text: "Quickstart (5 Mins)", link: "/guide/getting-started" },
41
44
  { text: "Installation", link: "/guide/installation" },
45
+ { text: "For AI Agents (Cursor / Windsurf)", link: "/agents" },
42
46
  ],
43
47
  },
44
48
  {
@@ -59,6 +63,7 @@ export default defineConfig({
59
63
  {
60
64
  text: "Integrations & Automation",
61
65
  items: [
66
+ { text: "AI Coding Agents", link: "/agents" },
62
67
  { text: "GitHub Actions CI/CD", link: "/ci-cd" },
63
68
  { text: "Hetzner Cloud & DNS", link: "/hetzner-dns" },
64
69
  ],
@@ -68,6 +73,8 @@ export default defineConfig({
68
73
  items: [
69
74
  { text: "CLI Commands Reference", link: "/reference/cli" },
70
75
  { text: "epd.yml Configuration", link: "/reference/config" },
76
+ { text: "Raw LLM Feed (llms.txt)", link: "/llms.txt" },
77
+ { text: "Full LLM Context (llms-full.txt)", link: "/llms-full.txt" },
71
78
  ],
72
79
  },
73
80
  ],