Spectre project Options
The Spectre command line project sub-command lists, creates, installs, and uninstalls projects as well as changes a project's root. It has the following syntax:
spectre project <subcommand> [options]
These sub-commands are detailed in the first table, and the common options are detailed in the second table.
For example:
spectre project list
Enter spectre project -h to display the syntax and available sub-commands as described in the following table.
Spectre project Sub-commands
Sub-command | Description |
---|---|
list | List the projects on the dataroot. The command has the following syntax: spectre project list For example: spectre project list |
create | Create a new, empty project. The command has the following syntax: spectre project create <name> <project root> [options] For example: spectre project create newsales c:\di\projects\newsales |
install |
Install a project to the root. The command has the following syntax: spectre project install <name> <project root> [options] For example: spectre project install aprilsales c:\di\projects\aprilsales |
uninstall |
Remove a project from the project root. Removing a project does not delete the contents. The command has the following syntax: spectre project uninstall <name> [options] For example: spectre project uninstall Jansales |
setprojectroot |
Change the root directory of a project. The command has the following syntax: spectre project setprojectroot <name> <project root> [option] For example: spectre project setprojectroot newsales c:\di\projects\newsales This command helps you move projects from one location to another. First, relocate the project on disk. Then, use setprojectroot to tell the DiveLine server the new location of the project. Be sure to stop the DiveLine server before issuing the command. This is an advanced sub-command. To see the advanced sub-commands, enter: spectre project help-advanced NOTE: setprojectroot is currently the only advanced sub-command. |
Enter spectre project <subcommand> -h for the syntax and available options for each sub-command as described in the following table.
Spectre project Sub-command Options
Options | Description |
---|---|
--dataroot arg |
Set the path to the DiveLine server dataroot. For example: spectre project list --dataroot c:\di\solution\dl-dataroot Instead of using this option, you can set the DI_HOME environment variable. See Setting Environment Variables. |
-u [ --username ] arg |
Run as the given user. For example: spectre project list --username jsmith When the command runs with this option, only the projects that user jsmith has access to are listed. |
-q [ --quiet ] |
Print only warnings and errors to the console. For example: spectre project uninstall newsales --quiet When the command runs with this option, no timestamps or individual processes display; only warnings and errors are output to the console. If successful, only the command prompt displays. |
The following commands assume that the system PATH variable includes the location of the Spectre executable file.
spectre project list --dataroot d:\di\solution\dl-dataroot
The result is a list of projects and their root locations.
If you move a project on disk, you can reset the project root. For example:
spectre project setprojectroot MyProject
C:\di\archive\projects\MyProject
--dataroot C:\di\solution\dl-dataroot
MyProject was moved from C:\di\projects to C:\di\archive\projects and the DiveLine server was restarted. This command sets the project root to the new location on disk.