Table of Contents

Commands

neos setup

This command sets up the development environment.

It is recommended to run the command when installing or updating the Neos CLI tool.

It must be run as an administrator.

For more details, the command :

  • Checks the version of .NET, Node and NPM.
  • Generates a development certificate and on Windows, associates it to the HTTPS port.
  • Installs OmniSharp which is a tool to provide the Neos Studio code editor all the intelligence (autocompletions, diagnostics, documentation).
  • Checks the HTTP.SYS URL reservation (only on Windows).
  • Configures Dapr.

neos init

This command initializes a new cluster in the current directory.

Three files are created :

  • [DirectoryName].yml : Cluster YAML configuration file.
  • [DirectoryName].auth.yml : Cluster YAML authentication configuration file.
  • [DirectoryName].connectionstring.yml : Cluster YAML database configuration file.
  • dotnet-tools.json : .NET tools manifest file.

When a neos command is executed in the cluster folder containing the dotnet-tools.json file, the tool with the specified version is used. This allows to have several versions of the tool between different clusters.

Update the tool that a cluster uses

When a cluster is initialized with the neos init command, a dotnet-tools.json file is generated. This file contains the version of the Neos tool to use in the cluster directory.

It is recommended to keep this file on a real cluster for several reasons :

  • If several developers are working on the same cluster, we are sure that all developers are using the same version.
  • This allows to use different versions on different clusters.

To update the version that the cluster uses, you just have to modify the dotnet-tools.json file by indicating the version to use.

You can delete this file on a test cluster where you always want to use the latest installed version.

neos generate <(all)|client|server>

This command generates the client application and the server from the cluster metadata.

As a first argument, you have to specify what you want to generate:

  • all : The client and the server (default value)
  • client : Only the client
  • server : Only the server

Options are available:

Option Description
--nobuild (-nb) Disable .NET projects compilation.
--rebuild (-rb) Force the compilation of .NET projects even if no modified files have been detected. In addition, the client/node_modules folder is deleted so that the client application dependencies are reinstalled.
--warnaserror (-we) Treat warnings as errors.
--build-configuration (-c) <Default|Debug|Release> Force the configuration to be used to compile .NET projects.
--restore (-rp) Restore referenced modules from NuGet before generation. [default: true]
--force (-f) Force full build (no incremental build). [default: false]

neos check <(all)|client|server>

This command checks that the generation is up to date.

As a first argument, you have to specify what you want to check:

  • all : Client and server (default value)
  • client : Only the client
  • server : Only the server

If a difference is detected, the output code returned is 1 otherwise 0.

neos check-metadata

This command checks the validity of YAML metadata files, showing warnings and errors about their content.

Option Description
--diff (-d) Generates difference files at the root of the cluster. [default: false]
--fix (-f) Automatically fixes warnings. [default: false]
--warnaserror (-wae) Treats warnings as errors and returns an exit code of 1 even if there are only warnings. [default: true]

For more information, see this article.

neos update-dbobjects

This command updates the database objects system table ($NeosObject) from the current database system catalog.

The database migration is now based on this table to select the objects eligible for updating. This command therefore synchronizes the data to be sure that the modifications of the Neos schema will be correctly taken into account.

Note

This command MUST BE run to update the system table on an existing database containing exclusively objects owned to the Neos application. Otherwise, the migration result may be unpredictable and contain errors.

Warning

This command MUST NOT BE run to update the system table on an existing database containing objects not owned by the Neos application. Otherwise, these objects will be deleted during the next migration.

neos migrate-metadata

This command migrates the cluster metadata.
It needs to be called only when an error message indicates that the metadata format has changed when generating the application after installing a new version of Neos.

neos run

This command runs the cluster application (client and server) in development mode.

Options are available:

Option Description
--build-configuration (-c) Set this option to force the configuration for building dotnet server projects. [default: Default]
--webserver (-ws) Set this option to override the default web server (HttpSys or Kestrel). [default: HttpSys]
--urls (-u) Set this option to override the default URL (URLs must be separated by a semicolon).
--launch-browser (-lb) Set this option to launch the browser (only applicable if the client is started by the command)
--backend-only (-bo) Set this option to start only the backend server. [default: False]
--reporting (-r) Set this option to start or not the reporting server. [default: True]
--studio (-s) Set this option to start or not Neos Studio. [default: True]
--delay-before-webapi (-dw) Set this option to add a delay before the http request is transmitted from the web API to the backend server.
--multitenant (-mt) Set this option to start in multitenant mode. [default: False]
--license-management (-l) Set this option to start the License Management cluster. [default: False]
--allow-data-loss (-dl) Set this option to drop/delete obsolete database objects. [default: False]
--force-migration (-fm) Set this option to force migration even if schema version has no changed. [default: False]
--automatic-migration (-am) Set this option to migrate database at backend startup in mono-tenant mode. [default: True]
--force-start (-fs) Set this option to force the backend to start event if database migration failed. [default: False]
--dapr (-dp) Set this option to start in Dapr mode. [default: True]
--omnisharp (-o) Set this option to use OmniSharp to provide IntelliSense to Neos Studio. [default: False]

neos build <(all)|client|server>

This command builds the client application and the server for production (Release environment).

As a first argument, you have to specify what you want to generate:

  • all : The client and the server (default value)
  • client : Only the client
  • server : Only the server

neos sync

This command synchronizes the C# projects with the cluster metadata.

neos sync uitests

This command synchronizes the UI tests of the C# automation projects with the UI scenarios.

When no option is provided, all the UI tests are synchronized. Otherwise, only the UI tests of the specified feature or the specified module are synchronized.

Options are available:

Option Description
--feature (-f) The feature to which the UI scenario belongs.
--module (-m) The module to which the feature belongs.

neos restore

This command restores referenced modules from a NuGet source.

For more information, see this article.

neos pack

This command creates a NuGet package from a module.

For more information, see this article.

Options are available:

Option Description
--output (-o) Full name of package file or directory in which package is to be generated.