Working With fubu.exe

fubu.exe is FubuMVC’s command-line tool for working with FubuMVC applications and deployments. This document outlines all it can do.

Usage

fubu.exe <command> [options]

command should be one of the commands listed in this document.

options should be zero or more of the options available for the given command.

Getting runtime help

help

Run fubu.exe help to display a list of all available commands.

Run fubu.exe <command> help to display a description of the given command and a list of its available options.

Available Commands

add-directive

Adds a directive to an existing /deployment/recipe/host

Usages for add-directive

add-directive <recipe> <host> <directive> [-deployment <deployment>] [-open]

Arguments

recipe - The recipe to add the directive to.

host - The host in the recipe to add the directive to.

directive - The directive to add.

Flags

-deployment <deployment> - The deployment directory

-open - Open the directive file when done.

add-profile

Adds a deployment profile

add-profile <name> [-recipes <recipes1 recipes2 recipes3 ...>] [-deployment <deployment>]

Arguments

name - The name of the profile

recipes - List of recipes to include

Flags

-deployment <deployment> - Where the ~/deployment folder is

add-recipe

Adds a recipe to a deployment

add-recipe <name> [-deployment <deployment>]

Arguments

name - The name of the recipe

Flags

-deployment <deployment> - Where the ~/deployment folder is

alias

Manage folder aliases

Usages

List all the aliases for this solution folder

alias

Removes an alias

alias <name> [-remove]

Creates a new alias for a folder

alias <name> <folder>

Arguments

name - The name of the alias

folder - The path to the actual folder

Flags

-remove - Removes the alias

appendvdir

Appends to virtual directories in IIS

appendvdir <virtualdirectoryfolder> <folder> <virtualdirectory>

Arguments

virtualdirectoryfolder - The subfolder pathing underneath the virtual directory, i.e., ‘/content/images’

folder - Physical file path

virtualdirectory - The name of the virtual directory in IIS

assemblies

Adds assemblies to a given manifest

Remove or adds all assemblies to the manifest file

assemblies add|remove|list <directory> [-file <filename>] [-open] [-target debug|release]

Removes or adds a single assembly name to the manifest file

assemblies add|remove|list <directory> <assemblyname> [-file <filename>] [-open] [-target debug|release]

Arguments

mode - Add, remove, or list the assemblies for this manifest

directory - The package or application directory

assemblyname - Add or removes the named assembly

Flags

-file <filename> - Overrides the name of the manifest file if it’s not the default .package-manifest or .fubu-manifest

-open - Opens the manifest file in your editor

-target debug|release - Choose the compilation target for any assemblies. Default is debug

assembly-pak

Bundle up the content and data files for a self contained assembly package

assembly-pak <rootfolder> [-projfile <projfile>]

Arguments

rootfolder - The root folder for the project if different from the project file’s folder

Flags

-projfile <projfile> - Name of the csproj file. If set, this command attempts to add the zip files as embedded resources

bundle

Bundles up designated deployment options to a folder

Bundle with only the environment settings in the deployment folder

bundle <destination> [-create-bottles] [-profile <profile>] [-deployment <deployment>] [-recipe <recipe>] [-report <report>]

Bundle with imported folders

bundle <destination> [-importedfolders <importedfolders1 importedfolders2 importedfolders3 ...>] [-create-bottles] [-profile <profile>] [-deployment <deployment>] [-recipe <recipe>] [-report <report>]

Arguments

destination - The directory name where the deployment artifacts are going to be written

importedfolders - Import any other ~/deployment folders for this deployment

Flags

-create-bottles - CreateBottlesFlag

-profile <profile> - The profile to execute. ‘default’ is the default.

-deployment <deployment> - Path to where the deployment folder is ~/deployment

-recipe <recipe> - Tacks on ONE additional recipie. Great for including tests.

-report <report> - File where the installation report should be written. Default is installation_report.htm

copy

Copies all of the deployment structure to another folder with all the necessary bottle support

copy <destination> [-create-bottles] [-deployment <deployment>]

Arguments

destination - The directory name where the deployment artifacts are going to be written

