|
1 | 1 | --- |
2 | | -title: "CLI" |
| 2 | +title: "Command Line Interface" |
3 | 3 | description: "The Edge Python developer CLI: run, serve, repl, init, package management, and build." |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | The `edge` developer CLI. Write `.py`, run it, serve it, ship it — you never compile anything yourself. `edge` hosts the [Edge Python runtime](/getting-started/what-it-is#where-it-runs) in a headless Chromium provisioned at install time, then runs your code against it. You just point it at a file. |
7 | 7 |
|
8 | 8 | ```bash |
9 | | -edge run app.py # run a script |
10 | | -edge serve # dev server with live reload |
11 | | -edge repl # interactive shell (demo) |
12 | | -edge test # run *_test.py files (not implemented yet) |
13 | | -edge init my-app # scaffold a project |
14 | | -edge add network # add a package to packages.json |
15 | | -edge remove network # remove a package from packages.json |
16 | | -edge build # bundle to dist/ |
17 | | -edge uninstall # remove the binary, PATH entry, optionally Chromium |
| 9 | +edge run app.py # run a script |
| 10 | +edge serve # dev server with live reload |
| 11 | +edge repl # interactive shell (demo) |
| 12 | +edge test # run *_test.py files (not implemented yet) |
| 13 | +edge init my-app # scaffold a project |
| 14 | +edge add network # add a package to packages.json |
| 15 | +edge remove network # remove a package from packages.json |
| 16 | +edge build # bundle to dist/ |
| 17 | +edge uninstall # remove the binary, PATH entry, optionally Chromium |
18 | 18 | ``` |
19 | 19 |
|
20 | 20 | The runtime does the actual work; `edge` is the loop around it. It launches system Chromium headless, serves the runtime alongside your code, runs everything in that browser, and streams output back to your terminal. `edge serve` opens the same setup in your own browser. |
@@ -64,7 +64,7 @@ A dev server for browser apps. Serves your project directory and reloads the pag |
64 | 64 | ```text |
65 | 65 | $ edge serve |
66 | 66 | http://localhost:5173 |
67 | | - watching . |
| 67 | + watching. |
68 | 68 | ``` |
69 | 69 |
|
70 | 70 | Flags: `--port <n>` (default `5173`), `--open` (open the browser). |
@@ -138,9 +138,9 @@ Bundles your app into a self-contained `dist/` for offline use or self-hosting: |
138 | 138 |
|
139 | 139 | ```text |
140 | 140 | $ edge build |
141 | | - successful - vendored runtime |
142 | | - successful - fetched compiler.wasm |
143 | | - successful - vendored packages |
| 141 | + (successful) vendored runtime |
| 142 | + (successful) fetched compiler.wasm |
| 143 | + (successful) vendored packages |
144 | 144 |
|
145 | 145 | bundled to dist/ |
146 | 146 |
|
|
0 commit comments