@omg-dev/cli 0.4.30
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 +65 -0
- package/dist/omg.mjs +1426 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# `@omg-dev/cli`
|
|
2
|
+
|
|
3
|
+
The `omg` CLI deploys a local app to `https://<slug>.omgs.app`. The command is
|
|
4
|
+
published on npm and runs on [Bun](https://bun.sh/).
|
|
5
|
+
|
|
6
|
+
The canonical beginner guide is
|
|
7
|
+
[Deploy from a local machine](https://docs.omg.dev/docs/deploy-from-local).
|
|
8
|
+
Keep the user-facing flow there; this README only covers installation,
|
|
9
|
+
commands, and implementation details.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Install Bun, then install the command globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install --global @omg-dev/cli
|
|
17
|
+
omg help
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`bun add --global @omg-dev/cli` works too. For one command without a global
|
|
21
|
+
install, use `npx --yes @omg-dev/cli@latest help` or
|
|
22
|
+
`bunx @omg-dev/cli@latest help`.
|
|
23
|
+
|
|
24
|
+
Create a new app with `omg create my-app`. The same official generator powers
|
|
25
|
+
`bun create omg my-app` and `npx create-omg my-app`.
|
|
26
|
+
|
|
27
|
+
## Commands
|
|
28
|
+
|
|
29
|
+
| Command | Does |
|
|
30
|
+
| --------------------------------------------- | ---------------------------------------------------------------- |
|
|
31
|
+
| `omg create <name> [--no-install]` | Create an app from the official starter. |
|
|
32
|
+
| `omg login` | Sign in through the browser with OAuth 2.1 + PKCE. |
|
|
33
|
+
| `omg login --token "$OMG_API_KEY"` | Save an API key for headless use. |
|
|
34
|
+
| `omg whoami` | Print the authenticated account without printing its credential. |
|
|
35
|
+
| `omg logout` | Remove saved credentials. |
|
|
36
|
+
| `omg apps` | List apps visible to the authenticated account. |
|
|
37
|
+
| `omg deploy [--name X] [--dir .] [--no-wait]` | Upload source, build, and publish. |
|
|
38
|
+
| `omg status [--dir .]` | Show deploy status for the linked directory. |
|
|
39
|
+
| `omg link <slug> [--dir .]` | Link a directory to an app on the account. |
|
|
40
|
+
| `omg dev [--dir .] [--agent-port N]` | Run the project with local VM-service emulation. |
|
|
41
|
+
|
|
42
|
+
Credentials resolve in this order: `OMG_API_KEY`, then
|
|
43
|
+
`~/.omg/credentials.json`. Never put an API key directly in a shell command or
|
|
44
|
+
commit either credential file.
|
|
45
|
+
|
|
46
|
+
## Implementation notes
|
|
47
|
+
|
|
48
|
+
`omg deploy` uploads source to a temporary sandbox, takes a `files_only`
|
|
49
|
+
snapshot, deletes the staging sandbox, and asks the normal platform builder to
|
|
50
|
+
publish it. The builder—not the laptop—runs the production build.
|
|
51
|
+
|
|
52
|
+
The first successful deploy writes `.omg/project.json`. Its `projectId` is the
|
|
53
|
+
binding that makes the next deploy update the same slug.
|
|
54
|
+
|
|
55
|
+
The collector excludes generated and local state (`node_modules`, `dist`,
|
|
56
|
+
`.vibes`, `.git`, `.omg`, `.next`, `.turbo`, `coverage`, and `.DS_Store`),
|
|
57
|
+
refuses `.env` and `.env.*`, skips symlinks, and enforces a 2 MB per-file and
|
|
58
|
+
40 MB total-source limit.
|
|
59
|
+
|
|
60
|
+
Browser OAuth tokens authenticate the control-plane CLI surface. Source
|
|
61
|
+
staging on `infra.omg.dev` currently accepts dashboard JWTs and `omg_sk_` API
|
|
62
|
+
keys, so use the API-key flow in the public guide when exercising
|
|
63
|
+
`omg deploy`. API keys also authenticate the final publish hop through the
|
|
64
|
+
control-plane broker; no service credential is stored on the developer's
|
|
65
|
+
machine.
|