Flags

-create-bottles - CreateBottlesFlag

-deployment <deployment> - Path to where the deployment folder is ~/deployment

create-all

Creates all the packages for the directories / manifests listed in the bottles.manifest file and puts the new packages into the deployment/bottles directory

create-all [-directory <directory>] [-deployment <deployment>] [-pdb] [-target debug|release] [-clean]

Flags

-directory <directory> - Overrides the top level directory to begin searching for package manifests

-deployment <deployment> - Overrides the deployment directory ~/deployment

-pdb - Includes any matching .pdb files for the package assemblies

-target debug|release - Overrides the compilation target. The default is debug

-clean - Directs the command to remove all bottle files before creating new files. Can be destructive

create-deployment

Creates or seeds a new website deployment

create-deployment <applicationbottlename> [-recipe <recipe>] [-host <host>] [-virtualdir <virtualdir>] [-deployment <deployment>] [-open]

Arguments

applicationbottlename - Declares the main application bottle

Flags

recipe <recipe> - Recipe name for the FubuWebsite. Default is ‘baseline’

-host <host> - Host name of the FubuWebsite directive. Default is ‘web’

-virtualdir <virtualdir> - Override the virtual directory name

-deployment <deployment> - Overrides the location of the ~/deployment directory

-open - Open the directive file when done.

create-pak

Create a package file from a package directory

create-pak <packagefolder> <zipfile> [-pdb] [-f] [-target debug|release] [-file <manifestfilename>]

Arguments

packagefolder - The root physical folder (or valid alias) of the package

zipfile - The filepath where the zip file for the package will be written ie. ./blue/my-pak.zip

Flags

-pdb - Includes any matching .pdb files for the package assemblies

-f - Forces the command to delete any existing zip file first

-target debug|release - Choose the compilation target for any assemblies

-file <manifestfilename> - Overrides the name of the manifest file

createvdir

Creates virtual directories in IIS

createvdir <folder> <virtualdirectory>

Arguments

folder - Physical file path

virtualdirectory - The name of the virtual directory in IIS

deploy

Deploys the given profile

Deploy with only the environment settings in the deployment folder

deploy [-override <override>] [-profile <profile>] [-deployment <deployment>] [-recipe <recipe>] [-report <report>]

Deploy with imported folders

deploy [-importedfolders <importedfolders1 importedfolders2 importedfolders3 ...>] [-override <override>] [-profile <profile>] [-deployment <deployment>] [-recipe <recipe>] [-report <report>]

Arguments

importedfolders - Import any other ~/deployment folders for this deployment

Flags

-override <override> - Override any profile settings in form arg1:value1;arg2:value2;arg3:value3

-profile <profile> - The profile to execute. ‘default’ is the default.

-deployment <deployment> - Path to where the deployment folder is ~/deployment

-recipe <recipe> - Tacks on ONE additional recipie. Great for including tests.

-report <report> - File where the installation report should be written. Default is installation_report.htm

help

lists all the available commands as well as providing help for individual commands.

List all the available commands

help

Show all the valid usages for a command

help <name>

Arguments

name - A command name

init

Seeds the /deployment folder structure underneath the root directory of a codebase

init [-deployment <deployment>] [-f]

Flags

-deployment <deployment> - Physical folder (or valid alias) of the application

-f - ForceFlag

init-pak

Initialize a package manifest

init-pak <path> <name> [-role <role>] [-alias <alias>] [-open] [-noweb] [-f]

Arguments

path - The physical path to the new package

name - The name of the new package

Flags

-role <role> - What role should this pak play - Options: module (default), binaries, config, application

-alias <alias> - Creates a folder alias for the package folder. Equivalent to fubu alias <folder> <alias>

-open - Opens the package manifest file in notepad

-noweb - There is no web content to include

-f - Force the command to overwrite any existing manifest file if using the -create flag

install

Runs installer actions and/or environment checks for an application

install <appfolder> [-mode install|all|check] [-logfile <logfile>] [-open] [-class <environmentclassname>] [-assembly <environmentassembly>] [-config-file <configfile>]

Arguments

