docs: function( profile ) {
  
  	// Extract profile additions
  	var profile_additions = [];
  	if (profile && profile.getopt)
  		profile_additions = profile.getopt();
  
  	// Validate command-line
  	var opt = getopt.create([
  	  ['p' , 'profile=NAME'  	   , 'Specify the profile to use for the compiler'],
  	  ['o' , 'out=BUNDLE'	  	   , 'Specify the name of the bundle'],
  	  ['O' , 'optimise=LEVEL+'     , 'Specify optimisation level'],
  	  ['b' , 'basedir=DIR'  	   , 'Specify bundle base directory'],
  	].concat( profile_additions ).concat([
  	  [''  , 'log=FLAGS' 	 	   , 'Enable logging (see flags below)'],
  	  ['s' , 'sparse'              , 'Create a sparse bundle rather than a solid one'],
  	  ['h' , 'help'                , 'Display this help'],
  	  ['v' , 'version'             , 'Show version'],
  	]))
  	.setHelp(
  	  "Usage: jbb -p <profile> -o <file> [OPTION] <source>\n" +
  	  "Compile one or more bundles to a binary format.\n" +
  	  "\n" +
  	  "[[OPTIONS]]\n" +
  	  "\n" +
  	  "Logging Flags:\n" +
  	  "\n" +
  	  "  p                        Log primitive opcodes\n" +
  	  "  a                        Log array opcodes\n" +
  	  "  c                        Log array chunk opcodes\n" +
  	  "  b                        Log array bulk operations opcodes\n" +
  	  "  s                        Log string opcodes\n" +
  	  "  r                        Log internal cross-reference\n" +
  	  "  R                        Log external cross-reference\n" +
  	  "  o                        Log object opcodes\n" +
  	  "  e                        Log file embedding opcodes\n" +
  	  "  o                        Log object opcodes\n" +
  	  "  O                        Log plain object opcodes\n" +
  	  "  d                        Log protocol debug operations\n" +
  	  "  w                        Log low-level byte writes\n" +
  	  "  -                        Log everything\n" +
  	  "\n" +
  	  "Installation: npm install three-bundles\n" +
  	  "Respository:  https://github.com/wavesoft/three-bundles"
  	)
  	.bindHelp()     // bind option 'help' to default action
  	.parseSystem(); // parse command line
  
  	// Return options
  	return opt;
  
  }