hostedge 0.0.0-stage → 0.1.1

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 (3) hide show
  1. package/README.md +47 -2
  2. package/dist/hostedge.js +3215 -0
  3. package/package.json +46 -3
package/README.md CHANGED
@@ -1,3 +1,48 @@
1
- # Temporary Holding Version
1
+ # hostedge CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Deploy a folder to HostEdge from your terminal.
4
+
5
+ Install once with `npm install --global hostedge` (or `curl -fsSL https://hostedge.app/install.sh | sh`), or run it with `npx`:
6
+
7
+ ```sh
8
+ npx hostedge login # opens your browser; or: hostedge login --token hostedge_…
9
+ npx hostedge deploy # uploads changed files, streams the build log, prints the URL
10
+ ```
11
+
12
+ | Command | What it does |
13
+ | --- | --- |
14
+ | `hostedge login [--token <t> \| --with-token] [--api-url <url>]` | Signs in. The browser flow creates a 90-day token scoped to the CLI; `--with-token` reads the token from stdin. |
15
+ | `hostedge logout` | Forgets the saved token (revoke it in Settings → API tokens). |
16
+ | `hostedge whoami` | Shows the account, workspace and scopes in use. |
17
+ | `hostedge ai-kit [dir] [--force]` | Writes `AGENTS.md`, `CLAUDE.md`, `.cursor/rules/hostedge.mdc` and `.claude/skills/hostedge/SKILL.md` (never overwrites without `--force`). |
18
+ | `hostedge init [dir] [--name] [--project <id\|slug>] [--ai]` | Links a folder to a new or existing project (`.hostedge/project.json`); `--ai` also writes the agent kit. |
19
+ | `hostedge deploy [dir] [--preview] [-m <message>] [--no-wait]` | Deploys; links the folder on first deploy. Exits 5 if the build fails. |
20
+ | `hostedge logs [-f] [--level <l>] [--search <text>] [--since 30m\|1h\|24h\|7d]` | Runtime logs, oldest first; `-f` follows. |
21
+ | `hostedge env pull [-e <environment>] [--file <path>]` | Writes variables to `.env.local` (0600, added to `.gitignore`). |
22
+
23
+ For scripts and AI agents every command accepts `--json` (JSON on stdout, human text on
24
+ stderr), `--yes` (never prompt; `CI=1` or no TTY also disables prompts), `--quiet`,
25
+ `--api-url <url>` and `--no-color` (`NO_COLOR` is respected). `hostedge deploy --wait --json`
26
+ prints `{deploymentId,status,url,failureReason,…}` and exits 5 if the build fails;
27
+ `hostedge logs --json` prints one JSON object per line.
28
+
29
+ | Exit code | Meaning |
30
+ | --- | --- |
31
+ | 0 | ok |
32
+ | 1 | generic failure |
33
+ | 2 | usage error |
34
+ | 3 | auth error (not signed in, token invalid or missing a scope) |
35
+ | 4 | not found (project, deployment, folder not linked) |
36
+ | 5 | deployment failed or was canceled |
37
+ | 6 | plan limit reached |
38
+
39
+ In CI, set `HOSTEDGE_TOKEN` (create one in Settings → API tokens with the `deployments:write`
40
+ scope) and run `npx hostedge deploy`. `HOSTEDGE_API_URL` points the CLI at another HostEdge
41
+ (e.g. `http://localhost:3000` in development).
42
+
43
+ The CLI follows the dashboard's upload rules: `.git`, `node_modules` and similar folders are
44
+ skipped, secret-looking files (`.env*`, keys) are left behind, and symbolic links are refused.
45
+ Only files HostEdge doesn't already have are uploaded.
46
+
47
+ Development: `pnpm --filter hostedge build` bundles `dist/hostedge.js` (no runtime
48
+ dependencies); `pnpm --filter hostedge test` runs the commands against a fake API.