This guide shows you everything you can do with the XDN command line interface.
To install the XDN CLI run
npm i -g @xdn/cli
Or with yarn:
yarn global add @xdn/cli
Run in an existing app to add all required packages and files need to publish your app on the Moovweb XDN
Runs your app locally. Uses port 3000 by default. You can change this by setting the
port environment variable. For example:
port=5000 xdn run.
|Runs your app using serverless-offline to more closely simulate the cloud environment. This is equivalend to setting NODE_ENV environment variable to |
xdn run --production
Creates a build of your app optimized for production
|Skips the framework (Next.js, Vue, Angular, etc..) build and simply rebundles your router|
Builds and deploys your site on the Moovweb XDN.
|The name of the team under which the site will be deployed. The site will be deployed to your private space will be used if omitted.|
|The name of the site to deploy. By default the |
|The environment to deploy to. By default the |
|The name of the source control branch. This is automatically set when using Git.|
|Skips the build step|
|Authenticates using a deploy token rather than your user credentials. Use this option when deploying from CI.|
xdn deploy my-team --environment=production
Clears the cache. If neither
--surrogate-key is specified, the entire cache for the
specified environment will be cleared.
|(Required) The team name|
|(Required) The site name.|
|(Required) The environment name.|
|A path to clear. Use "*" as a wildcard.|
|Clears all responses assigned to the specified surrogate key.|
xdn cache-clear --team=my-team --site=my-site --environment=production --path=/p/*
Logs into the XDN via the developer console.
Logs out of the XDN
Creates a script that provides autocompletion for xdn cli commands that can be installed in your shell.
xdn completion >> ~/.zshrc
xdn completion >> ~/.bashrc
Open the XDN documentation in your browser.