@backifydev/cli 0.3.12 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -2
- package/dist/index.js +18883 -859
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @backifydev/cli
|
|
2
2
|
|
|
3
|
+
## Coding-tool MCP bridge
|
|
4
|
+
|
|
5
|
+
`backify mcp [--organization <organization-id>]` bridges stdio to the single
|
|
6
|
+
organization MCP at `https://mcp.backify.dev`. Sign in explicitly using
|
|
7
|
+
`backify login --organization <organization-id> --organization-access`; application
|
|
8
|
+
sessions remain app-scoped and cannot administer organizations. The bridge rereads
|
|
9
|
+
credentials per request and pins the organization until restarted. Discover and
|
|
10
|
+
describe customer API operations, prepare changes, obtain explicit user approval,
|
|
11
|
+
then execute with a one-use confirmation. All API permissions and release policies
|
|
12
|
+
still apply. See the [plugin guide](../../docs/coding-tool-plugins.md).
|
|
13
|
+
|
|
14
|
+
`backify tools configure --agent copilot|cursor|gemini` adds the selected host's
|
|
15
|
+
native HTTP configuration for that same MCP. Cline and Windsurf/Cascade additionally
|
|
16
|
+
require `--config <exact-editor-config-path>`. `--dry-run` previews without writing;
|
|
17
|
+
`--transport stdio` selects the existing local bridge instead. Existing settings
|
|
18
|
+
and other MCP servers are preserved; conflicting Backify entries and JSONC files
|
|
19
|
+
are never overwritten. Native HTTP authorization opens the existing Backify portal
|
|
20
|
+
for explicit organization consent and gives the coding tool only an opaque MCP
|
|
21
|
+
token. This requires the updated server/portal rollout; it is not deployed by
|
|
22
|
+
running the setup command. Native sessions last up to an hour and require
|
|
23
|
+
reauthorization/re-registration after expiration or an MCP server restart.
|
|
24
|
+
Application instruction selection additionally supports `--agent cursor`,
|
|
25
|
+
`--agent cline` and `--agent windsurf`.
|
|
26
|
+
The bridge now exchanges browser-approved account access for an organization-
|
|
27
|
+
and audience-bound MCP token; the updated CLI and MCP host must roll out together.
|
|
28
|
+
|
|
3
29
|
|
|
4
30
|
## API integration discovery
|
|
5
31
|
|
|
@@ -162,6 +188,27 @@ Set up, connect, record requests, and ship a Backify application repository. CLI
|
|
|
162
188
|
|
|
163
189
|
## Full-stack starter
|
|
164
190
|
|
|
191
|
+
For a runnable personal task application, add `--template tasks`:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
backify scaffold --app app_xxxxx --name personal-tasks --template tasks
|
|
195
|
+
npm install
|
|
196
|
+
npm run dev
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
The task template declares authentication, database and jobs, wires the frontend
|
|
200
|
+
and HTTP handlers, supplies an additive schema declaration, and includes tests
|
|
201
|
+
for validation, trusted ownership and cross-user isolation. Development explicitly
|
|
202
|
+
uses local document providers and two reviewed local identities. Issue a short-lived
|
|
203
|
+
user token with `backify identity issue --local --user 44444444-4444-4444-4444-444444444444`
|
|
204
|
+
and use the development-only token field. No provider connections are required.
|
|
205
|
+
The production build removes this field; verified production sign-in remains a
|
|
206
|
+
deployment prerequisite. Local PostgreSQL/runtime prerequisites are not installed
|
|
207
|
+
automatically. The generated README distinguishes emulation from real-engine
|
|
208
|
+
migration tests. Full local mode accepts the same additive schema declaration;
|
|
209
|
+
review it and run `npm run dev:full -- --apply-migrations` to approve pending DDL.
|
|
210
|
+
The existing minimal starter remains the default.
|
|
211
|
+
|
|
165
212
|
In an empty folder, run backify scaffold --app app_xxxxx --name my-application
|
|
166
213
|
with the application ID supplied by Backify. It writes a React/Vite frontend, Hono
|
|
167
214
|
HTTP server, declaration-only scheduled worker, tests and current project guidance.
|
|
@@ -262,7 +309,7 @@ npx @backifydev/cli ship
|
|
|
262
309
|
|
|
263
310
|
Authenticated application commands recover automatically from a known expired credential or an API 401: they open browser approval, replace the saved application credential, and retry the rejected request once. Permission errors (403), network failures, and service errors do not trigger sign-in or write retries. Use `--no-browser` for unattended work. With `--json`, authentication failures include `code: "authentication_required"` and `reauthenticationCommand: "backify connect --reauth"`. A coding agent should ask its user to sign in before starting explicit recovery. The callback accepts only the selected authorization origin and matching random state/application/organization, is bound to `127.0.0.1`, and closes after approval or a five-minute timeout. Browser local-network access may need approval. A remotely hosted or headless coding tool needs a browser on the CLI host that can reach this loopback listener; this flow does not add remote device-code authentication.
|
|
264
311
|
|
|
265
|
-
`init` installs `@backifydev/sdk`, writes `backify.json` and `BACKIFY.md`, and maintains only the selected coding tool's Backify block. Use `--agent codex` (`AGENTS.md`), `--agent claude` (`CLAUDE.md`), `--agent copilot` (`.github/copilot-instructions.md`),
|
|
312
|
+
`init` installs `@backifydev/sdk`, writes `backify.json` and `BACKIFY.md`, and maintains only the selected coding tool's Backify block. Use `--agent codex` (`AGENTS.md`), `--agent claude` (`CLAUDE.md`), `--agent copilot` (`.github/copilot-instructions.md`), `--agent gemini` (`GEMINI.md`), `--agent cursor`/`--agent windsurf` (`AGENTS.md`), or `--agent cline` (`.clinerules/backify.md`). The CLI remembers the selection for `init`, `sync`, and `doctor`; new projects default to Codex. For any other tool, pass `--instruction-file <relative-path>` to use its native instruction or rule file, including nested paths; this is remembered too. It preserves other instructions and does not create or modify other tools' files.
|
|
266
313
|
|
|
267
314
|
The app configuration stores `instructionVersion`, matching the version declared in each managed block and its immutable guide at `https://agent.backify.dev/v<number>`. The agent root always serves the latest guide as plain text. `doctor` detects version/content drift and malformed markers. Use `npx @backifydev/cli@latest sync` to explicitly upgrade all blocks and the configuration together; unrelated configuration and unmanaged instructions remain unchanged.
|
|
268
315
|
|
|
@@ -276,13 +323,26 @@ Copy the application AI prompt in Backify to receive the application ID, organiz
|
|
|
276
323
|
|
|
277
324
|
`pull` checks the connected application, repository, branch, and repository root, then fetches GitHub using a short-lived scoped credential. It fast-forwards only a clean, non-diverged branch. Incoming updates blocked by local changes, untracked files, or diverged history return a blocked result and a nonzero exit code; nothing is stashed, reset, rebased, or force-pushed. Connecting an existing repository runs this update automatically, and the agent guide requires it before editing each new user request. It is not a background watcher.
|
|
278
325
|
|
|
279
|
-
`ship` runs configured checks, verifies the repository/branch, and pushes already-committed source using a short-lived repository-scoped GitHub App credential. It never stages, commits, force-pushes, or fabricates preview testing. By default it waits for the exact healthy preview and returns its URL without requesting production publication. Plain requests such as “Now deploy” and approval to merge and retry remain preview-only; production requires an explicit user request to deploy to production. Instruction version 10 (CLI 0.3.12) makes this distinction explicit in installed guidance. Promote the preview in the portal, or explicitly run `ship --production-deploy` to request publication through existing policy and permissions. Required testing/approval returns a pending state and preview URL, not a false successful production deployment. The legacy `--preview-only` flag remains supported but cannot be combined with `--production-deploy`. Use `--timeout <seconds>` to change the default 1200-second wait. Applications must currently be at the repository root; Backify Cloud needs static index.html output, and customer Azure
|
|
326
|
+
`ship` runs configured checks, verifies the repository/branch, and pushes already-committed source using a short-lived repository-scoped GitHub App credential. It never stages, commits, force-pushes, or fabricates preview testing. By default it waits for the exact healthy preview and returns its URL without requesting production publication. Plain requests such as “Now deploy” and approval to merge and retry remain preview-only; production requires an explicit user request to deploy to production. Instruction version 10 (CLI 0.3.12) makes this distinction explicit in installed guidance. Promote the preview in the portal, or explicitly run `ship --production-deploy` to request publication through existing policy and permissions. Required testing/approval returns a pending state and preview URL, not a false successful production deployment. The legacy `--preview-only` flag remains supported but cannot be combined with `--production-deploy`. Use `--timeout <seconds>` to change the default 1200-second wait. Applications must currently be at the repository root; Backify Cloud needs static index.html output, and customer Azure supports managed Node/npm builds or a custom Dockerfile serving port 8080. Local Docker is not required.
|
|
280
327
|
|
|
281
328
|
`disconnect` revokes that user's application CLI sessions. `logout` removes local credentials only. Prompt histories and local reports remain subject to application permissions. Deploy the matching API and publish CLI 0.3.0 before enabling this flow in production.
|
|
282
329
|
|
|
283
330
|
Connections now report the device hostname, operating system, architecture, and installed CLI version. Browser-based `connect` exchanges a general sign-in token for an application-scoped device session. Application **People & access → CLI access** shows these sessions and lets access managers revoke individual devices; source managers can revoke their own. Existing connections may need reconnecting to record device details. See [CLI access and country lookup configuration](../../docs/cli-access.md) for privacy, permissions and deployment requirements.
|
|
284
331
|
## Environment diagnostics before onboarding
|
|
285
332
|
|
|
333
|
+
Backify is TypeScript-first: prefer React/Vite and an explicit TypeScript backend
|
|
334
|
+
for new applications. Existing frameworks are assessed individually and custom
|
|
335
|
+
containers remain an advanced hosting path. Doctor and local reports expose
|
|
336
|
+
advisory support tiers without rejecting existing stacks or claiming verified SDK
|
|
337
|
+
integration. See [application support](../../docs/application-support.md).
|
|
338
|
+
|
|
339
|
+
Container delivery supports repository-root npm applications with a lockfile and
|
|
340
|
+
start script without requiring a Dockerfile or local Docker installation. Custom
|
|
341
|
+
Dockerfiles take precedence and support other languages; that does not imply SDK
|
|
342
|
+
support for those languages. Generated GitHub workflows verify the exact production
|
|
343
|
+
image before registry publication. See [application build verification](../../docs/application-build-contract.md)
|
|
344
|
+
for supported layouts, diagnostics, limitations and rollout requirements.
|
|
345
|
+
|
|
286
346
|
Run `backify doctor --environment` before connection or initialization when the CLI is already installed. It checks Node.js, npm, optional Git, a unique workspace write/read/cleanup, and real loopback HTTP without changing application configuration. Missing terminal or Node.js/npm must be diagnosed by the coding environment before the CLI can run.
|
|
287
347
|
|
|
288
348
|
Add `--network` for bounded, credential-free probes of the public guide, documentation, anonymous API health and npm package metadata. Add `--capability <capability-name>` to probe that capability's documentation. No arbitrary endpoints, pairing credentials or tokens are accepted. Public production endpoints are tested, not a configured nonproduction API; diagnose a trusted override separately before connection.
|