@msn-control/liftoff 0.3.4 → 0.4.0
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 +55 -37
- package/assets/locks/frontend/package-lock.json +2217 -0
- package/assets/locks/frontend/package.json +19 -0
- package/assets/locks/node-backend/package-lock.json +4352 -0
- package/assets/locks/node-backend/package.json +32 -0
- package/dist/args.d.ts +9 -1
- package/dist/args.js +110 -33
- package/dist/args.js.map +1 -1
- package/dist/catalogs.d.ts +10 -1
- package/dist/catalogs.js +89 -0
- package/dist/catalogs.js.map +1 -1
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts +5 -0
- package/dist/commands.js +599 -115
- package/dist/commands.js.map +1 -1
- package/dist/file-system.js +89 -5
- package/dist/file-system.js.map +1 -1
- package/dist/framework-adapters.d.ts +15 -0
- package/dist/framework-adapters.js +112 -0
- package/dist/framework-adapters.js.map +1 -0
- package/dist/framework-validation.d.ts +8 -0
- package/dist/framework-validation.js +83 -0
- package/dist/framework-validation.js.map +1 -0
- package/dist/init-filesystem.d.ts +102 -0
- package/dist/init-filesystem.js +762 -0
- package/dist/init-filesystem.js.map +1 -0
- package/dist/interactive.d.ts +5 -1
- package/dist/interactive.js +75 -4
- package/dist/interactive.js.map +1 -1
- package/dist/npm-template-assets.d.ts +3 -0
- package/dist/npm-template-assets.js +32 -0
- package/dist/npm-template-assets.js.map +1 -0
- package/dist/planner.js +62 -3
- package/dist/planner.js.map +1 -1
- package/dist/process-runner.d.ts +28 -0
- package/dist/process-runner.js +80 -0
- package/dist/process-runner.js.map +1 -0
- package/dist/project-dependencies.d.ts +28 -0
- package/dist/project-dependencies.js +163 -0
- package/dist/project-dependencies.js.map +1 -0
- package/dist/reconcile.js +4 -1
- package/dist/reconcile.js.map +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +9 -0
- package/dist/runtime.js.map +1 -0
- package/dist/standard-templates.js +3 -30
- package/dist/standard-templates.js.map +1 -1
- package/dist/templates.d.ts +9 -1
- package/dist/templates.js +110 -46
- package/dist/templates.js.map +1 -1
- package/dist/terminal.d.ts +32 -0
- package/dist/terminal.js +182 -0
- package/dist/terminal.js.map +1 -0
- package/dist/types.d.ts +38 -1
- package/dist/workstation-catalog.d.ts +20 -0
- package/dist/workstation-catalog.js +122 -0
- package/dist/workstation-catalog.js.map +1 -0
- package/dist/workstation.d.ts +76 -0
- package/dist/workstation.js +461 -0
- package/dist/workstation.js.map +1 -0
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -26,63 +26,54 @@ Versions before 0.3.0 are unsupported and must not be used for new projects. If
|
|
|
26
26
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
|
-
Preview a
|
|
29
|
+
Preview a project and its derived workstation requirements without writing files or running installers:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
liftoff plan --pattern rag --cloud azure --region eastus --frontend
|
|
32
|
+
liftoff plan --pattern rag --cloud azure --region eastus --frontend --agents copilot,claude
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Initialize a named project. Liftoff probes required runtimes, the selected spec framework, cloud/development tools, and every selected AI coding agent before it writes:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
liftoff
|
|
38
|
+
liftoff init claims-copilot --pattern rag --cloud azure --region eastus --spec openspec --agents copilot,claude --frontend --yes
|
|
39
39
|
cd claims-copilot
|
|
40
40
|
cp .env.example .env
|
|
41
41
|
liftoff validate
|
|
42
42
|
liftoff doctor
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Add `--install-tools` only after reviewing machine-level install commands, and add `--install-dependencies` to run the generated project's locked dependency commands. These permissions are independent from `--yes`.
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
liftoff plan --no-genai --api node --cloud azure --region eastus
|
|
49
|
-
liftoff create claims-api --no-genai --api node --cloud azure --region eastus --spec openspec --no-frontend --yes
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Standard API choices are `python` (FastAPI), `node` (Fastify with TypeScript), and `go` (Huma v2 with Chi). Existing GenAI commands that provide `--pattern` continue to infer the GenAI project type and Python/FastAPI stack.
|
|
53
|
-
|
|
54
|
-
Use the local development helper to print the Docker Compose command, then run the printed command:
|
|
47
|
+
To initialize an existing Git worktree root in place, run `liftoff init` at that exact root. With no project name, Liftoff uses the repository directory name; a supplied name changes project identity without creating a child directory.
|
|
55
48
|
|
|
56
49
|
```bash
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
cd existing-repository
|
|
51
|
+
liftoff init --no-genai --api node --cloud azure --region eastus --spec spec-kit --agents copilot,claude --default-agent copilot
|
|
59
52
|
```
|
|
60
53
|
|
|
61
|
-
|
|
54
|
+
In a non-Git directory or below (but not at) a Git root, a project name creates a named child. Standard API choices are `python` (FastAPI), `node` (Fastify with TypeScript), and `go` (Huma v2 with Chi). A GenAI `--pattern` selects the Python/FastAPI/PydanticAI stack.
|
|
55
|
+
|
|
56
|
+
For an existing application, migration creates a fresh sibling scaffold, runs the same readiness and official-framework pipeline, stages a filtered source copy, and leaves the source byte-for-byte unchanged:
|
|
62
57
|
|
|
63
58
|
```bash
|
|
64
|
-
liftoff migrate ../legacy-app --region eastus --yes
|
|
59
|
+
liftoff migrate ../legacy-app --region eastus --agents copilot,claude --yes
|
|
65
60
|
```
|
|
66
61
|
|
|
67
|
-
##
|
|
68
|
-
|
|
69
|
-
Liftoff turns a small set of project decisions into a deterministic scaffold and records what it wrote so future CLI versions can reconcile safely.
|
|
62
|
+
## Lifecycle
|
|
70
63
|
|
|
71
64
|
```text
|
|
72
|
-
plan ->
|
|
65
|
+
plan -> init or migrate -> validate and doctor -> update -> dev and infra helpers
|
|
73
66
|
```
|
|
74
67
|
|
|
75
|
-
- `liftoff plan` resolves
|
|
76
|
-
- `liftoff
|
|
77
|
-
- `liftoff migrate <path>` scans a
|
|
78
|
-
- `liftoff validate` checks
|
|
79
|
-
- `liftoff doctor`
|
|
80
|
-
- `liftoff update`
|
|
81
|
-
- `liftoff
|
|
82
|
-
- `liftoff dev` prints Docker Compose helper commands such as `docker compose up --build`, `docker compose logs -f`, and `docker compose down --volumes`.
|
|
83
|
-
- `liftoff infra` prints OpenTofu helper commands such as `tofu init`, `tofu plan -var-file=environments/dev.tfvars`, and `tofu apply -var-file=environments/dev.tfvars`.
|
|
68
|
+
- `liftoff plan` resolves project decisions, previews artifacts and requirements, and has no side effects.
|
|
69
|
+
- `liftoff init` initializes a new child or the exact current Git root, checks workstation readiness, runs the pinned official OpenSpec or Spec Kit initializer in temporary staging, validates all output, and merges transactionally.
|
|
70
|
+
- `liftoff migrate <path>` scans a non-Liftoff source, requires a new or empty sibling target, and uses the same staged framework and optional dependency phases. `--force` never permits a non-empty migration target.
|
|
71
|
+
- `liftoff validate` checks the manifest's durable files plus the declared framework contract and selected-agent markers.
|
|
72
|
+
- `liftoff doctor` performs read-only plan-derived probes with blocking, advisory, authentication-health, framework, drift, runtime, and cloud layers. JSON output uses stable requirement identifiers and states.
|
|
73
|
+
- `liftoff update` is a read-only drift check by default. `liftoff update --apply` writes safe durable changes, skips conflicts unless `--force` is supplied, and reports orphans without deleting them.
|
|
74
|
+
- `liftoff dev` and `liftoff infra` print Docker Compose and OpenTofu helper commands; they do not execute them.
|
|
84
75
|
|
|
85
|
-
|
|
76
|
+
Catalog discovery remains available:
|
|
86
77
|
|
|
87
78
|
```bash
|
|
88
79
|
liftoff patterns
|
|
@@ -91,19 +82,46 @@ liftoff regions
|
|
|
91
82
|
liftoff regions search korea --cloud azure
|
|
92
83
|
```
|
|
93
84
|
|
|
94
|
-
Azure is the available V1 provider. AWS and GCP
|
|
85
|
+
Azure is the available V1 provider. AWS and GCP remain planned and are rejected before generation.
|
|
86
|
+
|
|
87
|
+
## Workstation Readiness
|
|
88
|
+
|
|
89
|
+
Liftoff automatically detects requirements derived from the full project plan:
|
|
90
|
+
|
|
91
|
+
- Blocking: Node.js 20.19+, the selected Python/Node/Go runtime, the exact tested OpenSpec or Spec Kit CLI, and every selected Copilot or Claude Code integration.
|
|
92
|
+
- Advisory: Docker and daemon health, OpenTofu, Azure CLI, and cloud authentication.
|
|
93
|
+
- Authentication: Liftoff reports observable health but never stores credentials or signs in on the developer's behalf.
|
|
94
|
+
|
|
95
|
+
On macOS, allowlisted recipes use Homebrew, npm, or `uv`; on Windows they use WinGet, npm, or `uv`. Liftoff prints each command and requires `--install-tools` or separate interactive approval. Linux system packages are never installed with automatic elevation: Liftoff gives distribution-appropriate official guidance, while npm/`uv` framework recipes remain separately consented. PATH-changing installs are re-probed and may require a new terminal.
|
|
96
|
+
|
|
97
|
+
Copilot is detected through its CLI or supported VS Code extensions. Claude Code is checked with its version and doctor commands. Both agents may be selected together; Spec Kit additionally records one selected agent as its default integration.
|
|
98
|
+
|
|
99
|
+
## Target, Ownership, And Consent Safety
|
|
100
|
+
|
|
101
|
+
Liftoff renders into a temporary staging directory, runs official framework commands there, rejects symlinks and unexpected framework roots, validates the complete tree, then computes one immutable destination preflight. Existing unrelated files are preserved. Different regular files are disclosed as one conflict set; structural collisions, symlink paths, unsafe ancestors, and an existing `liftoff.manifest.json` are non-overridable blockers. Writes are atomic and handled failures roll back created or replaced files.
|
|
102
|
+
|
|
103
|
+
The four consent flags do not imply one another:
|
|
104
|
+
|
|
105
|
+
| Flag | Authorizes | Does not authorize |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `--yes` | Project defaults and plan confirmation | File replacement, machine installs, or project dependencies |
|
|
108
|
+
| `--force` | Only listed, validated regular-file replacements | Manifest guards, symlinks, structural collisions, tools, dependencies, or non-empty migration targets |
|
|
109
|
+
| `--install-tools` | Allowlisted workstation installation commands | Project decisions, overwrites, or project dependencies |
|
|
110
|
+
| `--install-dependencies` | Locked project-local dependency commands after a successful merge | Machine tools, project decisions, or overwrites |
|
|
111
|
+
|
|
112
|
+
OpenSpec and Spec Kit core/integration output is owned by their official initializers. Liftoff validates the declared version and selected-agent markers but does not place framework-owned or one-time seed files in durable artifact hashes. Schema-v3 manifests record this contract explicitly; schema-v2 projects remain supported as legacy state without inventing framework ownership or agent selections.
|
|
95
113
|
|
|
96
114
|
## Strict Commands And Safe Recovery
|
|
97
115
|
|
|
98
116
|
Liftoff validates each command before running it. Unknown flags or subcommands, missing flag values, invalid booleans, incompatible duplicates, and extra positional arguments exit 1 without generating files or printing a fallback helper command. Use command-specific help to see the accepted syntax:
|
|
99
117
|
|
|
100
118
|
```bash
|
|
101
|
-
liftoff
|
|
119
|
+
liftoff init --help
|
|
120
|
+
liftoff migrate --help
|
|
102
121
|
liftoff update --help
|
|
103
|
-
liftoff regions --help
|
|
104
122
|
```
|
|
105
123
|
|
|
106
|
-
`liftoff
|
|
124
|
+
The former `liftoff create` command is intentionally rejected with guidance to use `liftoff init`; there is no compatibility alias.
|
|
107
125
|
|
|
108
126
|
Manifest paths must be portable path-part arrays confined to the project. Traversal, absolute, drive-qualified, UNC, embedded-separator, empty, and symlink-escaping paths are rejected before artifact access. If validation reports an unsafe or malformed manifest, restore `liftoff.manifest.json` from version control or regenerate a fresh project with the matching Liftoff version. Do not repair the issue by weakening path validation or by retaining a hand-edited unsafe path.
|
|
109
127
|
|
|
@@ -178,7 +196,7 @@ Conditional areas:
|
|
|
178
196
|
Generated projects contain two root files with different ownership models:
|
|
179
197
|
|
|
180
198
|
- `liftoff.config.json` is user-owned desired state after creation. Liftoff writes it once during generation and does not machine-rewrite it afterwards. Supported changes, such as adding an environment or enabling frontend output, are reconciled by `liftoff update`. Project type, API stack, and GenAI pattern changes are migrations and should use `liftoff migrate`.
|
|
181
|
-
- `liftoff.manifest.json` is the CLI-owned compatibility record. Manifest schema
|
|
199
|
+
- `liftoff.manifest.json` is the CLI-owned compatibility record. Manifest schema v3 records the generating `liftoffVersion`, project identity, selected agents, applicable default agent, official framework adapter and tested contract version, and durable generated artifact `logicalName`s with OS-neutral path parts and `sha256:` content hashes. V2 manifests remain readable as explicit legacy framework state.
|
|
182
200
|
|
|
183
201
|
The manifest lets `liftoff validate`, `liftoff doctor`, and `liftoff update` distinguish clean generated files from local edits. Seed content, such as the initial OpenSpec bootstrap change, is written once and intentionally omitted from the durable manifest so it can follow its own lifecycle. Treat the manifest as CLI-owned: restore or regenerate it when validation fails rather than hand-editing artifact paths or hashes.
|
|
184
202
|
|
|
@@ -186,7 +204,7 @@ The manifest lets `liftoff validate`, `liftoff doctor`, and `liftoff update` dis
|
|
|
186
204
|
|
|
187
205
|
Generated projects contain persistent files that outlive any CLI release. The following rules are the compatibility contract, enforced by `tests/contract.test.ts` where possible:
|
|
188
206
|
|
|
189
|
-
- **Manifest schema**:
|
|
207
|
+
- **Manifest schema**: writers use `artifactVersion` 3; readers support v2 legacy and v3 initialized framework state and reject other versions with a remedy. Durable artifacts retain `sha256:`-prefixed hashes, while framework-owned and seed files are validated separately.
|
|
190
208
|
- **Append-only identifiers**: artifact `logicalName`s and catalog ids (project types, API stacks, patterns, providers, environments, spec workflows) are never renamed or removed, only added. The contract test snapshots the logical-name sets.
|
|
191
209
|
- **Deterministic rendering**: artifact content depends only on the project plan and the template code, with no timestamps, randomness, or environment leakage. Verified by a double-render byte-equality test.
|
|
192
210
|
- **Reserved namespaces**: `.liftoff/` in generated projects is reserved for future CLI-managed state; no new CLI-managed root-level files beyond `liftoff.config.json` and `liftoff.manifest.json`. `liftoff.config.json` is written once at generation and never machine-written afterwards.
|