appfolder - Root folder (or alias) of the fubu application

Flags

-mode install|all|check - Determines what actions are executed for each installer. ‘install’ is the default

-logfile <logfile> - Overrides the location of the log file produced, otherwise ‘installation.htm’ is the default

-open - When specified, opens the resulting log file in the default web browser

-class <environmentclassname> - The IEnvironment class to run during an install

-assembly <environmentassembly> - The assembly containing the IEnvironment class to run during an install

-config-file <configfile> - The name of the .Net AppDomain config file to use while running the installers

install-pak

Install a package zip file to the specified application

Install a package zip file to an application

install-pak <packagefile> <appfolder>

Remove a package zip file from an application

install-pak <packagefile> <appfolder> [-u]

Arguments

packagefile - The package zip file location to be installed. If un-installing, just use the zip file name

appfolder - The physical folder (or valid alias) of the main application

Flags

-u - Uninstalls the named package from an application folder

list

Lists all discovered manifests

List manifests

list [-point <point>] [-deployment <deployment>]

list something specific

list manifests|directives|recipes|profiles|bottles|hosts|all [-point <point>] [-deployment <deployment>]

Arguments

mode - What to list

Flags

-point <point> - Where to scan

-deployment <deployment> - The directory where the deployment settings are stored

new

Creates a new FubuMVC solution (see Using fubu new)

Arguments

projectname - This should be the name of the new FubuMVC project you are about to create.

Flags

-g - Git repository URL for a FubuMVC template.

-z - The path to a zip file containing a FubuMVC template.

Example usage using a Git repository:

fubu new -g https://github.com/myrepo/myfubumvctemplate mynewfubumvcproject

To learn how to create your own template in a git repository, see Creating your own template with git

Example usage using a Zip file:

fubu new -z /../template/myfubumvctemplate.zip mynewfubumvcproject

To learn how to create your own template in a zip file, see Creating your own template zip

packages

Display and modify the state of package zip files in an application folder

preview

Generates a preview of the deployment

packages <appfolder> [-cleanall] [-explode] [-removeall]

Arguments

appfolder - Physical root folder (or valid alias) of the application

Flags

-cleanall - Removes all ‘exploded’ package folders out of the application folder

-explode - ‘Explodes’ all the zip files underneath <appfolder>/bin/fubu-packages

-removeall - Removes all package zip files and exploded directories from the application folder

ref-bottle

Adds a bottles reference to the specified host

ref-bottle <recipe> <host> <bottle> [-deployment <deployment>]

Arguments

recipe - The recipe that the host is in

host - The host to add the reference to

bottle - The name of the bottle to link

Flags

-deployment <deployment> - Path to the deployment folder (~/deployment)

ref-recipe

Adds a bottles reference to the specified host

ref-recipe <profile> <recipe> [-deployment <deployment>]

Arguments

profile - The name of the profile

recipe - The name of the recipe to reference

Flags

-deployment <deployment> - Path to the deployment folder (~/deployment)

restart

Restarts a web application by ‘touching’ the web.config file

restart <appfolder>

Arguments

appfolder - Physical folder (or valid alias) of the web application

set-env-prop

Writes or overwrites a single directive property in the environment.settings file

set-env-prop <propertyvalue> [-deployment <deployment>]

Arguments

propertyvalue - Property=Value declaration of the property to write out

Flags

-deployment <deployment> - Overrides the location of the ~/deployment directory

set-host-prop

Writes or overwrites a single directive property in a Recipe/Host file

set-host-prop <recipe> <host> <propertyvalue> [-deployment <deployment>]

Arguments

recipe - Name of the recipe

host - Name of the host

propertyvalue - Property=Value declaration of the property to write out

Flags

-deployment <deployment> - Overrides the location of the ~/deployment directory

set-profile-prop

Writes or overwrites a single directive property in a profile file

set-profile-prop <profile> <propertyvalue> [-deployment <deployment>]

Arguments

profile - Name of the profile propertyvalue - Property=Value declaration of the property to write out

Flags

-deployment <deployment> - Overrides the location of the ~/deployment directory