viv install
Run this after cloning a project or pulling a composer.lock change: it
installs the exact versions the lock file records, without resolving
anything fresh.
When the project has no composer.lock, viv install prints Composer's
"No composer.lock file present" warning and runs viv update
instead, which resolves composer.json, writes the lock and installs. Only
the flags update shares with install carry over: --no-dev, --dry-run,
--no-scripts, --no-plugins, --ignore-platform-reqs,
--ignore-platform-req and -d. The others (-o, -a, --apcu-autoloader,
--link-mode, --adopt) take their defaults.
Usage
Install packages from composer.lock
Usage: viv install [OPTIONS]
Options:
--no-dev
Skip `require-dev` packages
-v, --verbose
Raise logging to debug
--cache-dir <CACHE_DIR>
Store location (default `$XDG_CACHE_HOME/vivace`, or `~/.cache/vivace`)
--dry-run
Print the plan and stop: no network, no filesystem writes
--link-mode <LINK_MODE>
How store files reach `vendor/`
Possible values:
- hardlink: One inode shared with the store; vendor files stay read-only
- copy: Independent copies, for projects that patch `vendor/` or whose vendor dir sits on another filesystem
- clone: A reflink (Linux `FICLONE` on btrfs/XFS, macOS `clonefile` on APFS): a copy-on-write clone sharing the store's extents, so it costs about as much to make as a hardlink but, unlike a hardlink, is never made read-only — patching `vendor/` works without `--link-mode copy`'s extra copy. Falls back to hardlink, then copy, the first time a file doesn't support it (probed once per run, same as the hardlink -> copy fallback below)
[default: hardlink]
--offline
Fail fast on any request instead of connecting: install errors, naming every package not already in the store; update solves from cached repository metadata only, erroring on an uncached package. Also set by `COMPOSER_DISABLE_NETWORK` (any value but unset, empty or `0`; Composer's own git-priming `prime` value is not special-cased here, since neither `install` nor `update` touch a git source)
--adopt
Reinstall every locked package from the store even if `installed.json` already matches it, e.g. to relink a `vendor/` Composer (or an older viv) wrote as plain copies. Prompts for confirmation when stdin is a terminal (skip with a non-interactive stdin, e.g. `</dev/null`)
-d, --project-dir <PROJECT_DIR>
Project directory holding `composer.json`/`composer.lock`
[default: .]
-o, --optimize-autoloader
Also classmap-scan PSR-0/PSR-4 directories (`config.optimize-autoloader`)
-a, --classmap-authoritative
Classmap-only autoloading, no PSR-0/PSR-4 fallback at runtime (`config.classmap-authoritative`); implies `-o`
--apcu-autoloader
Cache classmap lookups in `APCu` (`config.apcu-autoloader`)
--apcu-autoloader-prefix <PREFIX>
Fixed `APCu` cache-key prefix, instead of one generated per run (`config.apcu-autoloader-prefix`); implies `--apcu-autoloader`
--ignore-platform-reqs
Skip every platform (`php`/`ext-*`) requirement check, same as Composer's flag of the same name; wins over `--ignore-platform-req` below when both are given (`PlatformRequirementFilterFactory::fromBoolOrList`)
--ignore-platform-req <REQ>
Skip one named platform requirement (`*` glob, repeatable)
--no-scripts
Skip `pre-install-cmd`/`post-install-cmd`/`post-autoload-dump` and every other root `scripts` listener
--no-plugins
Install every package under `vendor/`, as Composer does with the same flag: the native `composer/installers`/`wordpress-core-installer` adapters are disabled, and any other enabled plugin viv would otherwise refuse only warns (`docs/plugin-strategy.md`)
--no-progress
Never draw the fetch/link progress line on stderr, even when it's a terminal (Composer has the same flag)
-n, --no-interaction
Accepted for compatibility with the CI-script idiom that pairs it with `--prefer-dist`/`--no-progress` (#211): viv never prompts, aside from `--adopt` on a TTY, so this is already true and only logged
--prefer-dist
Accepted for compatibility (#211): viv only ever installs dist archives, so this is already true and only logged
--no-suggest
Accepted for compatibility (#211): viv prints no suggestions to skip
-h, --help
Print help (see a summary with '-h')
Reads and writes
- Reads:
composer.json,composer.lock(andviv.lock, when present, to reconcile against it), the store under$XDG_CACHE_HOME/vivace. - Writes:
composer.lock(only when it was absent),vendor/(packages, autoload files,vendor/bin), the store (downloaded archives and their dist pointers, the platform-check and root-classmap sidecars).
Exit codes
0— installed cleanly.1— a filesystem, network, or archive error; a bad flag.2— a locked platform requirement failed verification, the same dependency-resolution exit code Composer uses.