Configures a project to be managed by *resort*.
	
	:param str work_dir:
	   Path of directory were profiles will be created.
	:param dict profiles:
	   Dictionary containing profile type and instance entries.

def setup(
	work_dir=".resort",
	profiles=None
):

	"""
	Configures a project to be managed by *resort*.
	
	:param str work_dir:
	   Path of directory were profiles will be created.
	:param dict profiles:
	   Dictionary containing profile type and instance entries.
	"""
	
	# Initialize colorama
	colorama.init()
	
	# Program name
	prog_name = sys.argv[0]
	
	# Profile manager
	prof_mgr = engine.ProfileManager(os.getcwd(), work_dir, profiles)
	
	# Retrieve arguments
	parser = argparse.ArgumentParser(
		prog=prog_name
	)
	parser.add_argument(
		"profile",
		metavar="profile",
		type=str,
		nargs=1,
		help="Profile name"
	)
	parser.add_argument(
		"command",
		metavar="command",
		type=argparse_command,
		nargs=1,
		help="Command name"
	)
	parser.add_argument(
		"arguments",
		metavar="args",
		nargs=argparse.REMAINDER,
		help="Command arguments"
	)
	args = parser.parse_args(sys.argv[1:])
	
	# Execute command
	cmd_name, cmd_fn = args.command[0]
	cmd_prog_name = "{} profile {}".format(prog_name, cmd_name)
	prof_name = args.profile[0]
	prog_args = args.arguments
	cmd_fn(cmd_prog_name, prof_mgr, prof_name, prog_args)