Advanced Usage
Flags, catalog cache, and environment variables for create-vlang-app
Working with V in Generated Projects
Every CVA template is V-native: dependencies live in v.mod, formatting uses v fmt, static checks use v vet, and tests run with v test.
# Scaffold (v install runs unless --no-install) create-vlang-app my-app --template web-server # Refresh module deps later cd my-app v install
Skip automatic install
Use
--no-install when scaffolding if you want to review v.mod before running v install yourself.CLI flags
| Flag | Description |
|---|---|
-v, --verbose | Print additional logs |
-i, --info | Print environment debug info |
--no-install | Skip v install after scaffolding |
-t, --template <slug> | Template from cva-templates |
--addons / --extend | Extensions to merge into the project |
-f, --force | Overwrite non-empty target directory |
--interactive / --no-interactive | Prompt for options or run headless |
--list-templates / --list-addons | Print catalog entries |
--set key=value | Override template variables |
--keep-on-failure | Preserve partial output on error |
--strict-version | Require exact CLI/catalog versions (see CVA_STRICT_VERSION) |
--offline | Do not reach network for catalog refresh |
--no-cache | Bypass ~/.cache/cva (see CVA_NO_CATALOG_CACHE) |
--cache-dir | Override catalog cache location |
--pin <ref> | Pin cva-templates git ref |
--refresh always|stale|manual | Catalog refresh policy (CVA_REFRESH) |
Catalog cache
The CLI caches Create-Vlang-App/cva-templates under ~/.cache/cva by default. Manage it with subcommands:
create-vlang-app cache dir create-vlang-app cache list create-vlang-app cache clean create-vlang-app cache verify create-vlang-app cache outdated create-vlang-app cache update create-vlang-app cache doctor
Environment variables
CVA_CACHE_DIR— catalog cache path (default~/.cache/cva)CVA_STRICT_VERSION— fail when CLI and catalog versions mismatchCVA_NO_CATALOG_CACHE— disable catalog cachingCVA_REFRESH—always,stale, ormanualCVA_SKIP_GIT— skipgit initafter scaffolding
CI/CD Integration
Use the github-setup extension for workflows powered by vlang/setup-v:
create-vlang-app my-app --template web-server --addons github-setup --no-interactive
Deployment Workflow
Troubleshooting
Catalog or module issues
- Run
create-vlang-app cache doctorto validate cache integrity - Set
CVA_REFRESH=alwaysto force-refresh cva-templates - Ensure
~/.vmodulesis writable when runningv install