@vibecloudtr/cli 0.5.0 → 0.6.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.
- package/ENVIRONMENT.md +9 -4
- package/README.md +189 -1383
- package/commands.json +153 -16
- package/dist/main.js +247 -209
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,1401 +1,207 @@
|
|
|
1
|
-
#
|
|
1
|
+
# vibe — Vibecloud CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vibecloud (vibecloud.tr), Türkiye’de çalışan, Supabase uyumlu bir backend ve Next.js hosting
|
|
4
|
+
platformudur. `vibe` onun komut satırı aracıdır: proje, veritabanı, yayın ve alan adlarını tek
|
|
5
|
+
komuttan yönetir.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
| --------- | ------------------------------------------------------- |
|
|
7
|
-
| `cmd/cli` | The `vibe` CLI — talks to the control-plane GraphQL API |
|
|
7
|
+
*English below.*
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
server moved out on 2026-08-14 (commit `f86568e`); it lives in `../mcp`.
|
|
9
|
+
## Kurulum
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
this repo expects the workspace layout CI uses: `api/` beside `cli/`. Today that
|
|
14
|
-
is `api/pkg/errcodes` (the error-code registry) and `api/apiversion` (the API
|
|
15
|
-
group, so the emitted `App` manifest cannot drift from the CRD).
|
|
11
|
+
Node.js 22 veya üstü gerekir. Kurmadan çalıştırmak için:
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Design docs and the decision log are in `../base/docs`.
|
|
20
|
-
|
|
21
|
-
## Releasing to npm — the checklist
|
|
22
|
-
|
|
23
|
-
🔴 **`@vibecloudtr/cli` 0.5.0 is on npm (2026-10-22)**; 0.0.1 shipped source maps and was
|
|
24
|
-
unpublished. Every page of the site, `llms.txt` and the three agent files instruct
|
|
25
|
-
`npx @vibecloudtr/cli …`, so each publish is the most-repeated promise on the site.
|
|
26
|
-
Publishing is done by hand from the owner's machine with an npm access token. There
|
|
27
|
-
is no CI release workflow and no provenance attestation: npm only issues provenance
|
|
28
|
-
for public source repositories, and this one is private.
|
|
29
|
-
|
|
30
|
-
1. **npm side, once.** Create the `vibecloudtr` organisation on npmjs.com and a
|
|
31
|
-
granular access token scoped to publish `@vibecloudtr/*`. Public packages under
|
|
32
|
-
an org are free. Store the token in your user-level `~/.npmrc`, never in the
|
|
33
|
-
repo's:
|
|
34
|
-
|
|
35
|
-
npm config set //registry.npmjs.org/:_authToken <token>
|
|
36
|
-
|
|
37
|
-
2. **Version, every release.** Bump the minor only (0.1.0 → 0.2.0). Nothing past
|
|
38
|
-
`1.0.0` is published before launch; `scripts/check-package.mjs` refuses it.
|
|
39
|
-
|
|
40
|
-
npm version <x.y.z> --no-git-tag-version # commit "Release x.y.z"
|
|
41
|
-
git tag v<x.y.z>
|
|
42
|
-
|
|
43
|
-
3. **Exercise the packed tarball** once against a live control plane (`npm pack` →
|
|
44
|
-
`npx ./vibecloudtr-cli-*.tgz login` → `project create` → `deploy start` on the
|
|
45
|
-
local slice). Nothing automated does this.
|
|
46
|
-
4. **Publish.** From `cli/`:
|
|
47
|
-
|
|
48
|
-
npm pack --dry-run # eyeball the file list: dist/, commands.json, README, ENVIRONMENT, LICENSE
|
|
49
|
-
npm publish
|
|
50
|
-
|
|
51
|
-
`prepublishOnly` runs `make check` and `scripts/check-package.mjs` first and
|
|
52
|
-
aborts the publish if either fails. `npm publish` tags the version `latest`,
|
|
53
|
-
which is what `npx @vibecloudtr/cli` resolves to for everyone. A prerelease
|
|
54
|
-
(`x.y.z-rc.N`) must be published with `npm publish --tag next` so it never
|
|
55
|
-
becomes `latest`.
|
|
56
|
-
5. **Verify, from any machine:**
|
|
57
|
-
|
|
58
|
-
npm view @vibecloudtr/cli version dist-tags
|
|
59
|
-
npx --yes @vibecloudtr/cli@latest --version
|
|
60
|
-
curl -s https://vibecloud.tr/docs.md | grep -c vibecloudtr/cli # the docs already point at it
|
|
61
|
-
|
|
62
|
-
6. **Afterwards.** `../mcp/REGISTRY.md` lists the MCP registry submissions that
|
|
63
|
-
were prepared but not sent; an installable CLI is their precondition.
|
|
64
|
-
|
|
65
|
-
## Talking to the control plane
|
|
66
|
-
|
|
67
|
-
Every command below is a client of the GraphQL API (decisions 31/54; dec. 17
|
|
68
|
-
makes the CLI a consumer of that surface, not a second API). The contract is
|
|
69
|
-
`../api/docs/api/schema.graphql` and `../base/docs/api-contract.md`.
|
|
70
|
-
|
|
71
|
-
VIBECLOUD_API full GraphQL URL, path included. Default https://api.vibecloud.tr/query
|
|
72
|
-
VIBECLOUD_ORG default organisation slug, so --org can be omitted
|
|
73
|
-
VIBECLOUD_OAUTH_CLIENT_ID registered OAuth client id (login only; defaults to vibe-cli)
|
|
74
|
-
VIBECLOUD_OAUTH_RESOURCE the audience the token must carry (login only; defaults to the public API when VIBECLOUD_API is unset)
|
|
75
|
-
|
|
76
|
-
⚠ The path is **`/query`**, not `/graphql`. The API mounts gqlgen on `/query` and
|
|
77
|
-
nothing on `/graphql`, and the web console posts to `/query` too. In dev the
|
|
78
|
-
playground handler sits on `"/"` and catches everything else, so `POST /graphql`
|
|
79
|
-
answers **HTTP 200 with a page of HTML** — not a status any error path inspects,
|
|
80
|
-
so a client pointed there reports an unparseable response rather than a bad URL.
|
|
81
|
-
|
|
82
|
-
🔴 **`VIBECLOUD_API` must be `https://`, and that is checked at startup.** Every
|
|
83
|
-
command sends `Authorization: Bearer <token>` to it, and login fetches the OAuth
|
|
84
|
-
discovery document from its origin — so a cleartext value exposed the credential
|
|
85
|
-
on the first call _and_ let whoever controlled the network name the
|
|
86
|
-
`token_endpoint` the authorization code and refresh token were posted to. The
|
|
87
|
-
only exception is **literal loopback** (`http://127.0.0.1`, `http://[::1]`),
|
|
88
|
-
which never reaches a network; `http://localhost` is deliberately excluded
|
|
89
|
-
because it resolves through DNS. The same check runs on the
|
|
90
|
-
`authorization_endpoint` and `token_endpoint` the discovery document names, and
|
|
91
|
-
on the `token_url` stored in the credential file.
|
|
92
|
-
|
|
93
|
-
A project is named by its **slug**, because that is what a human types. The
|
|
94
|
-
GraphQL `ID` is opaque and must not be parsed (`api-contract.md` §3), so a slug
|
|
95
|
-
is resolved through `projectBySlug` — one extra round trip and no string surgery.
|
|
96
|
-
|
|
97
|
-
## What the CLI tells the API about itself
|
|
98
|
-
|
|
99
|
-
Every request — the API calls and the OAuth login, refresh and device-poll
|
|
100
|
-
requests — carries `User-Agent: vibecloud-cli/<version> (<agent>)`, where
|
|
101
|
-
`<agent>` is the editor the CLI detected around it — `claude-code`, `cursor`,
|
|
102
|
-
`vscode`, `windsurf` — or `none`; the same fingerprint rule `vibe init` uses to
|
|
103
|
-
pick an editor. The API collapses it to a closed family and uses it for one
|
|
104
|
-
thing: which kind of client brought an account to its first deploy
|
|
105
|
-
(VIBEC-326). That is the CLI's only telemetry: a header on requests it was
|
|
106
|
-
making anyway, no separate send, no OS or machine name in it, and nothing to
|
|
107
|
-
opt out of. It is disclosed in the aydınlatma metni with the rest of the
|
|
108
|
-
visitor/console analytics.
|
|
109
|
-
|
|
110
|
-
## `VIBECLOUD_OUTPUT=json` — the machine surface
|
|
111
|
-
|
|
112
|
-
Every command prints **exactly one JSON document on stdout**, and nothing else.
|
|
113
|
-
`--json` on any command selects the same mode as `VIBECLOUD_OUTPUT=json`. Exit codes
|
|
114
|
-
are 0 ok, 1 failure, 2 usage, 4 auth, 130 cancelled (`vibe help exit-codes`). A
|
|
115
|
-
usage error is `ok: false` with code `USAGE` and the suggested command as `fix`.
|
|
116
|
-
|
|
117
|
-
$ VIBECLOUD_OUTPUT=json vibe project list | jq -c '{ok, command}'
|
|
118
|
-
{"ok":true,"command":"project list"}
|
|
119
|
-
|
|
120
|
-
$ VIBECLOUD_OUTPUT=json vibe deploy force | jq -c '.error.missing | length'
|
|
121
|
-
2
|
|
122
|
-
|
|
123
|
-
`{"ok": …, "command": …, "data": …}` on success; `{"ok": false, "command": …,
|
|
124
|
-
"error": {"code", "message", "action", "fix", "details", "missing", "alternative"}}` on a failure
|
|
125
|
-
or a refusal. A refusal is a real answer with `ok: false`, and its prerequisites
|
|
126
|
-
are an array rather than a paragraph. `fix` (VIBEC-324) is what to do next as
|
|
127
|
-
the API stated it — `extensions.fix` verbatim, or the vendored registry's for
|
|
128
|
-
the same code when a server predates the field: `vibe login`,
|
|
129
|
-
`retry after details.retryAfter`, `settle the invoice at https://vibecloud.tr/billing`.
|
|
130
|
-
`details` is the object the fix refers to — `{"retryAfter": 60}` under
|
|
131
|
-
RATE_LIMITED, `{"traceId": …}` under INTERNAL — verbatim from the API and
|
|
132
|
-
absent when it sent none.
|
|
133
|
-
Human mode writes the error to stderr as `✗ prose`, the action, the
|
|
134
|
-
details as `key: value` lines, `Kod: CODE`, and the fix as the **last line**
|
|
135
|
-
(`› fix`), so an agent that reads only the tail gets the command. The API's
|
|
136
|
-
`fix` accompanies failures the **API** answered or reported; a refusal the CLI
|
|
137
|
-
makes on its own (a missing `--project`, an unset `VIBECLOUD_API`) borrows a
|
|
138
|
-
code but carries no `action` and only its own `fix` — the registry's fix for
|
|
139
|
-
that code is the API's remedy, not this one, and `message`/`missing` are the
|
|
140
|
-
remedy here. A registry fix naming a `details.*` key is withheld when the
|
|
141
|
-
error carries no such key. `action` remains the Turkish sentence a
|
|
142
|
-
person reads; the two differ on purpose. Absent (JSON) / not printed (human)
|
|
143
|
-
when the code has no customer action. **No token or config value is ever in a
|
|
144
|
-
document** — `vibe config set` reports variable names only, and `vibe login`
|
|
145
|
-
reports the account and expiry, never the bearer.
|
|
146
|
-
|
|
147
|
-
🔴 **This was broken across the whole surface until 2026-08-15**, in a way every
|
|
148
|
-
check that looked for the artefact passed: the mode was read, threaded into every
|
|
149
|
-
command, documented in `ENVIRONMENT.md` — and `Output.Print`'s machine branch was
|
|
150
|
-
`fmt.Printf("%+v")` on an already-formatted string, which is the human output
|
|
151
|
-
byte for byte. `VIBECLOUD_OUTPUT=json vibe project list` printed a box-drawing
|
|
152
|
-
table; `vibe logs` and `vibe token create` printed something `jq` rejects (exit
|
|
153
|
-
5). See `ENVIRONMENT.md` for the captured output and the guard that now enforces
|
|
154
|
-
it (`internal/cli/machineoutput_test.go`, which drives every dispatchable command
|
|
155
|
-
and checks its own table against the dispatch switch).
|
|
156
|
-
|
|
157
|
-
## `vibe init` — the paste-this-to-your-AI command (VIBEC-321)
|
|
158
|
-
|
|
159
|
-
One command from a cloned repository to a live `*.vibeapp.tr` URL:
|
|
160
|
-
|
|
161
|
-
npx @vibecloudtr/cli init --package LUNA
|
|
162
|
-
|
|
163
|
-
It runs, in order, the commands a person would type — `login`, `project create`, `app create`,
|
|
164
|
-
`mcp install` and `deploy start` — through the same functions those commands
|
|
165
|
-
use, then follows the app until it is `LIVE` (`--wait`, default 900 s) and
|
|
166
|
-
prints the URL. Every step is reused, never redone: an existing project or app
|
|
167
|
-
is kept, and a stored credential is used as is.
|
|
168
|
-
|
|
169
|
-
**With no credential it is a device login** (`--yes` or not), and the
|
|
170
|
-
browser is opened on the device link with the package and the project in its
|
|
171
|
-
query (`/device?user_code=…&plan=luna&project=crm`; the link is printed too,
|
|
172
|
-
for a machine with no desktop). The person may have no account yet: the
|
|
173
|
-
console's `/device` leads through sign-up, address verification and the
|
|
174
|
-
invoice profile, carrying the link as the return path, then to the approval
|
|
175
|
-
screen. Approving there for a project lands on `/device/approved`, which waits
|
|
176
|
-
for this process to create the project and sends the same tab to its checkout
|
|
177
|
-
(a 14-day trial or a first charge). The CLI meanwhile polls the token
|
|
178
|
-
endpoint, then the project's phase, and carries on the moment the subscription
|
|
179
|
-
has started. The device code lives 30 minutes, long enough for the sign-up.
|
|
180
|
-
|
|
181
|
-
What it derives, and the flag that overrides each: the project slug from
|
|
182
|
-
`package.json`'s `name` (scope stripped) or the directory name (`--project`);
|
|
183
|
-
the repository from `git remote get-url origin`, an SSH remote rewritten to
|
|
184
|
-
its HTTPS form — a remote that does not rewrite to `https://` (an SSH alias, a
|
|
185
|
-
non-default port) is refused rather than attached, because the server accepts
|
|
186
|
-
any string and the build would fail later on a repository it cannot clone
|
|
187
|
-
(`--repo`); the editor from the environment the editor leaves
|
|
188
|
-
behind — `CLAUDECODE` → claude-code, `CURSOR_TRACE_ID` → cursor,
|
|
189
|
-
`TERM_PROGRAM=vscode` → vscode, with Cursor and Windsurf told apart by the
|
|
190
|
-
askpass helper's path (`--editor`). An editor it cannot recognise is
|
|
191
|
-
reported and skipped, never guessed: a wrong guess writes a config file nobody
|
|
192
|
-
asked for. An editor config it cannot write (a settings file with
|
|
193
|
-
comments, a foreign entry under our key) is likewise reported and skipped.
|
|
194
|
-
`--no-mcp` and `--no-deploy` skip those steps.
|
|
195
|
-
|
|
196
|
-
With no git remote, `init` creates an upload app instead: it packs the working
|
|
197
|
-
tree (`src/cli/upload/pack.ts`), PUTs the archive to the one-time URL from
|
|
198
|
-
`createSourceUpload`, and deploys it with `deployUpload`; the report's
|
|
199
|
-
`app.source` is `upload` (`git` otherwise).
|
|
200
|
-
|
|
201
|
-
An App exists for every project; what `init` attaches is its **source**
|
|
202
|
-
(`sourceRepo` null means connected to nothing), so a project that already has
|
|
203
|
-
one is never re-attached. The deploy is followed by identity, not by phase
|
|
204
|
-
alone: right after `deployApp` an app that was LIVE still reads LIVE for the
|
|
205
|
-
previous revision, so `init` settles on a terminal phase only once the phase
|
|
206
|
-
changed or the deploy id / revision did. A build that FAILED is one error
|
|
207
|
-
document (`BUILD_FAILED`, with the registry fix) and exit 1.
|
|
208
|
-
|
|
209
|
-
🔴 **A new project needs `--package` (LUNA, TERRA, SOL) and there is no
|
|
210
|
-
default.** The packages are priced differently and there is no free tier, so
|
|
211
|
-
a defaulted package would be a billing decision taken on the customer's
|
|
212
|
-
behalf. The prompt block on the website names it in the customer's own
|
|
213
|
-
copy-paste, which is where that decision belongs.
|
|
214
|
-
|
|
215
|
-
**A new project is built once its subscription has started** (dec. 216): in a
|
|
216
|
-
self-serve organization `project create` leaves it `AWAITING_PAYMENT`, and
|
|
217
|
-
`init` prints the console's checkout link (and opens it, when no login ran in
|
|
218
|
-
this process: after a device login the approving tab is already headed there)
|
|
219
|
-
and waits there — up to 30 minutes,
|
|
220
|
-
reading the project's phase every 5 s — then goes on to `app create` once the
|
|
221
|
-
subscription (a first charge, or the trial with the card vaulted) has released
|
|
222
|
-
it (VIBEC-547). A project found still held on a re-run is waited on the same
|
|
223
|
-
way: its link comes from `Project.checkoutUrl`, so no command is sent to a
|
|
224
|
-
project no cell has. A wait that runs out is exit 1 with `PAYMENT_REQUIRED` and
|
|
225
|
-
the link in `details.checkoutUrl`; once the subscription has started, the same
|
|
226
|
-
command picks up where it stopped. A project whose subscription never starts
|
|
227
|
-
is released 48 hours after its creation. An enterprise organization is invoiced
|
|
228
|
-
instead and never waits.
|
|
229
|
-
|
|
230
|
-
Under `VIBECLOUD_OUTPUT=json` the sub-steps write into a private buffer and
|
|
231
|
-
`init` emits **one** document with a block per step — `login`, `project`,
|
|
232
|
-
`app`, `mcp`, `deploy` — each saying whether it ran, what it created and,
|
|
233
|
-
when skipped, why; `deploy.live` is true only when the app reached `LIVE`
|
|
234
|
-
inside the wait. A wait that runs out is not a failure: the document says the
|
|
235
|
-
phase the app was in, and the exit code stays 0. The subscription wait is the
|
|
236
|
-
exception — nothing after it ran, so running out of it is the `PAYMENT_REQUIRED`
|
|
237
|
-
error document and exit 1. Its lines, like the device code, go to stderr in
|
|
238
|
-
human form: stdout carries only the one document.
|
|
239
|
-
|
|
240
|
-
## `VIBECLOUD_TOKEN` — no login at all (VIBEC-336)
|
|
241
|
-
|
|
242
|
-
A token from `vibe token create`, exported, makes every command work with no
|
|
243
|
-
login round-trip — CI, a container:
|
|
244
|
-
|
|
245
|
-
VIBECLOUD_TOKEN=vibe_pat_… npx @vibecloudtr/cli project create --name crm --package LUNA
|
|
246
|
-
|
|
247
|
-
When `VIBECLOUD_TOKEN` is set it is the whole credential: the stored one is
|
|
248
|
-
not read, nothing is refreshed, and the API's `UNAUTHENTICATED` (with the fix
|
|
249
|
-
`vibe login`) is the answer once it has expired or been revoked. Anything that is not a
|
|
250
|
-
`vibe_pat_` value is refused at startup rather than sent. While the variable is
|
|
251
|
-
set it outranks everything: `vibe login` stores a credential that is ignored
|
|
252
|
-
until you `unset VIBECLOUD_TOKEN`, and `vibe logout` revokes and deletes the
|
|
253
|
-
stored credential but leaves the variable's token valid (it says so). See ENVIRONMENT.md.
|
|
254
|
-
|
|
255
|
-
## `vibe login`
|
|
256
|
-
|
|
257
|
-
`vibe login` performs the **OAuth 2.1 authorization-code flow with PKCE (S256)
|
|
258
|
-
over an RFC 8252 loopback redirect**, then renews from the refresh token as
|
|
259
|
-
commands need it. It binds an ephemeral port on `127.0.0.1`, prints (and tries to
|
|
260
|
-
open) an authorization URL, and waits for the callback.
|
|
261
|
-
|
|
262
|
-
**Why that flow, read off the server rather than a doc:**
|
|
263
|
-
|
|
264
|
-
- `oauth.Metadata` advertises `authorization_code`, `refresh_token` and — where
|
|
265
|
-
the deployment enables it — the RFC 8628 device grant (VIBEC-322, below).
|
|
266
|
-
OAuth 2.1 removed implicit and password, and there is no client-credentials
|
|
267
|
-
grant, so neither was ever an option.
|
|
268
|
-
- PKCE is mandatory and **S256 only**, and `token_endpoint_auth_methods_supported`
|
|
269
|
-
is `["none"]` — a public client, which is what a CLI is.
|
|
270
|
-
- `oauth.Server.ValidateRedirectURI` waives the **port** for a client registered
|
|
271
|
-
`Native` and nothing else: `http`, host `127.0.0.1` or `::1` (never
|
|
272
|
-
`localhost`, which DNS can point elsewhere), and the **path** must still match
|
|
273
|
-
a registered one. That is what makes an ephemeral loopback listener workable.
|
|
274
|
-
|
|
275
|
-
### `vibe login --device` — no browser on this machine
|
|
276
|
-
|
|
277
|
-
An AI agent driving the CLI in a terminal, a container or an SSH session has no
|
|
278
|
-
browser to open and no loopback the person could reach, so the code flow above
|
|
279
|
-
cannot complete. `--device` is the RFC 8628 device authorization grant:
|
|
280
|
-
|
|
281
|
-
1. `POST /oauth/device_authorization` (client_id, scope, resource) returns a
|
|
282
|
-
`device_code` this process keeps and a `user_code` it prints, with the
|
|
283
|
-
address to open — the web app's `/device`.
|
|
284
|
-
2. The person opens that address in **any** browser where they are signed in
|
|
285
|
-
to the console (a phone will do), types the code, reads which client wants
|
|
286
|
-
which scopes, and approves. The API's `/oauth/device` page accepts a
|
|
287
|
-
browser session only — never a bearer token — and binds the approving POST
|
|
288
|
-
to that session, the organisation on screen and the code with an HMAC.
|
|
289
|
-
3. The CLI polls `/oauth/token` with
|
|
290
|
-
`grant_type=urn:ietf:params:oauth:grant-type:device_code` at the server's
|
|
291
|
-
`interval` (5 s). `authorization_pending` keeps polling; `slow_down` adds
|
|
292
|
-
five seconds to the interval and never retries early; `access_denied` and
|
|
293
|
-
`expired_token` stop with a reason. The client gives up at the server's
|
|
294
|
-
`expires_in` (30 min) or its own 30-minute ceiling, whichever is sooner.
|
|
295
|
-
|
|
296
|
-
The credential that comes back is the same shape as the browser flow's, stored
|
|
297
|
-
in the same file, renewed by the same refresh path. ⚠ **The device_code is never
|
|
298
|
-
printed** — only the user code and the address are, which is exactly what an
|
|
299
|
-
agent should relay to its human. A deployment that does not advertise
|
|
300
|
-
`device_authorization_endpoint` (`OAUTH_DEVICE_VERIFICATION_URI` unset on the
|
|
301
|
-
API) is refused by name before any request is made.
|
|
302
|
-
|
|
303
|
-
**Why not the console session.** `/auth/login` returns a `__Host-vc_session`
|
|
304
|
-
cookie and `authenticate` does read it — from the Cookie header. Deliberately not
|
|
305
|
-
used: it would make the CLI collect the account password, put a long-lived
|
|
306
|
-
console credential on disk, and hand the CLI the `browser` credential kind, which
|
|
307
|
-
is what `@dangerous` accepts with a 15-minute step-up window. Borrowing a cookie
|
|
308
|
-
would **defeat** that gate rather than satisfy it; the CLI answers each dangerous
|
|
309
|
-
request with its own fresh code instead (dec. 236).
|
|
310
|
-
|
|
311
|
-
**Why a PAT is not the login either.** `vibe token create` mints one (it asks
|
|
312
|
-
for a two-factor code, dec. 236), and a `vibe_pat_` value pasted into
|
|
313
|
-
`~/.vibecloud/token` still works — the loader accepts that bare form
|
|
314
|
-
deliberately — but a PAT can never run a `@dangerous` command: only the OAuth
|
|
315
|
-
login can answer the per-request code.
|
|
316
|
-
|
|
317
|
-
### 🔴 One value the server publishes nowhere, so it is still required
|
|
318
|
-
|
|
319
|
-
VIBECLOUD_OAUTH_RESOURCE or --resource # required
|
|
320
|
-
VIBECLOUD_OAUTH_CLIENT_ID or --client-id # defaults to `vibe-cli`
|
|
321
|
-
|
|
322
|
-
- **client_id — defaulted to `vibe-cli`, in every environment including prod.**
|
|
323
|
-
A `client_id` is this program's public name, not a deployment secret and not a
|
|
324
|
-
per-deployment value, so one default belongs in the binary and every deployment
|
|
325
|
-
registers the same entry. ⚠ **`vibe-cli` must therefore be in the deployment's
|
|
326
|
-
`OAUTH_CLIENTS`** — only `local/scripts/api.sh` has it today. A deployment
|
|
327
|
-
without it answers `invalid_client`, which the preflight below catches before a
|
|
328
|
-
browser opens and reports by name; that is a louder failure than "client_id not
|
|
329
|
-
set", and it names the fix instead of sending someone to look up a value only
|
|
330
|
-
the deployment's operator knows. The API can offer RFC 7591 dynamic client registration
|
|
331
|
-
(`OAUTH_DYNAMIC_REGISTRATION`, off by default) for third-party MCP clients, but the
|
|
332
|
-
CLI never uses it: a compiled-in `vibe-cli` entry in `OAUTH_CLIENTS` is the point.
|
|
333
|
-
- **resource — defaulted to `https://api.vibecloud.tr` when `VIBECLOUD_API` is
|
|
334
|
-
unset (VIBEC-322), and NOT defaulted for any other deployment.** The public
|
|
335
|
-
API's audience is its own origin and is the one value this binary can know;
|
|
336
|
-
everything below is about the custom-deployment case, where `vibe login` is
|
|
337
|
-
still not zero-config.
|
|
338
|
-
The issued token carries exactly this value as its `aud`, and `authenticate`
|
|
339
|
-
compares it against the deployment's explicit `OAUTH_API_RESOURCE` (since the
|
|
340
|
-
2026-08-15 API/MCP audience split — previously the positional
|
|
341
|
-
`OAUTH_RESOURCES[0]`); a token audienced anywhere else is treated as **no
|
|
342
|
-
credential at all**. `oauth.Server.Metadata` advertises
|
|
343
|
-
`resource_indicators_supported: true` and **no identifiers**, and the API serves
|
|
344
|
-
no RFC 9728 protected-resource metadata for itself, so there is nowhere to read
|
|
345
|
-
it from. 🔴 **Deriving it is actively unsafe now that a deployment has two
|
|
346
|
-
distinct audiences**: `<issuer>/mcp` is the MCP server's resource, not the
|
|
347
|
-
API's — exporting that here mints a token GraphQL refuses outright. For the
|
|
348
|
-
local slice the correct value is the issuer itself,
|
|
349
|
-
`https://local.vibecloud.tr:8443` (no `/mcp`). **The fix is upstream in
|
|
350
|
-
`api/`**: serve `/.well-known/oauth-protected-resource`. Until then this one is
|
|
351
|
-
exported by hand.
|
|
352
|
-
|
|
353
|
-
Scopes _are_ discovered — the metadata's `scopes_supported` — but that is the
|
|
354
|
-
**deployment's** vocabulary, not the **client's** registration, and
|
|
355
|
-
`oauth.Server.ValidateScopes` bounds the request by the latter. A client
|
|
356
|
-
registered for a subset is refused with `invalid_scope` (measured: a client
|
|
357
|
-
registered for `mcp:tools` alone answered `scope "mcp:db" is not permitted for
|
|
358
|
-
this client`), so `--scope` / `VIBECLOUD_OAUTH_SCOPES` exists to narrow it. It is
|
|
359
|
-
optional; empty means "ask for what the server advertises".
|
|
360
|
-
|
|
361
|
-
### The client must be registered `Native: true`, on a `/callback` path
|
|
362
|
-
|
|
363
|
-
The request is sent **once from the CLI before the browser opens**, to find out
|
|
364
|
-
whether the server will accept its shape. 🔴 Without that, the commonest
|
|
365
|
-
first-run failure is invisible: `handleAuthorize` answers an unknown `client_id`
|
|
366
|
-
or an unregistered `redirect_uri` with an HTTP **400 JSON body** rather than a
|
|
367
|
-
redirect — deliberately, since it has no validated URI to bounce an error to —
|
|
368
|
-
and that answer goes to the _browser_, so the loopback listener waits for a
|
|
369
|
-
callback that never comes. Measured on 2026-08-15: an unregistered `client_id`
|
|
370
|
-
left `vibe login` on "giris bekleniyor..." for the full five minutes. It now
|
|
371
|
-
fails in under a second, naming the client and `OAUTH_CLIENTS`.
|
|
372
|
-
|
|
373
|
-
The preflight is side-effect free: with no session cookie the endpoint cannot
|
|
374
|
-
attribute the request to anyone, so it never issues a code.
|
|
375
|
-
|
|
376
|
-
Two registration mistakes and what they look like, both measured against a live
|
|
377
|
-
API:
|
|
378
|
-
|
|
379
|
-
| Registration | Answer |
|
|
380
|
-
| --------------------------------------- | ----------------------------------------------------------------------- |
|
|
381
|
-
| `client_id` absent from `OAUTH_CLIENTS` | `invalid_client: unknown client_id` |
|
|
382
|
-
| registered but `Native: false` | `invalid_request: redirect_uri does not exactly match a registered URI` |
|
|
383
|
-
|
|
384
|
-
The port is waived for a native client; the **path is not**. Register a loopback
|
|
385
|
-
URI whose path is `/callback` (the port in the registration is ignored).
|
|
386
|
-
|
|
387
|
-
### What is stored, and where — ⚠ a cross-repo contract
|
|
388
|
-
|
|
389
|
-
`~/.vibecloud/token` — **the same path**, because renaming it would sign out
|
|
390
|
-
every existing user silently. Written atomically at mode **0600**:
|
|
391
|
-
`os.WriteFile`'s permission argument applies only when it _creates_ the file, so
|
|
392
|
-
writing over a pre-existing 0644 token file left it world-readable.
|
|
393
|
-
|
|
394
|
-
**Two forms are read; one is written.** Anything whose first non-space byte is
|
|
395
|
-
`{` is the JSON document below. Anything else is taken as an opaque bearer value,
|
|
396
|
-
trimmed — that is a `vibe_pat_` PAT pasted from the console, and it is also what
|
|
397
|
-
a hand-injected access token looks like. The discrimination is on the first byte,
|
|
398
|
-
never on a prefix guess about the token itself.
|
|
399
|
-
|
|
400
|
-
```json
|
|
401
|
-
{
|
|
402
|
-
"access_token": "eyJhbGciOiJFZERTQSJ9....", // required; Bearer value
|
|
403
|
-
"refresh_token": "…", // omitted for the opaque form
|
|
404
|
-
"expires_at": "2026-08-15T00:36:40+03:00", // RFC 3339; access-token expiry
|
|
405
|
-
"token_url": "https://…/oauth/token", // where to run the refresh grant
|
|
406
|
-
"client_id": "vibe-cli", // presented on the refresh grant
|
|
407
|
-
"issuer": "https://…", // the AS that minted it
|
|
408
|
-
"scopes": ["mcp:tools", "mcp:db"] // as granted, not as requested
|
|
409
|
-
}
|
|
13
|
+
```sh
|
|
14
|
+
npx @vibecloudtr/cli login
|
|
410
15
|
```
|
|
411
16
|
|
|
412
|
-
|
|
413
|
-
treat `expires_at` as advisory. **A reader that also renews** must run the refresh
|
|
414
|
-
grant against `token_url` with `client_id`, and must **persist the rotated
|
|
415
|
-
`refresh_token`** — `oauth.Server.RefreshAccessToken` consumes the one it is
|
|
416
|
-
presented, so a reader that renews without writing back leaves the next process
|
|
417
|
-
holding a spent token. `expires_at` absent (or zero) means _no client-side
|
|
418
|
-
expiry_: that is the opaque form, where only the API decides when the credential
|
|
419
|
-
dies.
|
|
420
|
-
|
|
421
|
-
Access tokens live **15 minutes** (`oauth.AccessTokenTTL`), so renewal is the
|
|
422
|
-
common path, not an edge case — and refresh tokens **rotate**, so the new one is
|
|
423
|
-
persisted before the command runs. A renewal that is not written back makes a
|
|
424
|
-
login last exactly one command.
|
|
425
|
-
|
|
426
|
-
⚠ `token_url` is checked against the same **https-or-literal-loopback** rule as
|
|
427
|
-
`VIBECLOUD_API` before a refresh token is posted to it. The file is a contract
|
|
428
|
-
other tools write, and a `token_url` naming an `http://` host would have had every
|
|
429
|
-
renewal hand a live credential to it in the clear.
|
|
430
|
-
|
|
431
|
-
⚠ **The mode is checked on READ too, not only on write, and the DIRECTORY with
|
|
432
|
-
it.** `Save` always ends at 0600 and tightens `~/.vibecloud` to 0700, so a
|
|
433
|
-
credential this CLI produced is safe — but the bare form above is documented as
|
|
434
|
-
something a person pastes in, and `echo … > ~/.vibecloud/token` under the usual
|
|
435
|
-
umask creates it **0644**: a live bearer token every account on the machine can
|
|
436
|
-
read. A 0600 file in a group-writable directory is worse still, because it can be
|
|
437
|
-
**replaced** and the next command presents somebody else's credential. `Load`
|
|
438
|
-
narrows both and **names what it narrowed** on the next command rather than
|
|
439
|
-
repairing it in silence, because doing it now does not undo however long it sat
|
|
440
|
-
there.
|
|
441
|
-
|
|
442
|
-
### `vibe logout` ends the session on the server, then deletes the file
|
|
443
|
-
|
|
444
|
-
A `vibe login` credential carries a refresh token that stays valid for 400 days
|
|
445
|
-
from its last use (`oauth.RefreshTokenTTL`; rotation renews it on every use, so a
|
|
446
|
-
CLI in use never has to log in again). `vibe logout` therefore revokes it first,
|
|
447
|
-
at the authorization server that **minted** it (RFC 7009: the `revocation_endpoint`
|
|
448
|
-
of the discovery document found from the credential's own `token_url`, never from
|
|
449
|
-
`VIBECLOUD_API`, which may be another deployment that answers 200 for a token it
|
|
450
|
-
never issued), then **removes** the file:
|
|
451
|
-
|
|
452
|
-
- the **refresh token** stops working immediately, on every machine holding a copy;
|
|
453
|
-
- the **access token** lives out the rest of its 15 minutes
|
|
454
|
-
(`oauth.AccessTokenTTL`): it is a signed JWT and cannot be revoked.
|
|
455
|
-
|
|
456
|
-
🔴 **A failed revoke keeps the file.** It holds the only copy of the token a retry
|
|
457
|
-
can end, so the command exits non-zero, `deleted` and `serverSessionEnded` are
|
|
458
|
-
`false`, and running `vibe logout` again once the API answers finishes the job.
|
|
459
|
-
`vibe logout --local` deletes the file without contacting the server, for someone
|
|
460
|
-
who accepts that a copy stays live; a password reset ends every refresh token the
|
|
461
|
-
account holds (`handleResetPassword` calls `RevokeRefreshForSubject` with the
|
|
462
|
-
user id). A token another `vibe` process rotated in while logout ran is revoked
|
|
463
|
-
too, with one window left open: a process that has already exchanged the old
|
|
464
|
-
token but not yet written the new one can write it back after logout deleted
|
|
465
|
-
the file (and logout then reports `serverSessionEnded: true`); stop other `vibe`
|
|
466
|
-
processes before logging out on a shared machine. A credential that has a
|
|
467
|
-
refresh token but lacks the fields to revoke it is refused, like an unreadable
|
|
468
|
-
one, unless `--local`. A PAT (`vibe_pat_…`) is not revoked here: the command
|
|
469
|
-
deletes it from this machine and says to revoke it from the console's access-key
|
|
470
|
-
list (a password reset does not revoke access keys).
|
|
471
|
-
|
|
472
|
-
### What login prints about your organisation, and why it is two lines
|
|
473
|
-
|
|
474
|
-
`vibe login` reports the org the **credential is bound to** (the token's `org_id`
|
|
475
|
-
claim, which is what `handleAuthorize` actually bound) separately from the orgs
|
|
476
|
-
the **account belongs to** (`Query.orgs`). 🔴 They are different questions:
|
|
477
|
-
`queryResolver.Orgs` returns every org the _user_ is a member of, not the token's
|
|
478
|
-
scope (found by the mcp lane, `api-contract.md` §4.4). Printing only the second
|
|
479
|
-
would tell a multi-org customer their credential covers organisations it was
|
|
480
|
-
never minted for.
|
|
481
|
-
|
|
482
|
-
### 🔴 `--org` cannot select a tenancy, and every command now says so the same way
|
|
483
|
-
|
|
484
|
-
A token is minted for **one** organisation — `handleAuthorize` reads it from the
|
|
485
|
-
signed-in human's session and takes none from the caller, a `vibe_pat_` PAT
|
|
486
|
-
carries the tenancy it was created in, and `authenticate` puts that value in
|
|
487
|
-
`id.OrgID` for every request. So `--org` is **checked, never honoured**: the CLI
|
|
488
|
-
acts in the credential's organisation and **refuses**, naming both, when asked
|
|
489
|
-
for another. That holds for `vibe login` (which exits non-zero rather than
|
|
490
|
-
printing a note) and for every command that takes an org — they all resolve
|
|
491
|
-
through one function, `commands.resolveOrg`, and
|
|
492
|
-
`commands/orgscope_test.go` fails the build if a new one does not.
|
|
493
|
-
|
|
494
|
-
`vibe org` marks which row the credential is bound to. Unmarked, the list read
|
|
495
|
-
as a menu of organisations the CLI could work in; on a multi-org account only
|
|
496
|
-
one row of it is true.
|
|
497
|
-
|
|
498
|
-
⚠ **This is a message, not a boundary — the boundary is the server's, and one
|
|
499
|
-
part of it is missing upstream.** Where the CLI touches the API the server draws
|
|
500
|
-
the line itself: `Query.org(id:)` and `Query.projectBySlug(orgId:)` both compare
|
|
501
|
-
the argument against `scopeOf(ctx)` and return null when it differs. So a
|
|
502
|
-
mismatched `--org` was already refused — as `organizasyon bulunamadi` /
|
|
503
|
-
`proje bulunamadi`, which blames a membership that is fine. The refusal replaces
|
|
504
|
-
that with the truth. 🔴 The hole is `orgs { projects }` in a single document:
|
|
505
|
-
`queryResolver.Orgs` hands back an `Org` for every org the **user** belongs to,
|
|
506
|
-
and `orgResolver.Projects`/`Invoices` then read `obj.ID` rather than the scope
|
|
507
|
-
(`api-contract.md` §4.4). No command composes that traversal and none may — a
|
|
508
|
-
client-side filter over a server that would have answered is not a boundary, so
|
|
509
|
-
the fix is upstream and `TestNoCommandTraversesQueryOrgsIntoOrgScopedCollections`
|
|
510
|
-
keeps the CLI out of it meanwhile.
|
|
511
|
-
|
|
512
|
-
⚠ A PAT carries no binding this process can read, so with one of those `--org`
|
|
513
|
-
behaves as it always did: it selects, and the server still refuses a mismatch —
|
|
514
|
-
the CLI just cannot name which org it should have been.
|
|
515
|
-
|
|
516
|
-
### Dangerous commands ask for a two-factor code (dec. 236)
|
|
517
|
-
|
|
518
|
-
The credential is an OAuth access token (`CredentialKind: "oauth"`). Since dec. 236
|
|
519
|
-
the API admits it to a `@dangerous` mutation when the token carries `mcp:dangerous`
|
|
520
|
-
**and** the request carries a fresh TOTP code in the `Vibecloud-Otp` header — one
|
|
521
|
-
code per request, no window, TOTP only. `stepup.ts` asks for the code, hidden, when
|
|
522
|
-
the API answers `MFA_REQUIRED`; opens the console's enrolment page
|
|
523
|
-
(`details.enrolUrl`) when the account has no second factor; asks again after a
|
|
524
|
-
refused code (a code works once); and takes `--otp <code>` when nobody can be asked
|
|
525
|
-
(`--json`, `--no-input`, no terminal), refusing at once without it. A login from
|
|
526
|
-
before the scope existed gets `FORBIDDEN_SCOPE` and is told to `vibe login` again.
|
|
527
|
-
A PAT is refused before the code (`CREDENTIAL_KIND_FORBIDDEN`). The dangerous
|
|
528
|
-
request is sent once, never retried: a spent code would read as a wrong one.
|
|
529
|
-
|
|
530
|
-
### Output, flags and language
|
|
531
|
-
|
|
532
|
-
Human mode writes the result to stdout; everything else (`✓` success, `!` warning,
|
|
533
|
-
`›` hint, steps and spinners, errors) goes to stderr. Global flags: `-h/--help`,
|
|
534
|
-
`--json`, `--no-input`, `--no-color`, `-q/--quiet`, `--verbose`. A bare topic
|
|
535
|
-
(`vibe project`, `vibe app`) prints that topic's help and exits 0; it does not
|
|
536
|
-
list anything. `vibe init` writes `.vibe/project.json` (`{"org","project"}`), and
|
|
537
|
-
`-o/--org` and `-p/--project` default from it, as a pair, for commands run in
|
|
538
|
-
that tree (a differing `--org` or `--project`, or a differing `VIBECLOUD_ORG` with no `--org`, drops the link).
|
|
539
|
-
`deploy start` and `deploy upload` wait for the build in human mode (`--no-wait`
|
|
540
|
-
skips it) and print only the URL on stdout. Messages are Turkish; `VIBE_LANG=en`
|
|
541
|
-
or an English `LC_ALL`/`LC_MESSAGES`/`LANG` selects English. Piped tables carry
|
|
542
|
-
ISO times. Spec: `base/docs/cli-output-guidelines.md`.
|
|
543
|
-
|
|
544
|
-
### What the commands do, and what they refuse
|
|
545
|
-
|
|
546
|
-
| Command | Reads / writes |
|
|
547
|
-
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
548
|
-
| `vibe org`, `vibe team list` | `Query.orgs`, `Org.members` |
|
|
549
|
-
| `vibe project list\|status\|create\|resize` | `Org.projects`, `projectBySlug`, `createProject`, `changePackage` |
|
|
550
|
-
| `vibe usage` | `Org.projects`, `Project.usage`, `Project.caps` — org-scoped egress and build minutes printed once, nullable dimensions as `olculmedi` and never as 0 |
|
|
551
|
-
| `vibe app list\|create\|config` | `Project.apps`, `createApp`, `setAppOutputMode` — every nullable field printed as its own "not yet" sentence; `firstLiveAt` is read, never derived from `phase`. `--output-mode static\|standalone` and `--output-dir <dir>` (static only) on `create` and `config` (VIBEC-478); omitted flags are not sent, so the server defaults apply (new app `STANDALONE`, directory `dist`). `config` reports acceptance only: if the app has been built before, the cell rebuilds the current commit with the new mode and the running version serves until that build is live; if it has never been built, nothing is rebuilt and the next `vibe deploy start` uses the new mode. Both cases are printed, since the API cannot tell which applies. An unreported mode prints as `bildirilmedi`, never as standalone |
|
|
552
|
-
| `vibe db connect\|introspect\|security\|migrate` | `Project.endpoints.db`, `Project.schema`, `Project.rlsAdvisor`, `applyMigration` |
|
|
553
|
-
| `vibe deploy start\|upload\|cancel\|rollback` | `deployApp`, `createSourceUpload` + `deployUpload` (`upload`: packs `--dir`, default `.`, and deploys an UPLOAD app, one with no git remote), `cancelBuild`, `rollbackApp`, `App.rollbackTargets` |
|
|
554
|
-
| `vibe domain add\|verify\|list\|release` | `addDomain` (with `--app`, or the project's only app; prints the DCV CNAME (none for a `HOSTED` domain inside an active zone) **and** the routing record — CNAME to `<app>.vibeapp.tr` for a subdomain, A to the cell's apps address for an apex, VIBEC-373), `verifyDomain`, `Project.domains` (`routingRecord` per row), `removeDomain` |
|
|
555
|
-
| `vibe zone add\|prove\|list\|verify\|remove`| `addDnsZone` (seeds records from `dnsZoneImport` unless `--no-import`; prints the claim's nameservers, dec. 235), `proveDnsZoneControl` (TXT proof that evicts another org's pending claim), `Project.dnsZones`, `verifyDnsZone`, `removeDnsZone`|
|
|
556
|
-
| `vibe record list\|set\|add\|rm`| `Project.dnsZones` (records), `setDnsRecords` (one zone's record set, upsert and remove; platform-managed rows are refused with `DNS_RECORD_RESERVED`)|
|
|
557
|
-
| `vibe branch create\|list\|extend\|delete` | `createBranch`, `Project.branches`, `extendBranch`, `deleteBranch` — a preview branch (VIBEC-72): its own database (shared pair on Luna/Terra/Sol, isolated instance on Pro), keys and `<slug>--<name>.api` hostname, TTL 3 d default / 5 d max from creation; `--mode clone` copies production rows and needs the org owner's toggle. `--branch <name>` on `deploy start`, `db migrate` and `db connect` targets it |
|
|
558
|
-
| `vibe config set\|secret\|list\|unset` | `setAppConfig`, `App.config` — `config secret --scope BUILD\|RUNTIME` says where the secret is read: `BUILD` mounts it for `next build` only (a `DATABASE_URL` a prerendered page queries at build time, a Sentry token for sourcemap upload) and turns off cache mounts for that build; `RUNTIME` gives it to the running app only. Without `--scope` nothing is sent and the API's documented default applies: `RUNTIME`. Any other value is refused before the secret is read. `config set --value-from projectEndpoint:api\|projectSecret:anonKey` writes a platform-derived source instead of a literal (VIBEC-469); exactly one of `--value`, `--file`, `--value-from` |
|
|
559
|
-
| `vibe backups` | `Project.backups`, `Project.caps` |
|
|
560
|
-
| `vibe token list\|revoke` | `Query.tokens`, `revokeToken` |
|
|
561
|
-
| Two-factor code per request (dec. 236, 237)| `vibe project delete` `deleteProject` · `vibe domain release` `removeDomain` · `vibe zone remove` `removeDnsZone` · `vibe project resize` `changePackage` · `vibe key reveal\|rotate` `revealServiceRoleKey` + `revealedServiceRoleKey`, `rotateProjectKey` · `vibe db owner-credential` `revealDatabaseOwnerCredential` + `revealedDatabaseOwnerCredential` · `vibe token create` `createToken` · `vibe restore` `createRestore` · `vibe team invite\|remove\|role\|transfer-owner` `inviteMember`, `removeMember`, `changeMemberRole`, `transferOwnership` · `vibe access grant\|revoke` `grantProjectAccess`, `revokeProjectAccess` · `vibe smtp set\|clear` `setProjectSmtp` (password hidden prompt or `--password-stdin`, never a flag value), `clearProjectSmtp` · `vibe project auth-config` `setProjectAuthConfig` · `vibe project egress` `setEgressAllowlist` · `vibe rls guardrail\|exception` `setRowLevelSecurityGuardrail`, `setTableRowLevelSecurityException` · `vibe billing cancel\|payment-method` `cancelSubscription`, `updatePaymentMethod` · `vibe mfa disable` `disableMfa` · `vibe export download` `downloadDataExport`. Destructive ones (`project delete`, `key rotate`, `restore`, `billing cancel`) also take a typed `--confirm <project>`|
|
|
562
|
-
|
|
563
|
-
**Two classes of refusal, both exiting non-zero with the reason named.** Neither
|
|
564
|
-
is an unknown-flag error: someone who types the command deserves to learn why.
|
|
565
|
-
|
|
566
|
-
- **The terminal cannot do it.** `vibe billing card`: `updateSubscriptionCard`
|
|
567
|
-
answers iyzico's hosted form, an HTML fragment that only runs in a browser, so
|
|
568
|
-
the command names the console page instead of calling the API. (Until dec. 236
|
|
569
|
-
the `@dangerous` commands were refusals too; they now ask for a code.)
|
|
570
|
-
- **The API has no field for it.** `vibe deploy force`: there is no cache-invalidating
|
|
571
|
-
field in `DeployAppInput`.
|
|
572
|
-
- **Logs are read, not refused.** `vibe logs` reads an app's runtime logs through
|
|
573
|
-
`App.logs` (VIBEC-492), and `vibe deploy logs` a build's stored output through
|
|
574
|
-
`downloadBuildLog` (VIBEC-535) — both refused here, saying the schema had no log
|
|
575
|
-
field, while those fields served them. `downloadBuildLog` is closed to the
|
|
576
|
-
`vibe login` token and open to a `VIBECLOUD_TOKEN` access key, and the command
|
|
577
|
-
says so when it is refused. Live streaming is deliberately absent
|
|
578
|
-
(`api-contract.md` §7), and tenant request logs are Law 5651 access-log material
|
|
579
|
-
that `cell/cmd/router` keeps in a hash chain — surfacing them is a compliance
|
|
580
|
-
decision rather than a missing resolver.
|
|
581
|
-
|
|
582
|
-
### 🔴 The CLI must never print a value it was not given
|
|
583
|
-
|
|
584
|
-
Five command files used to fabricate: backup dates for a project with no backup,
|
|
585
|
-
a constant DNS challenge value, `SEC_001`/`SEC_002` advisor codes that exist
|
|
586
|
-
nowhere in this platform, a `vb_tok_`-prefixed "token", and a scripted successful
|
|
587
|
-
deployment. A fabricated value is worse than a stub — a stub is honest, while a
|
|
588
|
-
plausible specific wrong answer is one a customer acts on before doing something
|
|
589
|
-
destructive.
|
|
590
|
-
|
|
591
|
-
`src/cli/nofabrication.test.ts` is the guard. It parses every non-test source
|
|
592
|
-
with the TypeScript compiler API and fails if any **string literal** contains one
|
|
593
|
-
of the removed values, or one of the removed **claims** (`"yeni revizyon
|
|
594
|
-
yayinda"`, `"geri yukleme basarili"`, `"migration uygulandi"`, …). A second test
|
|
595
|
-
asserts every command file either queries the API or refuses, because there is no
|
|
596
|
-
third honest option. It inspects literals rather than file text so the repaired
|
|
597
|
-
functions can keep quoting what they removed.
|
|
598
|
-
|
|
599
|
-
🔴 It is not a transliteration of the Go original, and the difference is the
|
|
600
|
-
point. Go has no string interpolation, so `ast.BasicLit` was the whole surface; in
|
|
601
|
-
TypeScript `` `derleme tamam (${n}s)` `` puts its text in TemplateHead/Middle/Tail
|
|
602
|
-
nodes, none of which is a StringLiteral. A direct port would have passed over
|
|
603
|
-
every fabricated message the port happened to rewrite as a template — which is
|
|
604
|
-
most of them. All four node kinds are walked, and a test pins that.
|
|
605
|
-
|
|
606
|
-
### Verifying against a live API
|
|
607
|
-
|
|
608
|
-
`go test ./...` covers the wire format, the refusals and the rendering against an
|
|
609
|
-
`httptest` server speaking the API's shapes, with no network and no docker. That
|
|
610
|
-
is not the same as having talked to the API, so do this by hand:
|
|
611
|
-
|
|
612
|
-
# 1. Bring up Postgres 17, Kafka and the control-plane API on :8443
|
|
613
|
-
cd ../local && bash scripts/postgres.sh up && bash scripts/kafka.sh up && bash scripts/api.sh up
|
|
614
|
-
|
|
615
|
-
# 2. Seed the dev fixtures (needs DEV_FIXTURES=1, which scripts/api.sh sets)
|
|
616
|
-
curl -sk -X POST https://127.0.0.1:8443/dev/fixtures -d '{}' -H 'Content-Type: application/json'
|
|
617
|
-
|
|
618
|
-
# 3. The whole login round trip, from a clean HOME with no hand-injected token
|
|
619
|
-
bash scripts/verify-login.sh
|
|
620
|
-
|
|
621
|
-
# 4. Or drive individual commands by hand, with a throwaway HOME so your real
|
|
622
|
-
# credential is untouched. `vibe login` obtains the credential itself now.
|
|
623
|
-
export HOME=/tmp/vibe-e2e VIBECLOUD_API=https://127.0.0.1:8443/query
|
|
624
|
-
export SSL_CERT_FILE="$(mkcert -CAROOT)/rootCA.pem" # the API serves mkcert TLS
|
|
625
|
-
# the API's own resource — NOT the MCP server's `/mcp` resource, which GraphQL refuses
|
|
626
|
-
export VIBECLOUD_OAUTH_RESOURCE=https://local.vibecloud.tr:8443
|
|
627
|
-
mkdir -p $HOME
|
|
628
|
-
vibe login # open the printed URL in a browser signed in to the console
|
|
629
|
-
|
|
630
|
-
vibe org
|
|
631
|
-
vibe project status --project musteri-crm
|
|
632
|
-
vibe backups --project musteri-crm
|
|
633
|
-
vibe db security --project musteri-crm
|
|
634
|
-
vibe config list --project musteri-crm
|
|
635
|
-
vibe token create # must refuse, exit 1
|
|
636
|
-
|
|
637
|
-
⚠ **No `VIBECLOUD_OAUTH_CLIENT_ID` above.** The CLI logs in as `vibe-cli`, which
|
|
638
|
-
`local/scripts/api.sh` registers. 🔴 The API reads `OAUTH_CLIENTS` **at boot**, so
|
|
639
|
-
a slice started before that entry was added does not know the client and answers
|
|
640
|
-
`invalid_client` — restart it (`cd ../local && bash scripts/api.sh down && bash
|
|
641
|
-
scripts/api.sh up`) rather than exporting a different client id.
|
|
642
|
-
|
|
643
|
-
⚠ The console sign-in has to be on the **issuer's** origin, which is not
|
|
644
|
-
necessarily the CLI's. The local slice issues `https://local.vibecloud.tr:8443`
|
|
645
|
-
while `VIBECLOUD_API` points at `https://127.0.0.1:8443`, and
|
|
646
|
-
`__Host-vc_session` is bound to the host that set it.
|
|
647
|
-
|
|
648
|
-
`scripts/verify-login.sh` is the scripted form of all of that: it runs
|
|
649
|
-
`vibe login` against the live API from a clean `HOME` **with no client id
|
|
650
|
-
exported**, plays the browser (console sign-in, then the authorization request,
|
|
651
|
-
following the redirect to the CLI's loopback listener), and then asserts that the
|
|
652
|
-
request carried the compiled-in client id, the credential file's mode, that the
|
|
653
|
-
API returns real data, that `--org` is checked and not honoured, that
|
|
654
|
-
`@dangerous` still refuses, that an expired access token renews and the rotation
|
|
655
|
-
reaches disk, and that logout clears it and states what survives. It is **not** in
|
|
656
|
-
`make check` — it needs a live API, and it **skips loudly** rather than passing
|
|
657
|
-
when one is absent.
|
|
17
|
+
`npx` her seferinde son sürümü çalıştırır. Kalıcı kurulum için:
|
|
658
18
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
| --- | -------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
664
|
-
| 1 | an unregistered `--client-id` | the preflight, without which login waits five minutes for a callback that never comes |
|
|
665
|
-
| 2 | `VIBECLOUD_API=http://…` | a bearer token sent in the clear |
|
|
666
|
-
| 3 | a 0644 credential file in a 0777 directory | a secret every account on the machine can read — or replace — used without a word |
|
|
667
|
-
| 4 | a resource the AS mints for and the API refuses | login reporting success while storing a credential no command can use |
|
|
668
|
-
| 5 | `--org` naming a real membership that is not the binding | a command running in the wrong tenancy |
|
|
669
|
-
|
|
670
|
-
Controls 4 and 5 need setup this script does not do for you: `VERIFY_REFUSED_RESOURCE`
|
|
671
|
-
naming a resource the deployment mints for but the API refuses — the local
|
|
672
|
-
slice's own `OAUTH_MCP_RESOURCE` now qualifies, since the 2026-08-15 audience
|
|
673
|
-
split gave it two resources instead of one — and an account in two
|
|
674
|
-
organisations (`VERIFY_OTHER_ORG`). They **skip loudly** without them.
|
|
675
|
-
|
|
676
|
-
What was exercised this way on 2026-08-14, against the seeded `acme` org: every
|
|
677
|
-
read above returned live data; `config set` wrote a value that `config list` read
|
|
678
|
-
back; `config secret` wrote through stdin and the value came back unreadable;
|
|
679
|
-
`domain add` returned a freshly minted challenge (a different value per domain);
|
|
680
|
-
and a deliberately secret-shaped `ENV` value was **refused by the API** with
|
|
681
|
-
`SECRET_IN_PLAINTEXT_ENV` on the operation, which the command reported as a
|
|
682
|
-
failure with exit 1.
|
|
683
|
-
|
|
684
|
-
⚠ Not covered by the local slice: nothing consumes the bus, so any operation that
|
|
685
|
-
crosses into a cell stays `QUEUED`. `db migrate` therefore reports "still queued,
|
|
686
|
-
not confirmed" and exits non-zero — which is the intended answer, not a bug.
|
|
687
|
-
|
|
688
|
-
What was exercised on **2026-08-15**, against an isolated API on `:8543` (its own
|
|
689
|
-
database, `OAUTH_CLIENTS` copied verbatim from `local/scripts/api.sh`, a second
|
|
690
|
-
`OAUTH_RESOURCES` entry, and a second organisation with the demo account as a
|
|
691
|
-
member — the shared slice was left untouched):
|
|
692
|
-
|
|
693
|
-
- `vibe login` from a clean `HOME` with **nothing but `VIBECLOUD_API` and
|
|
694
|
-
`VIBECLOUD_OAUTH_RESOURCE`** exported. The authorization request carried
|
|
695
|
-
`client_id=vibe-cli` and the flow completed.
|
|
696
|
-
- All five negative controls above, each failing as it must.
|
|
697
|
-
- The multi-org case end to end: login bound the credential to `acme` and listed
|
|
698
|
-
both memberships; `vibe org` marked the bound row; `vibe project list` with no
|
|
699
|
-
`--org` used the binding instead of asking (the previous behaviour **refused**
|
|
700
|
-
here — "birden fazla organizasyona uyesiniz"); `--org ikinci-firma` was refused
|
|
701
|
-
naming both; `vibe login --org ikinci-firma` exited 1.
|
|
702
|
-
- ⚠ Two upstream facts measured with a real access token, both in `api/`, both
|
|
703
|
-
reported and neither worked around here:
|
|
704
|
-
`orgs { projects }` returned the **other** organisation's project count while
|
|
705
|
-
`org(id: <other>)` correctly returned `null` — the §4.4 bypass, confirmed; and
|
|
706
|
-
with `DEV_FIXTURES=1`, `Query.viewer` returns a **seeded** viewer (`id: v_1`,
|
|
707
|
-
`canPerformDangerousActions: true`) to any authenticated caller, so the login
|
|
708
|
-
banner's `hesap:` line under fixtures shows the fixture's address rather than
|
|
709
|
-
the credential's.
|
|
710
|
-
|
|
711
|
-
## `vibe migrate vercel` (#74)
|
|
712
|
-
|
|
713
|
-
Migrates an existing Vercel-hosted Next.js project onto our standalone stack,
|
|
714
|
-
or a plain Vite SPA onto the static output mode (VIBEC-478): a `vite` dependency,
|
|
715
|
-
a root `index.html` and none of the framework markers (TanStack Start, SvelteKit,
|
|
716
|
-
Astro, Nuxt, React Router framework mode, …). The migrator does not plan those; the
|
|
717
|
-
build refuses SvelteKit, Astro, Nuxt and the rest, and builds TanStack Start and React
|
|
718
|
-
Router framework mode in `standalone` (or `static` in SPA mode / with `ssr: false`) —
|
|
719
|
-
create their App with `vibe app create`. For a Vite SPA the App proposal carries
|
|
720
|
-
`outputMode: static` and `vercel.json`'s `outputDirectory` as `outputDir`, no
|
|
721
|
-
`next.config` is touched, and `api/` functions, middleware and `vercel.json`
|
|
722
|
-
routing rules are reported as what stops working (the static origin serves files
|
|
723
|
-
and falls back to `index.html`, nothing else).
|
|
724
|
-
Local only — it reads the checkout and writes files in it; it deploys nothing.
|
|
725
|
-
|
|
726
|
-
vibe migrate vercel --scan --dir ./proje [--report rapor.md]
|
|
727
|
-
vibe migrate vercel --apply --dir ./proje --app <ad> --project <kimlik>
|
|
728
|
-
|
|
729
|
-
`--scan` classifies every Vercel-specific thing it finds as **mapped /
|
|
730
|
-
rewritten / manual / unsupported** and changes nothing. `--apply` performs the
|
|
731
|
-
rewrites, writes `vibecloud.app.yaml` (an `App` proposal for review) and
|
|
732
|
-
`MIGRATION-REPORT.md` — or refuses, naming every blocker.
|
|
733
|
-
|
|
734
|
-
What it deliberately does **not** touch:
|
|
735
|
-
|
|
736
|
-
- `cacheHandler`, `cacheMaxMemorySize`, `deploymentId` — the builder generates a
|
|
737
|
-
wrapper that forces these (`base/docs/build-deploy-contract.md` §6), and a
|
|
738
|
-
tenant-set `cacheHandler` is rejected with `BUILD_CONFIG_CONFLICT`. They are
|
|
739
|
-
reported as platform-managed.
|
|
740
|
-
- `vercel.json` routing rules — translated into a ready-to-paste `next.config`
|
|
741
|
-
snippet in the report, because splicing async functions into an arbitrary
|
|
742
|
-
JavaScript module cannot be done safely by text edit.
|
|
743
|
-
- Environment **values** — never read into the report, the manifest or the
|
|
744
|
-
machine output. Names, sources and a classification only.
|
|
745
|
-
|
|
746
|
-
It refuses (rather than half-migrating) on: a monorepo, a tenant `cacheHandler`,
|
|
747
|
-
`output: 'export'` or a non-literal `output`, `target: 'serverless'`, two
|
|
748
|
-
`next.config` files, a missing lockfile, a `service_role`-shaped value under a
|
|
749
|
-
`NEXT_PUBLIC_` name (`SECRET_WOULD_BE_PUBLIC`), the legacy `vercel.json`
|
|
750
|
-
`routes` array, and the config-size bounds (64 entries / 4 KiB / 64 KiB).
|
|
751
|
-
|
|
752
|
-
### Verifying a migration end to end
|
|
753
|
-
|
|
754
|
-
`go test ./...` covers the scan, the refusals and the rewrites, and hands every
|
|
755
|
-
rewritten JavaScript config to `node --check`. It does **not** run `next build`
|
|
756
|
-
(that needs the npm registry, so it is not a deterministic unit test). To check
|
|
757
|
-
the whole path by hand:
|
|
758
|
-
|
|
759
|
-
cp -r ../starters/nextjs-basic /tmp/e2e && cd /tmp/e2e
|
|
760
|
-
# remove `output: 'standalone'` from next.config.ts to get a Vercel-shaped project
|
|
761
|
-
npm install && vibe migrate vercel --apply --dir . --app a --project p
|
|
762
|
-
npm run build && node .next/standalone/server.js
|
|
763
|
-
|
|
764
|
-
The build must produce `.next/standalone/server.js` and that server must serve
|
|
765
|
-
the app. Deploying it on a cell is out of this command's scope.
|
|
766
|
-
|
|
767
|
-
### The hosted half: `--vercel-project` (VIBEC-346)
|
|
768
|
-
|
|
769
|
-
Everything above reads a checkout. With `--vercel-project <name or id>` the command
|
|
770
|
-
also reads the **hosted** Vercel project through Vercel's REST API with your own token
|
|
771
|
-
(`VERCEL_TOKEN`, by environment — never a flag; `--team-id team_…` for a team
|
|
772
|
-
project) and recreates it on the platform:
|
|
773
|
-
|
|
774
|
-
VERCEL_TOKEN=… vibe migrate vercel --scan --vercel-project acme-crm --project <slug> [--dir ./proje]
|
|
775
|
-
VERCEL_TOKEN=… vibe migrate vercel --apply --vercel-project acme-crm --project <slug> [--dir ./proje] [--repo <git url>] [--branch main]
|
|
776
|
-
|
|
777
|
-
Here `--project` is the **target** vibecloud project (slug), as in every other
|
|
778
|
-
importer; the local-only form above keeps its `--project <App.spec.projectRef.name>`
|
|
779
|
-
meaning. `--scan` prints the plan and changes nothing. `--apply` prints the same
|
|
780
|
-
plan, then:
|
|
781
|
-
|
|
782
|
-
1. **Refuses a target project that already has an App** (one App per project), or a
|
|
783
|
-
framework the platform cannot build; `--config-only` writes only the variables
|
|
784
|
-
into an App you connected yourself.
|
|
785
|
-
2. **Runs the checkout half first** when `--dir` is given — the next.config rewrites,
|
|
786
|
-
the runtime audit (edge runtime, `@vercel/blob`, …) and `vercel.json` →
|
|
787
|
-
`next.config` — so a blocker in the repo refuses before any App exists. Routing
|
|
788
|
-
rules (`rewrites`, `redirects`, `headers`) stay in next.config by decision: the
|
|
789
|
-
router has no rule surface and is not getting one for this.
|
|
790
|
-
3. **Creates the App** from the repository Vercel is linked to (GitHub; `--repo`
|
|
791
|
-
overrides it, and an unlinked project needs it), on the production branch. When
|
|
792
|
-
`--dir` shows a plain Vite SPA the App is created `STATIC` (with `outputDirectory`
|
|
793
|
-
as its directory); otherwise no mode is sent and the server's `STANDALONE` applies.
|
|
794
|
-
4. **Writes the production variables**, classified by the same rules the checkout
|
|
795
|
-
half applies to `.env` files: `NEXT_PUBLIC_*` and plain values as `ENV`, secrets
|
|
796
|
-
as `SECRET` (write-only). Dropped, with the reason printed: Vercel's system
|
|
797
|
-
variables, the Supabase names the platform provides itself
|
|
798
|
-
(`NEXT_PUBLIC_SUPABASE_URL`, anon key, `DATABASE_URL`), and a `service_role`
|
|
799
|
-
key anywhere — never written. Vercel does not disclose `sensitive` variables:
|
|
800
|
-
they are listed by name and the summary prints the `vibe config secret` line for
|
|
801
|
-
each. Preview/development-only variables are reported, not carried.
|
|
802
|
-
5. **Prints the cutover**: each custom domain with its `vibe domain add` command
|
|
803
|
-
(DNS is never changed for you; a redirect-only domain is called out), and
|
|
804
|
-
`vibe deploy` as the next step.
|
|
805
|
-
|
|
806
|
-
The plan also reports a monorepo root directory, customised build/install commands
|
|
807
|
-
(the platform runs package.json scripts, not the Vercel panel's command), the Node
|
|
808
|
-
version, and an unsupported framework preset (Next.js builds natively; the static
|
|
809
|
-
presets — Vite, Astro, Hugo, … — take the static path).
|
|
810
|
-
|
|
811
|
-
⚠ Vercel's response shapes are read from its documentation, not measured against a
|
|
812
|
-
live account: the live run in this repo drives a fake Vercel (`VIBECLOUD_VERCEL_API`).
|
|
813
|
-
Vercel Postgres is Neon underneath — move its data with `vibe migrate neon`.
|
|
814
|
-
|
|
815
|
-
## `vibe migrate netlify` (VIBEC-348)
|
|
816
|
-
|
|
817
|
-
The Vercel hosted half's shape over Netlify. The command reads the site through
|
|
818
|
-
Netlify's REST API with your own personal access token (`NETLIFY_AUTH_TOKEN`, by
|
|
819
|
-
environment — never a flag) and does two things, in this order:
|
|
820
|
-
|
|
821
|
-
NETLIFY_AUTH_TOKEN=… vibe migrate netlify --scan --site <site id or name.netlify.app> --project <slug> [--dir ./proje]
|
|
822
|
-
NETLIFY_AUTH_TOKEN=… vibe migrate netlify --apply --site <site id or name.netlify.app> --project <slug> [--dir ./proje] [--repo <git url>] [--branch main]
|
|
823
|
-
vibe migrate netlify --scan --dir ./proje
|
|
824
|
-
|
|
825
|
-
`--scan` prints the plan and changes nothing.
|
|
826
|
-
|
|
827
|
-
**Offline scan (VIBEC-462).** `--scan --dir` without `--site` reads the checkout
|
|
828
|
-
alone: no `NETLIFY_AUTH_TOKEN`, no vibe session, no network. It reads
|
|
829
|
-
`netlify.toml`, `_redirects`, `_headers`, the Functions and Edge Functions
|
|
830
|
-
directories and Netlify Forms. With no site there is no UI functions directory
|
|
831
|
-
or base, so only `netlify.toml` places the directories. The plan lists what it
|
|
832
|
-
could not check under `KONTROL EDILMEYENLER` (in JSON: `plan.unchecked`, one
|
|
833
|
-
entry per part — `repository`, `build-settings`, `environment`, `domains`):
|
|
834
|
-
the linked repository, the build settings from the Netlify UI, the UI's
|
|
835
|
-
environment variables and the custom domains. `siteName` and `app.branch` are
|
|
836
|
-
`null`. `--apply` always needs `--site`, and is refused without it before
|
|
837
|
-
anything is read. `--apply` prints the same plan, then:
|
|
838
|
-
|
|
839
|
-
1. **Refuses a target project that already has an App** (one App per project);
|
|
840
|
-
`--config-only` writes only the variables into an App you connected yourself.
|
|
841
|
-
2. **Creates the App** from the repository the site is linked to (GitHub; `--repo`
|
|
842
|
-
overrides it, an unlinked site needs it), on the site's production branch.
|
|
843
|
-
3. **Writes the production variables** — the `production` context, else `all` —
|
|
844
|
-
classified by the same rules the checkout half applies to `.env` files:
|
|
845
|
-
`NEXT_PUBLIC_*` and plain values as `ENV`, secrets as `SECRET` (write-only).
|
|
846
|
-
Dropped, with the reason printed: Netlify's own variables (`NETLIFY*`, `CONTEXT`,
|
|
847
|
-
`DEPLOY_URL`, `URL`, `BUILD_ID`, `NODE_VERSION`, …), the Supabase names the
|
|
848
|
-
platform provides itself, and a `service_role` key anywhere — never written.
|
|
849
|
-
A variable Netlify marks secret is not disclosed: it is named and the summary
|
|
850
|
-
prints the `vibe config secret` line for each. Deploy-preview / branch-deploy /
|
|
851
|
-
dev-only variables are reported, not carried.
|
|
852
|
-
4. **Prints the cutover**: each custom domain and alias with its `vibe domain add`
|
|
853
|
-
command (DNS is never changed for you), and `vibe deploy` as the next step.
|
|
854
|
-
|
|
855
|
-
**Routing rules.** With `--dir` pointing at a checkout, `netlify.toml`
|
|
856
|
-
(`[[redirects]]`, `[[headers]]`, `[build]`, `[build.environment]`, `[[plugins]]`),
|
|
857
|
-
`_redirects` and `_headers` (in the checkout root or `public/`) are read and
|
|
858
|
-
translated into the **same Next.js rule model the Vercel importer uses**
|
|
859
|
-
(`host/nextrouting.ts` — one model, two parsers) and printed as a next.config
|
|
860
|
-
snippet for you to paste. Routing stays in the app by decision: the router has no
|
|
861
|
-
rule surface. What translates: `301/302/307/308` → `redirects()` (exact status
|
|
862
|
-
kept), `200` → `rewrites()` (a proxy to another origin is flagged for the egress
|
|
863
|
-
allowlist), `_headers` → `headers()`, trailing `/*` splats → `:splat*`, query
|
|
864
|
-
parameters → `has` conditions. What does not, each named in the plan: `Country` /
|
|
865
|
-
`Language` / `Role` / `Cookie` conditions, mid-path `*`, custom `404`/`410`
|
|
866
|
-
(Next's not-found page does that), any other status. Non-`!` (shadowing) rules are
|
|
867
|
-
reported once: Next redirects always run first, which is Netlify's `force`.
|
|
868
|
-
|
|
869
|
-
The plan also reports the Next plugin (not needed on the platform), other build
|
|
870
|
-
plugins, each Function (→ route handlers) and Edge Function (unsupported), a
|
|
871
|
-
monorepo `base`, a customised build command and the Node version. Functions are
|
|
872
|
-
read from the directory Netlify uses: `[functions] directory`, then `[build]
|
|
873
|
-
functions`, then the UI's functions directory, then `netlify/functions`; Edge
|
|
874
|
-
Functions from `[build] edge_functions`, then `netlify/edge-functions`. Each is
|
|
875
|
-
relative to the base directory, a leading `/` included, as on Netlify. A
|
|
876
|
-
directory whose real path is outside the checkout stops the scan; a symlink that
|
|
877
|
-
stays inside it is followed.
|
|
878
|
-
|
|
879
|
-
⚠ Netlify's response shapes are read from its documentation, not measured against a
|
|
880
|
-
live account: the live run in this repo drives a fake Netlify (`VIBECLOUD_NETLIFY_API`).
|
|
881
|
-
|
|
882
|
-
## `vibe migrate cloudflare` (VIBEC-351)
|
|
883
|
-
|
|
884
|
-
The same hosted half over **Cloudflare Pages**. The command reads the project
|
|
885
|
-
through Cloudflare's REST API with your own API token (`CLOUDFLARE_API_TOKEN`, by
|
|
886
|
-
environment — never a flag) and the account id (`--account`, else
|
|
887
|
-
`CLOUDFLARE_ACCOUNT_ID`; an identifier, not a credential):
|
|
888
|
-
|
|
889
|
-
CLOUDFLARE_API_TOKEN=… vibe migrate cloudflare --scan --pages-project <ad> --project <slug> [--dir ./proje]
|
|
890
|
-
CLOUDFLARE_API_TOKEN=… vibe migrate cloudflare --apply --pages-project <ad> --project <slug> [--dir ./proje] [--repo <git url>] [--branch main]
|
|
891
|
-
vibe migrate cloudflare --scan --dir ./proje
|
|
892
|
-
|
|
893
|
-
`--scan` prints the plan and changes nothing.
|
|
894
|
-
|
|
895
|
-
**Offline scan (VIBEC-463).** `--scan --dir` without `--pages-project` reads the
|
|
896
|
-
checkout alone: no `CLOUDFLARE_API_TOKEN`, no account id, no vibe session, no
|
|
897
|
-
network. It parses the wrangler configuration (`wrangler.toml`, `wrangler.json`
|
|
898
|
-
or `wrangler.jsonc`; two of them is refused rather than guessed between) and
|
|
899
|
-
reads `_redirects`, `_headers` and `_routes.json` from the build output
|
|
900
|
-
directory the file names (the top-level `pages_build_output_dir`, the only one
|
|
901
|
-
wrangler reads), then the root, `public/` and `static/`, plus `functions/`,
|
|
902
|
-
`_worker.js` and `package.json`. A routing file, or the output directory, whose
|
|
903
|
-
real path leaves the checkout through a symlink is refused. The production and
|
|
904
|
-
preview environments are resolved the way wrangler and Cloudflare's Pages docs
|
|
905
|
-
resolve them: only `[env.production]` and `[env.preview]` exist, and the top
|
|
906
|
-
level applies to an environment only when its block is absent. `vars` and the
|
|
907
|
-
bindings are non-inheritable: an environment block that exists has exactly the
|
|
908
|
-
vars and bindings it declares, even when it sets nothing but
|
|
909
|
-
`compatibility_date`. A block that redeclares some of them but leaves others at
|
|
910
|
-
the top level fails Cloudflare's deploy validation; the plan names it and the
|
|
911
|
-
keys it left out as unverified, and reads none of that environment's variables
|
|
912
|
-
or bindings. Bindings are named with the same replacements as the
|
|
913
|
-
hosted scan, with the preview resource and the file's `preview_id` /
|
|
914
|
-
`preview_database_id` / `preview_bucket_name` alongside. A wrangler file
|
|
915
|
-
without a top-level `pages_build_output_dir` is, per Cloudflare, for local development
|
|
916
|
-
only: its bindings and variables are named in an unverified finding, not read
|
|
917
|
-
as the project's. The plan lists what it could not check under
|
|
918
|
-
`KONTROL EDILMEYENLER` (in JSON: `plan.unchecked` — `repository`,
|
|
919
|
-
`build-settings`, `environment` (the dashboard's secrets, or every variable
|
|
920
|
-
when there is no Pages wrangler file or its production environment is
|
|
921
|
-
invalid), `bindings` (only in those two cases; the summary line then says
|
|
922
|
-
`okunmadi`, never `yok`), `domains`).
|
|
923
|
-
`projectName` and `app.branch` are `null`. Flags that only mean something to
|
|
924
|
-
the hosted scan (`--account`, `--project`, `--org`, `--repo`, `--branch`,
|
|
925
|
-
`--config-only`) are refused, not ignored. `--apply` always needs
|
|
926
|
-
`--pages-project`, and is refused without it before anything is read.
|
|
927
|
-
|
|
928
|
-
`wrangler.toml` is parsed as TOML 1.0 with `smol-toml` (zero dependencies), so
|
|
929
|
-
multi-line arrays of inline tables, literal `'…'` strings and dotted keys read as
|
|
930
|
-
they do for wrangler. `wrangler.jsonc` is parsed with TypeScript's
|
|
931
|
-
JSON-with-comments parser (`typescript` is already a runtime dependency, loaded
|
|
932
|
-
lazily): comments and trailing commas are read. That parser also accepts
|
|
933
|
-
JavaScript literal forms JSON does not have (`"\x41"`, `0x10`, `.5`, `1_000`, a
|
|
934
|
-
line continuation), so every string and number token is re-read with
|
|
935
|
-
`JSON.parse` and one it cannot read is refused rather than converted. Other
|
|
936
|
-
non-JSON syntax (single quotes, unquoted keys, `Infinity`) is refused by the
|
|
937
|
-
parser itself. A syntax error in any of the three names the file, line and
|
|
938
|
-
column.
|
|
939
|
-
|
|
940
|
-
`--apply` prints the same plan, then:
|
|
941
|
-
|
|
942
|
-
1. **Refuses a target project that already has an App** (one App per project);
|
|
943
|
-
`--config-only` writes only the variables into an App you connected yourself.
|
|
944
|
-
2. **Creates the App** from the repository the Pages project is connected to
|
|
945
|
-
(GitHub; `--repo` overrides it, an unconnected project needs it), on the
|
|
946
|
-
production branch.
|
|
947
|
-
3. **Writes the production variables** — the `production` deployment config —
|
|
948
|
-
classified by the same rules the checkout half applies to `.env` files:
|
|
949
|
-
`NEXT_PUBLIC_*` and plain values as `ENV`, secrets as `SECRET` (write-only).
|
|
950
|
-
Dropped, with the reason printed: Cloudflare's own variables (`CF_PAGES*`,
|
|
951
|
-
`NODE_VERSION`, `NPM_FLAGS`, `SKIP_DEPENDENCY_INSTALL`, …), the Supabase names
|
|
952
|
-
the platform provides itself, and a `service_role` key anywhere — never
|
|
953
|
-
written. A `secret_text` variable is not disclosed by Cloudflare: it is named
|
|
954
|
-
and the summary prints the `vibe config secret` line for each. Variables that
|
|
955
|
-
exist only on the preview config are reported, not carried.
|
|
956
|
-
4. **Prints the cutover**: each custom domain with its `vibe domain add` command
|
|
957
|
-
(DNS is never changed for you), and `vibe deploy` as the next step.
|
|
958
|
-
|
|
959
|
-
🔴 **The bindings are the migration.** A Pages project also carries KV, D1, R2,
|
|
960
|
-
Durable Objects, Queues, Vectorize, Workers AI, Analytics Engine, service
|
|
961
|
-
bindings, mTLS certificates and Browser Rendering — Cloudflare-only services the
|
|
962
|
-
app reaches through globals that do not exist anywhere else. **None of them
|
|
963
|
-
move.** Every one is reported by name with what replaces it here: KV → a Postgres
|
|
964
|
-
table or Storage, D1 → the tenant Postgres (dump and load; the SQL dialect
|
|
965
|
-
differs), R2 → the S3-compatible Storage, Durable Objects → a Postgres row plus a
|
|
966
|
-
lock, Vectorize → pgvector, service bindings → an HTTP call or a route handler.
|
|
967
|
-
Hyperdrive is the one that is simply not needed: the platform hands the app a
|
|
968
|
-
Postgres connection string and pools it itself. Bindings come from the API, so
|
|
969
|
-
they are listed with or without `--dir`. Pages does not inherit bindings between
|
|
970
|
-
environments, so the preview config is read too: a production binding whose
|
|
971
|
-
preview deployments use another resource names both, and a binding only the
|
|
972
|
-
preview config carries is reported by name and resource (it was never defined in
|
|
973
|
-
production).
|
|
974
|
-
|
|
975
|
-
**Routing rules.** With `--dir` pointing at a checkout, `_redirects` and
|
|
976
|
-
`_headers` (in the checkout root, `public/` or `static/`) are read and translated
|
|
977
|
-
into the **same Next.js rule model the Vercel and Netlify importers use**
|
|
978
|
-
(`host/nextrouting.ts` — one model, three parsers) and printed as a next.config
|
|
979
|
-
snippet for you to paste. Routing stays in the app by decision: the router has no
|
|
980
|
-
rule surface.
|
|
981
|
-
|
|
982
|
-
⚠ **The file names match Netlify's and the dialects do not**, so the three
|
|
983
|
-
differences are enforced rather than assumed: a statusless `_redirects` line is
|
|
984
|
-
**302** here and 301 on Netlify; there is **no `!` force marker** and no
|
|
985
|
-
shadowing (Cloudflare redirects always run, which is what Next does, so there is
|
|
986
|
-
nothing to report); and there are **no `Country`/`Language`/`Role`/`Cookie`
|
|
987
|
-
conditions and no query matching** — a `key=value` token is reported as unreadable
|
|
988
|
-
rather than read as a condition the source platform never honoured.
|
|
989
|
-
|
|
990
|
-
What translates: `301/302/303/307/308` → `redirects()` (exact status kept), `200`
|
|
991
|
-
→ `rewrites()`, `_headers` → `headers()`, trailing `/*` splats → `:splat*`, and an
|
|
992
|
-
absolute `_headers` pattern (`https://host/path`) → a `has: [{type:'host'}]`
|
|
993
|
-
condition. What does not, each named in the plan: a `200` proxy to another origin
|
|
994
|
-
(Cloudflare only proxies within the site, so the rule never worked there either),
|
|
995
|
-
a non-trailing `*` such as `/*.jpg`, a `! Header-Name` detach line (Next's
|
|
996
|
-
`headers()` only adds headers), a wildcard host, and any other status.
|
|
997
|
-
|
|
998
|
-
⚠ **Cloudflare does not apply these files to Pages Functions.** Its docs state
|
|
999
|
-
that `_headers` are not applied to responses generated by Functions and
|
|
1000
|
-
`_redirects` are not applied to requests Functions serve; Next's `headers()`
|
|
1001
|
-
and `redirects()` apply to every matching response, server-rendered pages and
|
|
1002
|
-
route handlers included. When the project shows a Functions surface (a
|
|
1003
|
-
Cloudflare Next adapter, a next-on-pages / OpenNext build command, `functions/`,
|
|
1004
|
-
`_worker.js` or `_routes.json`) and the snippet is non-empty, the plan names
|
|
1005
|
-
that evidence and marks the rules unverified: which paths a Function answered on
|
|
1006
|
-
Cloudflare is not checked.
|
|
1007
|
-
|
|
1008
|
-
The plan also reports `_routes.json`, `functions/` (→ route handlers, with the
|
|
1009
|
-
`[param]` / `[[catchall]]` / `_middleware` mapping), `_worker.js` (advanced mode —
|
|
1010
|
-
unsupported), the wrangler config (authoritative for Pages, so it can disagree
|
|
1011
|
-
with the dashboard), the `@cloudflare/next-on-pages` / `@opennextjs/cloudflare`
|
|
1012
|
-
adapter (remove it), a monorepo root directory, a build path filter, a customised
|
|
1013
|
-
build command and the Workers compatibility date and flags.
|
|
1014
|
-
|
|
1015
|
-
⚠ Cloudflare's response shapes are read from its documentation, not measured
|
|
1016
|
-
against a live account: the live run in this repo drives a fake Cloudflare
|
|
1017
|
-
(`VIBECLOUD_CLOUDFLARE_API`).
|
|
1018
|
-
|
|
1019
|
-
## `vibe migrate firebase` (VIBEC-347)
|
|
1020
|
-
|
|
1021
|
-
The first source with no Postgres to dump. Firebase is three products, so the
|
|
1022
|
-
importer has three data legs and a code leg, all read through Google's own APIs
|
|
1023
|
-
with the customer's **Firebase Admin service-account key** (a file; the path is
|
|
1024
|
-
the flag, the key never leaves the machine except as a signature):
|
|
1025
|
-
|
|
1026
|
-
vibe migrate firebase --scan --service-account ./anahtar.json [--dir ./proje] [--hash-params ./hash.json] [--bucket <kova>]
|
|
1027
|
-
vibe migrate firebase --apply --service-account ./anahtar.json --project <slug> [--dir ./proje] [--hash-params ./hash.json] [--bucket <kova>]
|
|
1028
|
-
|
|
1029
|
-
`--scan` reads everything, prints the plan **with the DDL it would run**, and
|
|
1030
|
-
stops — it needs no platform login. `--apply` prints the same plan, then:
|
|
1031
|
-
|
|
1032
|
-
1. **Mints the time-boxed migration role** (the Supabase importer's lifecycle)
|
|
1033
|
-
and connects to the tenant database as it, retrying while the cell creates it.
|
|
1034
|
-
2. **Writes the database in ONE transaction**: every `CREATE TABLE`, every
|
|
1035
|
-
Firestore row, every `auth.users` / `auth.identities` row. A failure at any
|
|
1036
|
-
statement rolls the whole thing back, ends the role, and is an error — never
|
|
1037
|
-
a half-import described as done.
|
|
1038
|
-
3. **Moves the Cloud Storage objects** into private target buckets, stopping at
|
|
1039
|
-
the first failure (same rule).
|
|
1040
|
-
4. **Asks the server to attest** (`completeMigration`, source `FIREBASE`), which
|
|
1041
|
-
ends the role.
|
|
1042
|
-
|
|
1043
|
-
**Auth → GoTrue.** Users come from Identity Toolkit `accounts:batchGet` with
|
|
1044
|
-
their password hashes. Firebase hashes with a modified scrypt; the tenant's
|
|
1045
|
-
GoTrue (v2.189.0) verifies exactly that when `encrypted_password` is
|
|
1046
|
-
`$fbscrypt$v=1,n=<mem_cost>,r=<rounds>,p=1,ss=<salt_sep>,sk=<signer_key>$<salt>$<hash>`,
|
|
1047
|
-
so **users keep their passwords**. The project's hash parameters come from the
|
|
1048
|
-
Identity Toolkit config; when the service account lacks
|
|
1049
|
-
`firebaseauth.configs.getHashConfig`, pass the console's _Password hash
|
|
1050
|
-
parameters_ export as `--hash-params` (an explicit second input, not a guess;
|
|
1051
|
-
without either, password users are skipped by name). Every user gets a
|
|
1052
|
-
deterministic UUIDv5 of their Firebase uid (GoTrue ids are uuids), with the
|
|
1053
|
-
original uid in `raw_user_meta_data.firebase_uid`. Carried: email + password,
|
|
1054
|
-
Google/GitHub/Apple/Facebook/Twitter/Microsoft identities (into
|
|
1055
|
-
`auth.identities` under GoTrue's provider names, `provider_id` = the provider's
|
|
1056
|
-
uid), `emailVerified`, `disabled` (→ banned), display name, photo, custom
|
|
1057
|
-
claims. Not carried, each reported: phone-only sign-in, MFA enrolments,
|
|
1058
|
-
anonymous accounts, providers GoTrue has no name for, Auth settings and OAuth
|
|
1059
|
-
client secrets.
|
|
1060
|
-
|
|
1061
|
-
🔴 **Proven live, not asserted**: `auth.test.ts` round-trips Firebase's
|
|
1062
|
-
published scrypt test vector through GoTrue's own regexp and primitives, and
|
|
1063
|
-
the repo's live run wrote the importer's rows into a real
|
|
1064
|
-
`supabase/gotrue:v2.189.0` and logged in — token issued for the right password,
|
|
1065
|
-
refused for the wrong one, `User is banned` for a disabled user.
|
|
1066
|
-
|
|
1067
|
-
**Firestore → Postgres.** Every collection is read through the REST API — root
|
|
1068
|
-
collections, their documents, and each document's subcollections recursively
|
|
1069
|
-
(one `listCollectionIds` call per document is the price of completeness). One
|
|
1070
|
-
table per collection id — a subcollection name that appears under many parents
|
|
1071
|
-
is ONE table, Firestore's own collection-group model — with `id text primary
|
|
1072
|
-
key`, `_path` (the full document path), `_parent_id`, `_created_at`,
|
|
1073
|
-
`_updated_at`, and **`_doc jsonb` holding the whole decoded document**, so
|
|
1074
|
-
nothing inference gets wrong is lost. Typed columns are inferred from the union
|
|
1075
|
-
of field types across the collection: string → `text`, integer → `bigint`,
|
|
1076
|
-
double (or integer+double) → `double precision`, boolean, timestamp →
|
|
1077
|
-
`timestamptz`, bytes → `bytea`, reference → `text` path, GeoPoint → `<f>_lat`
|
|
1078
|
-
and `<f>_lng`, map/array → `jsonb`, two incompatible kinds → `jsonb`. Names are
|
|
1079
|
-
sanitised to identifiers; a field that collides with a fixed column (`id`) is
|
|
1080
|
-
suffixed and the rename is recorded in a column comment and the plan. Every
|
|
1081
|
-
table gets **RLS enabled with no policies** — Firestore rules are not
|
|
1082
|
-
translated, so tables start closed and the plan says so.
|
|
1083
|
-
|
|
1084
|
-
**Storage.** Every GCS bucket of the project is listed (`--bucket` narrows it);
|
|
1085
|
-
objects are GET from GCS and PUT to the tenant's storage-api with their content
|
|
1086
|
-
type, `x-upsert` so a re-run overwrites. The default `<project>.appspot.com` /
|
|
1087
|
-
`.firebasestorage.app` bucket becomes `firebase`; others keep their name. Target
|
|
1088
|
-
buckets are created **private**; Storage rules, custom metadata and download
|
|
1089
|
-
tokens do not move and are named.
|
|
1090
|
-
|
|
1091
|
-
**Client code.** With `--dir`, every file importing `firebase/*`, `@firebase/*`
|
|
1092
|
-
or `firebase-admin` is listed by SDK area with its supabase-js counterpart;
|
|
1093
|
-
`firebase.json`, `functions/`, `firestore.rules` and `storage.rules` are
|
|
1094
|
-
detected. Nothing is rewritten — a Firestore query and a SQL query are not the
|
|
1095
|
-
same program.
|
|
1096
|
-
|
|
1097
|
-
**Out of scope, stated in every plan:** Realtime Database, Cloud Functions,
|
|
1098
|
-
FCM, Remote Config, App Check, Hosting, security-rules translation.
|
|
1099
|
-
|
|
1100
|
-
⚠ Google's response shapes are read from its documentation, not measured
|
|
1101
|
-
against a live Firebase project: the live run drives a fake
|
|
1102
|
-
(`VIBECLOUD_FIREBASE_API`) for the Google half and a real GoTrue + Postgres for
|
|
1103
|
-
the target half. A live-project run remains to be done.
|
|
1104
|
-
|
|
1105
|
-
## `vibe migrate supabase` (#72)
|
|
1106
|
-
|
|
1107
|
-
Scans an existing Supabase project and reports what moving it onto our
|
|
1108
|
-
platform would involve — in two halves, asked for by name (VIBEC-325):
|
|
1109
|
-
|
|
1110
|
-
vibe migrate supabase --scan --dir . # the application
|
|
1111
|
-
vibe migrate supabase --scan --dsn postgresql://…/postgres # the database [--report rapor.md] [--exact-rows]
|
|
1112
|
-
|
|
1113
|
-
**The application half** is the Next.js project that talks to Supabase: its
|
|
1114
|
-
env NAMES (never values — `NEXT_PUBLIC_SUPABASE_URL` and the anon key map to
|
|
1115
|
-
the project's own endpoints, the service-role key is refused as a secret that
|
|
1116
|
-
must not ride in `env`), the Supabase client it imports, its `next.config`.
|
|
1117
|
-
It is the same scan the host migrator runs, so it needs no database access
|
|
1118
|
-
and works on a fresh clone; findings that say "Vercel paneli" mean the panel
|
|
1119
|
-
of whichever host the app is on today. `--dir` and `--dsn` are not combined:
|
|
1120
|
-
run one, then the other — **into two report files** (`uygulama.md`, `veritabani.md`):
|
|
1121
|
-
each half refuses the other's file by name rather than overwriting it. `--apply
|
|
1122
|
-
--dir` is answered with the host apply (`vibe migrate vercel --apply`), which is
|
|
1123
|
-
the application apply; the database `--apply` is below.
|
|
1124
|
-
|
|
1125
|
-
**The database half** needs the DSN:
|
|
1126
|
-
|
|
1127
|
-
**It is read-only, and the server enforces that** — every query runs inside one
|
|
1128
|
-
`READ ONLY REPEATABLE READ` transaction, so a stray write fails rather than
|
|
1129
|
-
succeeding against the customer's production project, and every number in one
|
|
1130
|
-
report comes from one snapshot. Point it at a live project.
|
|
1131
|
-
|
|
1132
|
-
Findings are classified **mapped / manual / unsupported / unverified**. The last
|
|
1133
|
-
class is the one this command exists for: a database scan runs as some role, and
|
|
1134
|
-
that role's grants decide what it can see, so "found nothing wrong" and "was not
|
|
1135
|
-
allowed to look" must not render the same way. Anything unreadable is reported
|
|
1136
|
-
as unverified and never as clean.
|
|
1137
|
-
|
|
1138
|
-
`--apply` **performs the import** into a target project you have already created:
|
|
1139
|
-
|
|
1140
|
-
vibe migrate supabase --apply --dsn postgresql://…/postgres --project <slug>
|
|
1141
|
-
|
|
1142
|
-
It `pg_dump`s the source and `pg_restore`s into the target (single-transaction, so
|
|
1143
|
-
a failed restore leaves nothing behind), carries the auth users and the storage
|
|
1144
|
-
catalogue the excluded Supabase schemas would otherwise drop, moves the storage
|
|
1145
|
-
blob files object-by-object, and then asks the server to attest the import
|
|
1146
|
-
completed — the migration credit rests on that server-side check of the target's
|
|
1147
|
-
schema, never on the CLI's word. It stops at the first failure and never reports a
|
|
1148
|
-
partial import as complete.
|
|
1149
|
-
|
|
1150
|
-
The target credential is minted for you — the platform issues a time-boxed (24h),
|
|
1151
|
-
owner-equivalent migration role and a matching time-boxed `service_role` key for
|
|
1152
|
-
storage, so you never reveal or hold a standing target secret. The role is ended
|
|
1153
|
-
the moment the import is attested: everything it created is handed to your
|
|
1154
|
-
project's standing `tenant_owner` role and the migration role is dropped, so 24h
|
|
1155
|
-
is the ceiling for an import that never completes, not how long the credential
|
|
1156
|
-
lives. An import that FAILS after the mint — dump, restore, storage — ends the
|
|
1157
|
-
role the same way (`abandonMigration`); if even that call fails, the error says
|
|
1158
|
-
so and the role expires on its own within the 24h. The only value you
|
|
1159
|
-
may supply is your SOURCE Supabase key, and only to move storage: set
|
|
1160
|
-
`VIBECLOUD_SOURCE_STORAGE_KEY` by env (never a flag) if the source has storage
|
|
1161
|
-
objects — without it, storage is skipped, or the import refuses rather than drop
|
|
1162
|
-
files. The source storage URL is derived from `--dsn`; override it with
|
|
1163
|
-
`VIBECLOUD_SOURCE_STORAGE_URL` only for a DSN host we do not recognise. See
|
|
1164
|
-
`ENVIRONMENT.md`. The target must be an empty, freshly-created project — and the
|
|
1165
|
-
server checks: a project whose observed schema already holds user tables is
|
|
1166
|
-
refused before anything is minted (`MIGRATION_TARGET_NOT_EMPTY`, listing the
|
|
1167
|
-
tables in the way). Import into a fresh project, or empty the target yourself.
|
|
1168
|
-
|
|
1169
|
-
`pg_dump`/`pg_restore` must be available. If they are not on your PATH, the CLI
|
|
1170
|
-
refuses before touching anything and prints the install commands for your OS —
|
|
1171
|
-
or, with `--fetch-pg-client` (or a yes at the terminal prompt), downloads the
|
|
1172
|
-
pinned tools from our own mirror, verifies their sha256, and installs them under
|
|
1173
|
-
`~/.vibecloud/bin` (unpacking needs `tar` and `gzip` on PATH). The download never
|
|
1174
|
-
happens unasked, and never in machine mode.
|
|
1175
|
-
|
|
1176
|
-
### Row counts: estimate by default
|
|
1177
|
-
|
|
1178
|
-
`--scan` reads `pg_class.reltuples` and labels it an estimate. `--exact-rows`
|
|
1179
|
-
runs `count(*)` instead. The default is the estimate deliberately: `count(*)`
|
|
1180
|
-
scans every table of the customer's live project, and `reltuples` is readable
|
|
1181
|
-
without `SELECT` on the table, so it also works for a least-privilege role.
|
|
1182
|
-
`reltuples = -1` (never analyzed) is reported as _no answer_, not as zero rows.
|
|
1183
|
-
|
|
1184
|
-
⚠ **An exact count under row security can be silently wrong.** A role that is
|
|
1185
|
-
neither superuser nor `BYPASSRLS`, and does not own the table, gets the
|
|
1186
|
-
policy-filtered count — `count(*)` **succeeds** and returns 0 for a table
|
|
1187
|
-
holding 42 rows. Those counts are marked untrusted rather than reported as
|
|
1188
|
-
exact. Scan as Supabase's `postgres` role for a complete inventory.
|
|
1189
|
-
|
|
1190
|
-
### Verifying the scanner end to end
|
|
1191
|
-
|
|
1192
|
-
`go test ./...` covers the classification and report rendering with no database.
|
|
1193
|
-
The catalog reading is covered against a **real PostgreSQL 17** — a mocked
|
|
1194
|
-
catalog would only prove the mock matches the code — and those tests **skip
|
|
1195
|
-
loudly** unless a DSN is provided. The container is deliberately not started by
|
|
1196
|
-
the test process: that would make the default test path depend on a registry
|
|
1197
|
-
pull, which §8.2 forbids. To run them:
|
|
1198
|
-
|
|
1199
|
-
docker run -d --name vc-sb-pg -e POSTGRES_PASSWORD=pw -p 55432:5432 postgres:17-alpine
|
|
1200
|
-
VIBECLOUD_TEST_SOURCE_DSN='postgresql://postgres:pw@127.0.0.1:55432/postgres' go test ./...
|
|
1201
|
-
docker rm -f vc-sb-pg
|
|
1202
|
-
|
|
1203
|
-
The test creates and drops its own schemas (`sbscan`, `sbext`, `auth`,
|
|
1204
|
-
`storage`, `realtime`, `supabase_functions`, `net`, `app`) and a
|
|
1205
|
-
`sbscan_limited` role in that database, so point it at a **disposable**
|
|
1206
|
-
Postgres, never at anything you care about.
|
|
1207
|
-
|
|
1208
|
-
### What the scan cannot see
|
|
1209
|
-
|
|
1210
|
-
The report says this too, in Turkish, because a report that looks complete is
|
|
1211
|
-
worse than one that admits its edges: the objects in S3 (only `storage`
|
|
1212
|
-
metadata is read), application code, Supabase dashboard settings, Edge Function
|
|
1213
|
-
source, and Supabase's own backups. The Supabase extension baseline it compares
|
|
1214
|
-
against is transcribed from `../cell/deploy/supabase/bootstrap.sql` — the
|
|
1215
|
-
shipping bootstrap, which disagrees with the design docs; there is no machine-readable
|
|
1216
|
-
declaration of the baseline to import.
|
|
1217
|
-
|
|
1218
|
-
## `vibe migrate neon` · `vibe migrate prisma` (VIBEC-344 · VIBEC-345 · VIBEC-464)
|
|
1219
|
-
|
|
1220
|
-
The plain-Postgres importers. A Neon database, a Prisma Postgres database, or any
|
|
1221
|
-
Postgres a Prisma ORM app points at, is a plain database with no auth or storage
|
|
1222
|
-
rows to carry — so the whole thing moves in one dump, on the same lifecycle the
|
|
1223
|
-
Supabase importer measured live: the platform mints a 24h owner-equivalent role,
|
|
1224
|
-
the CLI waits until it authenticates, dumps the source, restores as that role
|
|
1225
|
-
(`--no-owner --no-privileges --no-comments --single-transaction`), asks the
|
|
1226
|
-
server to attest completion, and the cell hands every imported object to your
|
|
1227
|
-
`tenant_owner` and drops the role. The same two rules as the Supabase importer
|
|
1228
|
-
apply: the target must be empty (`MIGRATION_TARGET_NOT_EMPTY` otherwise), and a
|
|
1229
|
-
failure after the mint drops the role instead of leaving it for 24h.
|
|
1230
|
-
|
|
1231
|
-
vibe migrate neon --scan --dsn 'postgresql://…@ep-xxx.eu-central-1.aws.neon.tech/neondb?sslmode=require'
|
|
1232
|
-
vibe migrate neon --apply --dsn 'postgresql://…@ep-xxx.eu-central-1.aws.neon.tech/neondb?sslmode=require' --project <slug> --org <org>
|
|
1233
|
-
vibe migrate prisma --scan --dsn 'postgresql://…@db.prisma.io:5432/postgres?sslmode=require'
|
|
1234
|
-
vibe migrate prisma --apply --dsn 'postgresql://…@db.prisma.io:5432/postgres?sslmode=require' --schema prisma/schema.prisma --project <slug> --org <org>
|
|
1235
|
-
|
|
1236
|
-
Exactly one of `--scan` and `--apply` is required, as for `migrate heroku` and
|
|
1237
|
-
`migrate railway`; neither, or both, is refused.
|
|
1238
|
-
|
|
1239
|
-
**`--scan` lists what the dump will carry and changes nothing.** It reads the source
|
|
1240
|
-
in one read-only snapshot and needs no `vibe login` and no `pg_dump`: per schema, the
|
|
1241
|
-
tables, views, materialized views, sequences and indexes (with how many are partial);
|
|
1242
|
-
every materialized view and partial index by name; the extensions that restore on
|
|
1243
|
-
the target, with their versions; the vendor extensions left out of the dump; and, for
|
|
1244
|
-
Prisma, the `_prisma_migrations` row count. Objects that belong to an extension are not
|
|
1245
|
-
counted, because `CREATE EXTENSION` brings them, not the dump. A source that `--apply`
|
|
1246
|
-
would refuse (an extension the target does not ship) gets the same refusal, after the
|
|
1247
|
-
listing, and exits non-zero. `--scan` was added in VIBEC-464 (repo-owner decision
|
|
1248
|
-
2026-10-02). It reverses the earlier "no `--scan` here", because the preflight printed
|
|
1249
|
-
one line and never said what would move.
|
|
1250
|
-
|
|
1251
|
-
**Row-level security after the import.** The platform forces RLS on every table
|
|
1252
|
-
(decision 64), and a Neon, Prisma, Heroku or Railway app has no policies of its own,
|
|
1253
|
-
so on its own it would read empty tables. When the import completes, every imported
|
|
1254
|
-
table gets:
|
|
1255
|
-
|
|
1256
|
-
- the grants a `tenant_owner`-created table would have;
|
|
1257
|
-
- a `vibecloud_app_access` policy for the server-side roles: `vibe_app`, whose
|
|
1258
|
-
`DATABASE_URL` the platform gives a deployed App, and `tenant_owner`, which
|
|
1259
|
-
`prisma migrate` uses.
|
|
1260
|
-
|
|
1261
|
-
`anon` and `authenticated` stay closed. A table created afterwards needs the same
|
|
1262
|
-
policy, and the command prints the statement.
|
|
1263
|
-
|
|
1264
|
-
Completion also waits for the cell to see the import. The API asks the cell to
|
|
1265
|
-
re-read the schema catalogue, and the CLI polls for up to five minutes.
|
|
1266
|
-
|
|
1267
|
-
`--apply` runs the same preflight before anything is minted, and names the
|
|
1268
|
-
extensions it accepted:
|
|
1269
|
-
|
|
1270
|
-
- **The DSN is classified, not trusted.** A Neon **pooler** host (`-pooler.` in the
|
|
1271
|
-
name) is refused — a dump through a transaction pooler restores cleanly and is
|
|
1272
|
-
internally inconsistent — with the console path to the direct string. A
|
|
1273
|
-
`prisma+postgres://` / `prisma://` **Accelerate** URL, or a `*.prisma-data.net`
|
|
1274
|
-
host, is refused the same way: pg_dump cannot speak to it; use the direct TCP
|
|
1275
|
-
connection string. `sslmode` below `require` is refused; an absent one is set to
|
|
1276
|
-
`require` (both vendors mandate TLS and libpq's default would downgrade).
|
|
1277
|
-
- **Extensions are checked against what tenant Postgres 17 ships.** Anything the
|
|
1278
|
-
image does not carry — banned (`dblink`, `http`, …), unknown, or allowed-but-absent
|
|
1279
|
-
(PostGIS) — refuses before the mint, all of them listed at once. Neon's own
|
|
1280
|
-
`neon`/`neon_utils` are left out of the dump rather than refused. Everything
|
|
1281
|
-
PostgreSQL marks _trusted_ on the image (`pg_trgm`, `citext`, `hstore`, `ltree`,
|
|
1282
|
-
`unaccent`, `btree_gin/gist`, …) restores where your dump puts it, because
|
|
1283
|
-
`tenant_owner` holds `CREATE` on the database since 2026-09-17 — the server's
|
|
1284
|
-
trust flag is the boundary, and the tenant bootstrap refuses an image that marks a
|
|
1285
|
-
banned extension trusted.
|
|
1286
|
-
- **Prisma:** `_prisma_migrations` is carried with the rest of `public`, so
|
|
1287
|
-
`prisma migrate deploy` against the new DSN applies nothing. **Do not run
|
|
1288
|
-
`prisma db push` after the import** — it overwrites the migrated schema. With
|
|
1289
|
-
`--schema`, a **Prisma 6** schema has its `datasource` block's `url`/`directUrl` names
|
|
1290
|
-
read and the two new DSNs printed under those exact env names; a missing `directUrl`
|
|
1291
|
-
and a literal Accelerate URL that would survive the swap are called out. A
|
|
1292
|
-
**Prisma 7** schema (the datasource carries only `provider` — Prisma 7 refuses
|
|
1293
|
-
`url`/`directUrl` in a schema file, P1012) is recognised by that absence: the
|
|
1294
|
-
session DSN is printed for `prisma.config.ts`'s `datasource.url` (read as
|
|
1295
|
-
`DIRECT_URL`) and the pooled DSN for the `PrismaClient` adapter (`DATABASE_URL`),
|
|
1296
|
-
as two variables, because Migrate cannot hold its advisory lock through
|
|
1297
|
-
transaction pooling. Without `--schema` both placements are printed.
|
|
1298
|
-
|
|
1299
|
-
The import ends by printing the two connection strings to swap in — the pooled one
|
|
1300
|
-
(`:6543`, the app's `DATABASE_URL` — Prisma 6 `url`, Prisma 7's adapter) and the session one
|
|
1301
|
-
(`:5432`, psql, pg_dump, `prisma migrate` — Prisma 6 `directUrl`, Prisma 7's `prisma.config.ts`) — as your standing
|
|
1302
|
-
`tenant_owner.<projectUid>` role and without the password, which the console hands
|
|
1303
|
-
over (`vibe db connect`). Everything said above about `--fetch-pg-client`,
|
|
1304
|
-
`--project` auto-selection and `--org` applies here too.
|
|
1305
|
-
|
|
1306
|
-
## `vibe migrate heroku` (VIBEC-350)
|
|
1307
|
-
|
|
1308
|
-
One web dyno plus Heroku Postgres — the shape Turkish agencies' older Node/Next.js
|
|
1309
|
-
apps still run in. The command reads the app through the Heroku Platform API with
|
|
1310
|
-
your own key (`HEROKU_API_KEY`, by environment — never a flag) and does two things,
|
|
1311
|
-
in this order, each refusing before the next starts:
|
|
1312
|
-
|
|
1313
|
-
HEROKU_API_KEY=… vibe migrate heroku --scan --app <heroku app> --project <slug> [--dir <checkout>]
|
|
1314
|
-
HEROKU_API_KEY=… vibe migrate heroku --apply --app <heroku app> --repo <git url> [--branch main] --project <slug>
|
|
19
|
+
```sh
|
|
20
|
+
npm i -g @vibecloudtr/cli
|
|
21
|
+
vibe login
|
|
22
|
+
```
|
|
1315
23
|
|
|
1316
|
-
|
|
24
|
+
Tarayıcısı olmayan bir yerde (yapay zekâ aracı, sunucu, konteyner) `vibe login --device`
|
|
25
|
+
bir kod gösterir; onu giriş yaptığınız herhangi bir tarayıcıda onaylarsınız.
|
|
1317
26
|
|
|
1318
|
-
|
|
1319
|
-
empty project, or `--config-only` to write only the variables into an App you
|
|
1320
|
-
connected yourself.
|
|
1321
|
-
2. **Moves Heroku Postgres** on the plain-Postgres core (`vibe migrate neon`'s
|
|
1322
|
-
lifecycle): `DATABASE_URL` by default, a follower with
|
|
1323
|
-
`--database HEROKU_POSTGRESQL_<COLOR>_URL`. Heroku's server certificate cannot
|
|
1324
|
-
be verified and Heroku documents `sslmode=require`, so this — and only this —
|
|
1325
|
-
source is connected encrypted-but-unverified for the preflight; pg_dump follows
|
|
1326
|
-
libpq as always. Extensions are preflighted like Neon's.
|
|
1327
|
-
3. **Creates the App** from `--repo`/`--branch`. Heroku's public API does not expose
|
|
1328
|
-
the connected GitHub repository, so you name it.
|
|
1329
|
-
4. **Writes the config vars** the plan carries — `NEXT_PUBLIC_*` as `ENV`, everything
|
|
1330
|
-
else as `SECRET` (write-only). Dropped, with the reason printed: Postgres
|
|
1331
|
-
attachments (the platform seeds `DATABASE_URL` at App creation; the data moved in
|
|
1332
|
-
step 2), Heroku-injected runtime vars (`DYNO`, `PORT`, `WEB_CONCURRENCY`,
|
|
1333
|
-
`NPM_CONFIG_*`, `HEROKU_*`), and the vars provisioned by add-ons we do not carry
|
|
1334
|
-
(Heroku Redis, Memcachier, Kafka, CloudAMQP, Papertrail, Scheduler). External
|
|
1335
|
-
add-ons (SendGrid, …) keep their credentials — the plan tells you to get an
|
|
1336
|
-
account-level key before you remove the add-on on Heroku.
|
|
1337
|
-
5. **Prints the cutover**: the two Postgres DSNs (`tenant_owner.<uid>`, no
|
|
1338
|
-
password), each custom domain with its `vibe domain add` command (DNS is never
|
|
1339
|
-
changed for you), and `vibe deploy` as the next step.
|
|
27
|
+
## Hızlı başlangıç
|
|
1340
28
|
|
|
1341
|
-
|
|
1342
|
-
phase), Heroku Scheduler jobs (copy the cron lines from the dashboard), non-Node
|
|
1343
|
-
buildpacks. With `--dir` pointing at a checkout it also reads the `Procfile` `web:`
|
|
1344
|
-
line (and flags a disagreement with the formation) and `package.json`'s
|
|
1345
|
-
`engines.node` and `heroku-postbuild` — the latter is NOT run by the platform;
|
|
1346
|
-
move its steps into `build`.
|
|
29
|
+
Tek komut: giriş, proje ve abonelik, repo, editör bağlantısı ve ilk yayın.
|
|
1347
30
|
|
|
1348
|
-
|
|
31
|
+
```sh
|
|
32
|
+
npx @vibecloudtr/cli init --yes --package LUNA
|
|
33
|
+
```
|
|
1349
34
|
|
|
1350
|
-
|
|
1351
|
-
reads the environment through Railway's public GraphQL API with your own token
|
|
1352
|
-
(`RAILWAY_TOKEN`, by environment — never a flag), classifies every service it finds
|
|
1353
|
-
— git-backed app, Docker-image app, Postgres, Redis/MySQL/Mongo (reported, not
|
|
1354
|
-
carried), cron service, volume — and does two things, in this order:
|
|
35
|
+
Adım adım:
|
|
1355
36
|
|
|
1356
|
-
|
|
1357
|
-
|
|
37
|
+
```sh
|
|
38
|
+
vibe login
|
|
39
|
+
vibe project create --name musteri-crm --package LUNA
|
|
40
|
+
vibe app create --project musteri-crm --repo https://github.com/sirket/musteri-crm
|
|
41
|
+
vibe mcp install --editor cursor
|
|
42
|
+
vibe deploy start --project musteri-crm
|
|
43
|
+
```
|
|
1358
44
|
|
|
1359
|
-
|
|
45
|
+
Belgeler: <https://vibecloud.tr/docs>
|
|
46
|
+
|
|
47
|
+
## Komutlar
|
|
48
|
+
|
|
49
|
+
Her komutun ayrıntısı için `vibe <komut> --help`.
|
|
50
|
+
|
|
51
|
+
<!-- commands:start -->
|
|
52
|
+
|
|
53
|
+
### Başlangıç
|
|
54
|
+
|
|
55
|
+
| Komut | Ne yapar |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `vibe login` | Tarayıcıyla giriş yapar |
|
|
58
|
+
| `vibe logout` | Oturumu kapatır ve bu makineden siler |
|
|
59
|
+
| `vibe whoami` | Giriş yapılan hesabı ve oturumu gösterir |
|
|
60
|
+
| `vibe init` | Dizini bir projeye bağlar ve ilk kez yayınlar |
|
|
61
|
+
| `vibe version` | Sürüm bilgisini gösterir |
|
|
62
|
+
|
|
63
|
+
### Proje, veritabanı ve dallar
|
|
64
|
+
|
|
65
|
+
| Komut | Ne yapar |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `vibe project list` | Projeleri listeler |
|
|
68
|
+
| `vibe project create` | Proje oluşturur |
|
|
69
|
+
| `vibe project status` | Projenin durumunu gösterir |
|
|
70
|
+
| `vibe project resize` | Projenin paketini değiştirir; iki adımlı doğrulama kodu ister |
|
|
71
|
+
| `vibe usage` | Kullanımı ve kotaları gösterir |
|
|
72
|
+
| `vibe db connect` | Veritabanı bağlantı bilgilerini gösterir |
|
|
73
|
+
| `vibe db migrate` | Bir şema değişikliği gönderir |
|
|
74
|
+
| `vibe db introspect` | Veritabanının şemasını gösterir |
|
|
75
|
+
| `vibe db security` | Satır güvenliği taramasının bulgularını gösterir |
|
|
76
|
+
| `vibe db init` | Veritabanını başlatır |
|
|
77
|
+
| `vibe auth init` | Kimlik servisini başlatır |
|
|
78
|
+
| `vibe storage init` | Depolama servisini başlatır |
|
|
79
|
+
| `vibe branch create` | Bir önizleme branch’i açar |
|
|
80
|
+
| `vibe branch list` | Önizleme branch’lerini listeler |
|
|
81
|
+
| `vibe branch extend` | Branch’in süresini uzatır |
|
|
82
|
+
| `vibe branch delete` | Branch’i kapatır |
|
|
83
|
+
| `vibe backups` | Yedekleri listeler |
|
|
84
|
+
| `vibe project delete` | Projeyi siler; iki adımlı doğrulama kodu ister |
|
|
85
|
+
| `vibe db owner-credential` | Veritabanı sahibinin (tenant_owner) parolasını gösterir; bir kez okunur |
|
|
86
|
+
| `vibe project stop` | Projeyi durdurur: son yedek, sonra her şey kapanır; iki adımlı doğrulama kodu ister |
|
|
87
|
+
| `vibe project start` | Durdurulmuş projeyi aynı verilerle yeniden başlatır |
|
|
88
|
+
| `vibe transfer start` | Projeyi başka bir kuruluşa devretmek için istek gönderir; iki adımlı doğrulama kodu ister |
|
|
89
|
+
| `vibe transfer accept` | Size gelen bir proje devrini kabul eder; iki adımlı doğrulama kodu ister |
|
|
90
|
+
| `vibe transfer decline` | Size gelen bir proje devrini reddeder |
|
|
91
|
+
| `vibe transfer cancel` | Başlattığınız bir proje devrini geri çeker |
|
|
92
|
+
| `vibe transfer list` | Kuruluşunuzun bekleyen proje devirlerini listeler |
|
|
93
|
+
| `vibe restore` | Bir yedekten geri yükler; HEDEF veritabanının üzerine yazar |
|
|
94
|
+
| `vibe smtp set` | Projenin e-postalarını kendi SMTP sunucunuzdan gönderir |
|
|
95
|
+
| `vibe smtp clear` | Projenin e-postalarını yeniden platformun sunucusundan gönderir |
|
|
96
|
+
| `vibe project auth-config` | Projenin kimlik doğrulama ayarlarını yazar |
|
|
97
|
+
| `vibe project egress` | Uygulamanın dışarıya çıkabileceği alan adlarını yazar |
|
|
98
|
+
| `vibe rls guardrail` | Satır düzeyi güvenliğin zorlanmasını açar ya da kapatır |
|
|
99
|
+
| `vibe rls exception` | Bir tablo için satır düzeyi güvenlik istisnası yazar |
|
|
100
|
+
|
|
101
|
+
### Uygulama ve yayın
|
|
102
|
+
|
|
103
|
+
| Komut | Ne yapar |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `vibe app list` | Projedeki uygulamaları listeler |
|
|
106
|
+
| `vibe app create` | Projeye bir git reposu bağlar |
|
|
107
|
+
| `vibe app config` | Uygulamanın çıktı türünü değiştirir |
|
|
108
|
+
| `vibe app auto-deploy` | Push ile otomatik yayını açar ya da kapatır |
|
|
109
|
+
| `vibe deploy start` | Yeni bir derleme başlatır ve yayına alır |
|
|
110
|
+
| `vibe deploy upload` | Bu dizini yükler, derler ve yayına alır |
|
|
111
|
+
| `vibe deploy cancel` | Süren derlemeyi iptal eder |
|
|
112
|
+
| `vibe deploy rollback` | Önceki bir sürüme döner |
|
|
113
|
+
| `vibe deploy logs` | Bir derlemenin logunu yazar |
|
|
114
|
+
| `vibe deploy force` | Önbelleği atlayarak yeniden derler ve yayına alır |
|
|
115
|
+
| `vibe config set` | Uygulamaya bir ortam değişkeni ekler ya da değiştirir |
|
|
116
|
+
| `vibe config secret` | Uygulamaya gizli bir değer ekler |
|
|
117
|
+
| `vibe config list` | Uygulamanın ortam değişkenlerini listeler |
|
|
118
|
+
| `vibe config unset` | Uygulamadan bir ortam değişkenini kaldırır |
|
|
119
|
+
| `vibe logs` | Uygulamanın çalışma kayıtlarını gösterir |
|
|
120
|
+
|
|
121
|
+
### Alan adları ve DNS
|
|
122
|
+
|
|
123
|
+
| Komut | Ne yapar |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `vibe domain add` | Projeye bir alan adı ekler |
|
|
126
|
+
| `vibe domain verify` | Alan adının DNS kaydını yeniden kontrol eder |
|
|
127
|
+
| `vibe domain list` | Projenin alan adlarını listeler |
|
|
128
|
+
| `vibe domain proxy` | Alan adının ön proxy ayarını değiştirir |
|
|
129
|
+
| `vibe domain release` | Alan adını bırakır ve yönlendirmeyi durdurur; iki adımlı doğrulama kodu ister |
|
|
130
|
+
| `vibe zone add` | Alan adını ad sunucularımıza alır |
|
|
131
|
+
| `vibe zone prove` | Başka hesapta bekleyen taşımayı TXT kaydıyla devralır |
|
|
132
|
+
| `vibe zone list` | Projenin ad sunucularımızdaki alanlarını listeler |
|
|
133
|
+
| `vibe zone verify` | Ad sunucusu değişikliğini şimdi kontrol eder |
|
|
134
|
+
| `vibe zone remove` | Alanı ad sunucularımızdan kaldırır; iki adımlı doğrulama kodu ister |
|
|
135
|
+
| `vibe record list` | Alanın kayıtlarını listeler |
|
|
136
|
+
| `vibe record set` | Bir kaydı tek değerle ayarlar (aynı ad ve türdeki eski değerlerin yerine) |
|
|
137
|
+
| `vibe record add` | Aynı ad ve türdeki kayda bir değer daha ekler |
|
|
138
|
+
| `vibe record rm` | Bir kaydı siler (--value ile yalnızca o değeri) |
|
|
139
|
+
|
|
140
|
+
### Editör (MCP)
|
|
141
|
+
|
|
142
|
+
| Komut | Ne yapar |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `vibe mcp install` | Vibecloud MCP sunucusunu bir editöre ekler |
|
|
145
|
+
| `vibe mcp list` | MCP sunucusunun kayıtlı olduğu editörleri gösterir |
|
|
146
|
+
| `vibe mcp remove` | Vibecloud MCP sunucusunu bir editörden çıkarır |
|
|
147
|
+
|
|
148
|
+
### Taşıma
|
|
149
|
+
|
|
150
|
+
| Komut | Ne yapar |
|
|
151
|
+
|---|---|
|
|
152
|
+
| `vibe migrate vercel` | Vercel projesini inceler ve taşır |
|
|
153
|
+
| `vibe migrate supabase` | Supabase projesini inceler ve veritabanını taşır |
|
|
154
|
+
| `vibe migrate neon` | Neon veritabanını hedef projeye taşır |
|
|
155
|
+
| `vibe migrate prisma` | Prisma Postgres veya Prisma ORM veritabanını hedef projeye taşır |
|
|
156
|
+
| `vibe migrate heroku` | Heroku uygulamasını taşır |
|
|
157
|
+
| `vibe migrate railway` | Railway projesini taşır |
|
|
158
|
+
| `vibe migrate netlify` | Netlify sitesini taşır |
|
|
159
|
+
| `vibe migrate cloudflare` | Cloudflare Pages projesini taşır |
|
|
160
|
+
| `vibe migrate firebase` | Firebase projesini taşır |
|
|
161
|
+
|
|
162
|
+
### Hesap, takım ve anahtarlar
|
|
163
|
+
|
|
164
|
+
| Komut | Ne yapar |
|
|
165
|
+
|---|---|
|
|
166
|
+
| `vibe org` | Üyesi olduğunuz organizasyonları listeler |
|
|
167
|
+
| `vibe key reveal` | Projenin service_role anahtarını gösterir; iki adımlı doğrulama kodu ister |
|
|
168
|
+
| `vibe token create` | Erişim anahtarı oluşturur; iki adımlı doğrulama kodu ister |
|
|
169
|
+
| `vibe key rotate` | Projenin anahtarlarını yeniler; eski anahtarlar hemen geçersiz olur |
|
|
170
|
+
| `vibe access grant` | Bir üyeye projeye yazma izni verir (Kurumsal paket) |
|
|
171
|
+
| `vibe access revoke` | Bir üyenin projeye yazma iznini kaldırır |
|
|
172
|
+
| `vibe billing cancel` | Projenin aboneliğini iptal eder |
|
|
173
|
+
| `vibe team invite` | Takıma üye davet eder |
|
|
174
|
+
| `vibe team remove` | Takımdan üye çıkarır; üyenin erişim anahtarları da iptal edilir |
|
|
175
|
+
| `vibe team role` | Bir üyenin rolünü değiştirir |
|
|
176
|
+
| `vibe team transfer-owner` | Organizasyonun sahipliğini bir üyeye devreder |
|
|
177
|
+
| `vibe mfa disable` | İki adımlı doğrulamayı kapatır; şu anki kodu ister |
|
|
178
|
+
| `vibe export download` | Hazır bir veri dışa aktarımının indirme linkini verir |
|
|
179
|
+
| `vibe token list` | Erişim anahtarlarınızı listeler |
|
|
180
|
+
| `vibe token revoke` | Bir erişim anahtarını iptal eder |
|
|
181
|
+
| `vibe team list` | Organizasyonun üyelerini listeler |
|
|
182
|
+
|
|
183
|
+
<!-- commands:end -->
|
|
184
|
+
|
|
185
|
+
## Betiklerde ve CI'da
|
|
186
|
+
|
|
187
|
+
- `VIBECLOUD_TOKEN`: girişsiz çalışmak için bir erişim anahtarı (`vibe token create`).
|
|
188
|
+
- `VIBECLOUD_OUTPUT=json` ya da `--json`: her komut stdout'a tek bir JSON belgesi yazar.
|
|
189
|
+
|
|
190
|
+
Bütün ortam değişkenleri pakette gelen `ENVIRONMENT.md` dosyasındadır.
|
|
191
|
+
|
|
192
|
+
## English
|
|
193
|
+
|
|
194
|
+
Vibecloud (vibecloud.tr) is a Supabase-compatible backend and Next.js hosting platform that
|
|
195
|
+
runs in Türkiye. `vibe` is its command line: projects, databases, deploys and domains from one
|
|
196
|
+
command. It needs Node.js 22 or later.
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
npx @vibecloudtr/cli login
|
|
200
|
+
npx @vibecloudtr/cli init --yes --package LUNA
|
|
201
|
+
```
|
|
1360
202
|
|
|
1361
|
-
|
|
1362
|
-
target whose database is not empty (`MIGRATION_TARGET_NOT_EMPTY`). Use an empty
|
|
1363
|
-
project, or `--config-only` to write only the variables into an App you connected
|
|
1364
|
-
yourself.
|
|
1365
|
-
2. **Moves the Postgres** over its **TCP Proxy** — `DATABASE_PUBLIC_URL`, or the proxy
|
|
1366
|
-
plus the service's own `PG*` credentials — on the plain-Postgres core. A database
|
|
1367
|
-
that is private-network-only (no proxy, no `DATABASE_PUBLIC_URL`) cannot be
|
|
1368
|
-
reached from your machine; the plan says so and how to enable the proxy (service →
|
|
1369
|
-
Settings → Networking → TCP Proxy, port 5432; turn it off again afterwards). The
|
|
1370
|
-
Postgres template serves a self-signed certificate, so this — and only this —
|
|
1371
|
-
source is connected encrypted-but-unverified for the preflight, exactly as Heroku
|
|
1372
|
-
is; pg_dump follows libpq as always. Extensions are preflighted like Neon's.
|
|
1373
|
-
3. **Creates the App** from the service's connected repository (`--repo` overrides
|
|
1374
|
-
it; an image service has none and needs one), on `--branch`.
|
|
1375
|
-
4. **Writes the variables** the plan carries, with Railway **reference variables
|
|
1376
|
-
resolved to values**: `${{Service.VAR}}` and `${{shared.VAR}}` are substituted,
|
|
1377
|
-
following chains, before the value is written; a reference to a service that does
|
|
1378
|
-
not exist is dropped and listed, never written blank. `NEXT_PUBLIC_*` as `ENV`,
|
|
1379
|
-
everything else as `SECRET` (write-only). Dropped, with the reason printed: every
|
|
1380
|
-
Postgres connection variable (the platform seeds `DATABASE_URL` at App creation;
|
|
1381
|
-
the data moved in step 2), Railway-injected runtime vars (`RAILWAY_*`, `PORT`,
|
|
1382
|
-
`NIXPACKS_*`, `RAILPACK_*`), and any variable that resolves to a Redis/MySQL/Mongo
|
|
1383
|
-
service's address — those services are not carried.
|
|
1384
|
-
5. **Prints the cutover**: the two Postgres DSNs, each custom domain of the app
|
|
1385
|
-
service with its `vibe domain add` command (DNS is never changed for you), and
|
|
1386
|
-
`vibe deploy` as the next step.
|
|
203
|
+
Messages are Turkish; `VIBE_LANG=en` (or an English `LANG`) selects English. Docs: <https://vibecloud.tr/en/docs>
|
|
1387
204
|
|
|
1388
|
-
|
|
1389
|
-
schedule is printed), volumes, a second app service or a second Postgres (MVP: one
|
|
1390
|
-
of each — `--service` picks the app when there are several), and image services
|
|
1391
|
-
without a repo. With `--dir` pointing at a checkout it reads `railway.json` (or
|
|
1392
|
-
`railway.toml` — the flat `[build]`/`[deploy]` tables Railway writes) for the
|
|
1393
|
-
builder, start command and healthcheck path, which override the API view the way
|
|
1394
|
-
Railway itself applies them, and looks for a `Dockerfile`: one means the rootless
|
|
1395
|
-
BuildKit path; none means Nixpacks/Railpack auto-detection, whose platform
|
|
1396
|
-
counterpart is the Next.js build (other frameworks need a Dockerfile). Without
|
|
1397
|
-
`--dir` the builder question is reported as unverified rather than guessed.
|
|
205
|
+
## Lisans
|
|
1398
206
|
|
|
1399
|
-
|
|
1400
|
-
account: the live run in this repo drives a fake Railway (`VIBECLOUD_RAILWAY_API`).
|
|
1401
|
-
A renamed field surfaces as a GraphQL error quoted by message.
|
|
207
|
+
[Elastic License 2.0](LICENSE)
|