hostedge 0.1.2 → 0.1.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.
- package/README.md +93 -39
- package/dist/hostedge.js +3 -3
- package/package.json +12 -11
package/README.md
CHANGED
|
@@ -1,48 +1,102 @@
|
|
|
1
|
-
# hostedge
|
|
1
|
+
# hostedge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Hosting your AI agent can use.** The HostEdge command line deploys websites and apps to a global edge network, reads logs, and manages environment variables. It works the same for people at a terminal, in CI, and for AI agents such as Claude Code, Cursor and Codex.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Site: https://hostedge.app
|
|
6
|
+
- Docs: https://hostedge.app/docs/cli
|
|
7
|
+
- Free plan: 3 projects, no card
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx hostedge login # opens your browser and signs you in
|
|
13
|
+
npx hostedge deploy # uploads your project, shows the build, prints the live URL
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
That is all. Run it in the folder that holds your site (a built `dist` or `out` folder, or the project itself). The first deploy creates the project and links it; later deploys only upload what changed.
|
|
17
|
+
|
|
18
|
+
Install it once if you prefer a short command:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install --global hostedge # then: hostedge deploy
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Requires Node 20.11 or newer.
|
|
25
|
+
|
|
26
|
+
## Let your AI agent do it
|
|
27
|
+
|
|
28
|
+
There are two ways. Use either or both.
|
|
29
|
+
|
|
30
|
+
**1. Teach the agent HostEdge (no setup in the dashboard):**
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npx hostedge init --ai
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This writes `AGENTS.md`, `CLAUDE.md`, a Cursor rule and a Claude Code skill into your project. Your agent then knows how to build for HostEdge, deploy, read logs and roll back.
|
|
37
|
+
|
|
38
|
+
**2. Connect it over MCP** and just ask ("deploy this and check the logs"):
|
|
6
39
|
|
|
7
40
|
```sh
|
|
8
|
-
|
|
9
|
-
npx hostedge deploy # uploads changed files, streams the build log, prints the URL
|
|
41
|
+
claude mcp add --transport http hostedge https://hostedge.app/api/mcp
|
|
10
42
|
```
|
|
11
43
|
|
|
44
|
+
For Cursor, Windsurf and other clients, add `https://hostedge.app/api/mcp` as a remote MCP server. Details: https://hostedge.app/docs/ai-assistants
|
|
45
|
+
|
|
46
|
+
### For agents: what to know
|
|
47
|
+
|
|
48
|
+
- Every command takes `--json` (machine output on stdout, human text on stderr), `--yes` (never prompt) and `--quiet`. With `CI=1` or no TTY it never prompts.
|
|
49
|
+
- Authenticate with the `HOSTEDGE_TOKEN` environment variable (create one in Settings, API tokens, scope `deployments:write`) or `hostedge login --token <token>`.
|
|
50
|
+
- `hostedge deploy --wait --json` prints `{ "deploymentId", "status", "url", "failureReason", ... }` and exits `5` if the build fails.
|
|
51
|
+
- `hostedge logs --json` prints one JSON object per line.
|
|
52
|
+
- Exit codes are stable, see the table below.
|
|
53
|
+
|
|
54
|
+
## Commands
|
|
55
|
+
|
|
12
56
|
| Command | What it does |
|
|
13
57
|
| --- | --- |
|
|
14
|
-
| `hostedge login [--token <t> \| --with-token] [--api-url <url>]` |
|
|
15
|
-
| `hostedge logout` |
|
|
16
|
-
| `hostedge whoami` |
|
|
17
|
-
| `hostedge
|
|
18
|
-
| `hostedge
|
|
19
|
-
| `hostedge
|
|
20
|
-
| `hostedge
|
|
21
|
-
| `hostedge
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| Exit code | Meaning |
|
|
58
|
+
| `hostedge login [--token <t> \| --with-token] [--api-url <url>]` | Sign in. The browser flow creates a 90-day token limited to the CLI. `--with-token` reads the token from stdin. |
|
|
59
|
+
| `hostedge logout` | Forget the saved token (revoke it in Settings, API tokens). |
|
|
60
|
+
| `hostedge whoami` | Show the account, workspace and scopes in use. |
|
|
61
|
+
| `hostedge init [dir] [--name] [--project <id\|slug>] [--ai]` | Link a folder to a new or existing project. `--ai` also writes the agent kit. |
|
|
62
|
+
| `hostedge deploy [dir] [--preview] [-m <message>] [--no-wait]` | Deploy. Links the folder on first use. Exits `5` if the build fails. |
|
|
63
|
+
| `hostedge logs [-f] [--level <l>] [--search <text>] [--since 30m\|1h\|24h\|7d]` | Runtime logs, oldest first. `-f` follows. |
|
|
64
|
+
| `hostedge env pull [-e <environment>] [--file <path>]` | Write variables to `.env.local` (private file, added to `.gitignore`). |
|
|
65
|
+
| `hostedge ai-kit [dir] [--force]` | Write the agent files only. Never overwrites without `--force`. |
|
|
66
|
+
|
|
67
|
+
Global flags: `--json`, `--yes`, `--quiet`, `--api-url <url>`, `--no-color` (`NO_COLOR` is respected).
|
|
68
|
+
|
|
69
|
+
## Exit codes
|
|
70
|
+
|
|
71
|
+
| Code | Meaning |
|
|
30
72
|
| --- | --- |
|
|
31
|
-
| 0 |
|
|
32
|
-
| 1 |
|
|
33
|
-
| 2 |
|
|
34
|
-
| 3 |
|
|
35
|
-
| 4 |
|
|
36
|
-
| 5 |
|
|
37
|
-
| 6 |
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
73
|
+
| 0 | OK |
|
|
74
|
+
| 1 | Generic failure |
|
|
75
|
+
| 2 | Usage error (bad flag or argument) |
|
|
76
|
+
| 3 | Auth error: not signed in, token invalid, or missing a scope |
|
|
77
|
+
| 4 | Not found: project, deployment, or folder not linked |
|
|
78
|
+
| 5 | Deployment failed or was canceled |
|
|
79
|
+
| 6 | Plan limit reached |
|
|
80
|
+
|
|
81
|
+
## CI
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
- run: npx hostedge deploy --yes
|
|
85
|
+
env:
|
|
86
|
+
HOSTEDGE_TOKEN: ${{ secrets.HOSTEDGE_TOKEN }}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`HOSTEDGE_API_URL` points the CLI at another HostEdge, for example `http://localhost:3000` in development.
|
|
90
|
+
|
|
91
|
+
## What gets uploaded
|
|
92
|
+
|
|
93
|
+
The CLI follows the same rules as the dashboard. `.git`, `node_modules` and similar folders are skipped. Files that look like secrets (`.env*`, private keys) are left behind. Symbolic links are refused. Only files HostEdge does not already have are uploaded, in batches, with progress and automatic retries.
|
|
94
|
+
|
|
95
|
+
## Troubleshooting
|
|
96
|
+
|
|
97
|
+
- **"Not signed in" (exit 3):** run `npx hostedge login`, or set `HOSTEDGE_TOKEN`.
|
|
98
|
+
- **"Not linked" (exit 4):** run `npx hostedge init` in the project folder, or pass `--project <slug>`.
|
|
99
|
+
- **Too many requests:** the CLI waits and retries by itself; if it keeps failing, run it again in a minute.
|
|
100
|
+
- **Plan limit (exit 6):** upgrade at https://hostedge.app/pricing or remove an unused project.
|
|
101
|
+
|
|
102
|
+
More at https://hostedge.app/docs/cli
|
package/dist/hostedge.js
CHANGED
|
@@ -1334,7 +1334,7 @@ function createApi(io2, apiUrl, token) {
|
|
|
1334
1334
|
async function raw(path, init2 = {}) {
|
|
1335
1335
|
const headers = new Headers(init2.headers);
|
|
1336
1336
|
headers.set("authorization", `Bearer ${token}`);
|
|
1337
|
-
headers.set("user-agent", "hostedge-cli/0.1.
|
|
1337
|
+
headers.set("user-agent", "hostedge-cli/0.1.4");
|
|
1338
1338
|
let response;
|
|
1339
1339
|
try {
|
|
1340
1340
|
response = await io2.fetch(`${apiUrl}${path}`, { ...init2, headers });
|
|
@@ -3034,8 +3034,8 @@ var Reporter = class {
|
|
|
3034
3034
|
};
|
|
3035
3035
|
|
|
3036
3036
|
// src/cli.ts
|
|
3037
|
-
var VERSION = "0.1.
|
|
3038
|
-
var HELP = `hostedge \u2014
|
|
3037
|
+
var VERSION = "0.1.4";
|
|
3038
|
+
var HELP = `hostedge \u2014 hosting your AI agent can use. Deploy from your terminal, CI or an agent.
|
|
3039
3039
|
|
|
3040
3040
|
Usage
|
|
3041
3041
|
hostedge login [--token <t> | --with-token] [--api-url <url>]
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hostedge",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Deploy to
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Hosting your AI agent can use. Deploy websites and apps to the edge, read logs and manage env vars from the terminal, CI or an AI agent (Claude Code, Cursor, Codex). JSON output, stable exit codes, MCP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hostedge",
|
|
7
7
|
"deploy",
|
|
8
8
|
"hosting",
|
|
9
9
|
"cli",
|
|
10
|
+
"ai-agents",
|
|
11
|
+
"mcp",
|
|
12
|
+
"claude-code",
|
|
13
|
+
"cursor",
|
|
14
|
+
"edge",
|
|
15
|
+
"static-site",
|
|
10
16
|
"cloudflare-workers"
|
|
11
17
|
],
|
|
12
18
|
"homepage": "https://hostedge.app/docs/cli",
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/ybenjaa-dev/appdock.git",
|
|
16
|
-
"directory": "apps/cli"
|
|
17
|
-
},
|
|
18
19
|
"type": "module",
|
|
19
20
|
"bin": {
|
|
20
21
|
"hostedge": "dist/hostedge.js"
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
},
|
|
28
29
|
"publishConfig": {
|
|
29
30
|
"access": "public",
|
|
30
|
-
"provenance":
|
|
31
|
+
"provenance": false
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@types/node": "26.6.5",
|
|
@@ -35,10 +36,10 @@
|
|
|
35
36
|
"esbuild": "0.28.2",
|
|
36
37
|
"eslint": "10.13.0",
|
|
37
38
|
"typescript": "6.0.3",
|
|
38
|
-
"uqr": "0.1.
|
|
39
|
+
"uqr": "0.1.4",
|
|
39
40
|
"vitest": "5.0.5",
|
|
40
|
-
"@hostedge/
|
|
41
|
-
"@hostedge/
|
|
41
|
+
"@hostedge/config": "0.0.0",
|
|
42
|
+
"@hostedge/core": "0.0.0"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"build": "node build.mjs",
|