Documentation

CLI configuration

The CLI keeps two small files and reads a few environment variables. This page lists them and explains exactly what a deploy uploads.

Files

FileHolds
~/.config/vantrex/auth.jsonYour access token and the API addresses. Created by vtx login with permissions that only you can read. On Windows it is under %USERPROFILE%\.config\vantrex.
.vantrex/project.jsonWhich project this folder deploys to. Created by vtx link. Safe to commit; it contains no secrets.
~/.config/vantrex/auth.json
{
  "api_url": "https://api.vantrex.cloud",
  "auth_url": "https://app.vantrex.cloud",
  "key": "vtx_..."
}

Environment variables

VariableUsed byMeaning
VTX_API_URLvtx loginDefault for --api.
VTX_AUTH_URLvtx loginDefault for --auth.

You only need these to point the CLI at a different Vantrex installation. They are read when you sign in and saved in auth.json.

What gets uploaded

A remote deploy uploads your source files. The CLI skips, always:

  • these folders: node_modules, .git, .next, .vtx and .vantrex;
  • symbolic links and anything that is not a regular file;
  • files that commonly hold secrets: .env and .env.* (but not .env.example, .env.sample or .env.template), .npmrc, .netrc, .git-credentials, .htpasswd and private-key files such as id_rsa and id_ed25519.

Files that match your .gitignore or .vtxignore are skipped too. Dependencies are installed on Vantrex from your lockfile, which is why node_modules is not sent. Files that Vantrex already has are not sent again, so repeat deploys of a large project upload only what changed.

Ignoring files

Add a .vtxignore file at the root of the folder you deploy, with one name or path per line. Lines starting with # are comments. The root .gitignore is read as well. Negation (!) and ignore files in sub-folders are not supported.

.vtxignore
# not needed to build
docs
coverage
design-source.psd

Prebuilt output

With --prebuilt the folder you name is uploaded as the finished site and no build runs. Use it when you build elsewhere, for example in CI, or deploy plain static files.

$ npm run build
$ vtx deploy --prebuilt --prod ./dist

A prebuilt deployment is static only. For a server-rendered app, deploy the source so Vantrex builds the server.