ezhst 1.3.3 → 1.3.4

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.
@@ -76,9 +76,9 @@ export const setDockerfile = async (options) => {
76
76
  export const dockerfileTemplate = async (id, options) => {
77
77
  const templates = await listTemplates();
78
78
  if (!id) {
79
- output({ templates: templates.map((template) => ({ id: template.id, label: template.label })) }, () => {
79
+ output({ templates: templates.map((template) => ({ id: template.id, group: template.group, label: template.label })) }, () => {
80
80
  for (const template of templates) {
81
- log.info(`${template.id.padEnd(8)} ${template.label}`);
81
+ log.info(`${template.id.padEnd(14)} ${template.group.padEnd(9)} ${template.label}`);
82
82
  }
83
83
  });
84
84
  return;
@@ -99,20 +99,32 @@ export const ensureDockerfile = async (project) => {
99
99
  if (project.dockerfile) {
100
100
  return project;
101
101
  }
102
- const hint = "This app has no Dockerfile. Write one and run `ezhst build dockerfile set -f Dockerfile`, or start from a template with `ezhst build dockerfile template <id> --apply`.";
102
+ const hint = "This app has no Dockerfile. Pipe one in with `ezhst build dockerfile set -f -`, or start from a template with `ezhst build dockerfile template <id> --apply`.";
103
103
  if (!isInteractive()) {
104
104
  fail(hint);
105
105
  }
106
106
  const templates = await listTemplates();
107
- const choice = await select({
107
+ const groups = [...new Set(templates.map((template) => template.group))];
108
+ const group = await select({
108
109
  message: "This app has no Dockerfile. Start from a template?",
109
- choices: [...templates.map((template) => ({ name: template.label, value: template.id })), { name: "Cancel", value: "" }],
110
+ choices: [...groups.map((name) => ({ name, value: name })), { name: "Cancel", value: "" }],
110
111
  });
112
+ const options = templates.filter((item) => item.group === group);
113
+ let choice = "";
114
+ if (options.length === 1) {
115
+ choice = options[0].id;
116
+ }
117
+ else if (options.length > 1) {
118
+ choice = await select({
119
+ message: "Which framework?",
120
+ choices: options.map((template) => ({ name: template.label, value: template.id })),
121
+ });
122
+ }
111
123
  const template = templates.find((item) => item.id === choice);
112
124
  if (!template) {
113
125
  return fail(hint);
114
126
  }
115
127
  const app = await saveSettings(project, { dockerfile: template.content });
116
- log.success(`${template.label} Dockerfile saved. Edit it later with \`ezhst build dockerfile set -f <file>\`.`);
128
+ log.success(`${template.label} Dockerfile saved. Edit it later in the Build tab or with \`ezhst build dockerfile set -f -\`.`);
117
129
  return app;
118
130
  };
@@ -25,7 +25,7 @@ const IGNORED_DIRS = new Set([
25
25
  ".zig-cache",
26
26
  "zig-cache",
27
27
  ]);
28
- const IGNORED_FILES = new Set([".DS_Store", ".easyhost.json"]);
28
+ const IGNORED_FILES = new Set([".DS_Store", ".reverhost.json"]);
29
29
  const isIgnored = (entry) => {
30
30
  const parts = entry.replace(/^\.\//, "").split("/");
31
31
  if (parts.some((part) => IGNORED_DIRS.has(part))) {
@@ -38,7 +38,7 @@ const isIgnored = (entry) => {
38
38
  return name.startsWith(".env") && name !== ".env.example";
39
39
  };
40
40
  const packSource = async (cwd) => {
41
- const stage = mkdtempSync(path.join(tmpdir(), "easyhost-"));
41
+ const stage = mkdtempSync(path.join(tmpdir(), "reverhost-"));
42
42
  const archive = path.join(stage, "app.tgz");
43
43
  await tar.create({ gzip: true, cwd, file: archive, portable: true, filter: (entry) => !isIgnored(entry) }, ["."]);
44
44
  return { stage, archive };
@@ -41,7 +41,7 @@ export const installSkill = async (options) => {
41
41
  if (scope === "global") {
42
42
  base = homedir();
43
43
  }
44
- const directory = path.join(base, agent.folder, "skills", "easyhost");
44
+ const directory = path.join(base, agent.folder, "skills", "reverhost");
45
45
  const target = path.join(directory, "SKILL.md");
46
46
  mkdirSync(directory, { recursive: true });
47
47
  copyFileSync(SKILL_SOURCE, target);
@@ -1,9 +1,9 @@
1
1
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import path from "node:path";
4
- const CONFIG_DIR = path.join(homedir(), ".easyhost");
4
+ const CONFIG_DIR = path.join(homedir(), ".reverhost");
5
5
  const CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
6
- const PROJECT_FILE = ".easyhost.json";
6
+ const PROJECT_FILE = ".reverhost.json";
7
7
  const PRODUCTION_API_URL = "https://api.reverhost.com";
8
8
  export const readConfig = () => {
9
9
  let config = { apiUrl: PRODUCTION_API_URL };
@@ -37,7 +37,7 @@ export const linkProject = async (slug) => {
37
37
  return fail("Missing --project <slug>. List projects with `ezhst projects list`.");
38
38
  }
39
39
  writeLinkedProject({ projectId: project.id, slug: project.slug });
40
- log.dim("Saved project link in .easyhost.json");
40
+ log.dim("Saved project link in .reverhost.json");
41
41
  return project;
42
42
  };
43
43
  export const resolveProject = async (options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezhst",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Reverhost CLI: agent-first hosting for Node.js apps with storage and databases",
5
5
  "type": "module",
6
6
  "bin": {
package/skill/SKILL.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: easyhost
2
+ name: reverhost
3
3
  description: Deploy and manage apps on Reverhost (free hosting) with the ezhst CLI. Use when the user asks to deploy, host, publish or ship an app (any language, built from a Dockerfile) to Reverhost, or to manage its environment variables, build settings, logs, custom domains, S3 storage or Postgres database.
4
4
  ---
5
5
 
@@ -11,7 +11,7 @@ Reverhost is free hosting for apps in any language, built from a Dockerfile you
11
11
 
12
12
  - Always pass `--json` and parse stdout. Progress and hints go to stderr. On failure the process exits with code 1 and prints `{"error": "..."}`.
13
13
  - The CLI never prompts without a TTY. Pass every value as a flag.
14
- - Commands that act on a project use the project linked in `.easyhost.json`, or `--project <slug>`. App commands also use `--app <slug-or-id>` or the linked app. With multiple apps, select one explicitly.
14
+ - Commands that act on a project use the project linked in `.reverhost.json`, or `--project <slug>`. App commands also use `--app <slug-or-id>` or the linked app. With multiple apps, select one explicitly.
15
15
  - Destructive commands (`projects delete`, `apps delete`, `storage delete`, `db delete`) need `--yes`. Only run them when the user explicitly asks.
16
16
  - Never print secrets (passwords, S3 secret keys, connection strings) back to the user unless they ask. Put them in env vars with `ezhst env set` instead.
17
17
  - `.env` files are never uploaded. Environment variables must be set with `ezhst env set` or `ezhst env import .env`.