lecodes-cli 0.1.0 → 0.1.2

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 CHANGED
@@ -16,23 +16,26 @@ npx lecodes-cli <command>
16
16
  ## Quick start
17
17
 
18
18
  ```sh
19
- lecodes login # paste a token, or sign in with email/password
19
+ lecodes login # opens the browser to authorize this machine
20
20
  lecodes clone <project-uuid> myapp # download files + types into ./myapp
21
21
  cd myapp
22
22
  # …edit files in VS Code (IntelliSense works out of the box)…
23
23
  lecodes status # see what changed
24
24
  lecodes push -m "Tweak the menu" # push as a new checkpoint
25
+ lecodes preview > app.js # compile the local project to JS
25
26
  ```
26
27
 
27
28
  ## Commands
28
29
 
29
30
  | Command | What it does |
30
31
  | --- | --- |
31
- | `login` | Store a personal access token in `~/.lecodes/config.json`. `--token <pat>` to use a token created in the web UI, `--api <url>` to set the server. |
32
+ | `login` | Authorize in the browser; stores an access token in `~/.lecodes/config.json`. `--token <pat>` to use a token created in the web UI instead, `--api <url>` for the API origin (default `https://le.codes`), `--web <url>` for the app origin. |
32
33
  | `clone <uuid\|url> [dir]` | Download a project's file tree + binary resources, plus `.d.ts` types and a `tsconfig.json` for IntelliSense. `--no-types` to skip types. |
33
34
  | `status` | Show added / modified / moved / deleted files vs the last sync. |
34
35
  | `pull` | Overwrite local files with the project's current remote state. `--force` to discard local edits. |
35
36
  | `push` | Push all local changes as **one** new checkpoint. `-m`/`--message` for the message, `--force` to override the "server moved on" guard. |
37
+ | `preview` | Compile the local project to a single JS bundle, printed to **stdout** (pipeable). `-o`/`--out <file>` to write a file, `--entry <path>` to override the entrypoint, `--no-header` to omit the metadata header, `--public-url <url>` for the asset URL prefix. Diagnostics go to stderr. |
38
+ | `render` | Render the local **UI** project. By default emits a semantic JSON description (great for AI/automated checks) to stdout or `-o`/`--out <file>`; `--png [file]` rasterizes a PNG (default `screenshot.png`, `--scale <n>` for DPR). `--width`/`--height` set the viewport (default 390×844). Requires the optional `lecodes-render` package (`npm i -D lecodes-render`); PNG also needs `@napi-rs/canvas`. 3D scenes aren't rendered. |
36
39
 
37
40
  ## How it works
38
41