Update CLI documentation for clarity and accuracy

This commit is contained in:
crazywhalecc
2026-04-29 15:33:06 +08:00
parent a73e6c0e7e
commit 27c364f692
7 changed files with 15 additions and 22 deletions

View File

@@ -516,10 +516,3 @@ spc spc-config "bcmath,openssl" --libs
# Use absolute library paths
spc spc-config "bcmath,openssl" --libs --absolute-libs
```
Enter an interactive shell with StaticPHP's build environment pre-loaded (compiler wrappers, `buildroot/`, `pkgroot/` paths, etc. on `PATH`).
```bash
spc dev:shell
```
Useful for compiling small programs against `libphp.a` (embed SAPI) or inspecting the build environment manually.

View File

@@ -74,6 +74,10 @@ This approach lets you run download and compile as separate steps — useful whe
### Step 1: Download Dependencies
In v3, you can skip this step entirely — running `build:php` directly will automatically download any missing artifacts.
If you want to pre-download ahead of time, or if you're working in a slow-network environment and want to separate the download phase, use the `download` command:
```bash
# Download only what the chosen extensions need (recommended)
spc download --for-extensions="bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer" --with-php=8.4

View File

@@ -82,13 +82,6 @@ The script downloads `php` and `composer` into a `runtime/` subdirectory. You th
# Add this to ~/.bashrc or ~/.zshrc to make it permanent
```
::: tip
In regions with restricted access to GitHub or getcomposer.org, pass `--mirror china` to use a mirror:
```bash
bin/setup-runtime --mirror china
```
:::
## Vendor mode
If you already have a PHP project and want to call StaticPHP's build APIs directly, or use a custom registry to support private libraries and extensions, pull it in as a Composer dependency: