Index: trunk/docs/examples/_config.inc.php
===================================================================
--- trunk/docs/examples/_config.inc.php	(revision 334)
+++ trunk/docs/examples/_config.inc.php	(revision 339)
@@ -22,5 +22,5 @@
 define('SITE_BASE', dirname(__FILE__));
 
-// Set include path for all templates.
+// Set include path for all templates and libraries.
 ini_set('include_path', join(PATH_SEPARATOR, array(
     COMMON_BASE,
Index: trunk/docs/examples/example.cli.php
===================================================================
--- trunk/docs/examples/example.cli.php	(revision 339)
+++ trunk/docs/examples/example.cli.php	(revision 339)
@@ -0,0 +1,127 @@
+#!/usr/bin/php
+<?php
+/*
+* example.cli.php - An example of a command-line interface script using the Strangecode Codebase.
+* 
+* Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information.
+* @author   Quinn Comendant <quinn@strangecode.com>
+* @version  1.0
+* @since    28 Oct 2008 16:44:24
+*/
+
+
+/********************************************************************
+* STARTUP
+********************************************************************/
+
+$this_script = basename($_SERVER['argv'][0]);
+
+// First things first. Define the globally used directory paths.
+// The parent directory of all application DocRoots, such as /home/user/www.example.com/
+define('COMMON_BASE', realpath('../..'));
+
+// Set include path for all templates and libraries.
+ini_set('include_path', get_include_path()
+    . PATH_SEPARATOR . COMMON_BASE
+);
+
+
+/********************************************************************
+* CONFIG
+********************************************************************/
+
+// Include core libraries.
+require_once 'codebase/lib/App.inc.php';
+require_once 'codebase/lib/Utilities.inc.php';
+
+// Primary application class.
+$app =& App::getInstance('cli');
+$app->setParam(array(
+    'site_name' => 'CLI Script',
+    'site_email' => 'codebase@strangecode.com',
+    'enable_session' => false,
+    'enable_db' => true,
+    'db_always_debug' => false,
+    'db_debug' => true,
+    'db_die_on_failure' => true,
+    'display_errors' => true,
+    'error_reporting' => E_ALL,
+    'log_file_priority' => LOG_INFO,
+    'log_screen_priority' => LOG_DEBUG,
+    'log_directory' => COMMON_BASE . '/log',
+    'log_filename' => 'cli_log',
+));
+
+// DB credentials for command line scripts stored in a file with read rights
+// given only to the user who will be executing the scripts: -rw-------
+// This file includes $app-> method calls so this must be included after App::getInstance().
+require_once 'global/db_auth.inc.php';
+
+// Start application-based functionality: database, session, environment, ini setup, etc.
+// Most configuration parameters must be set before starting the App.
+$app->start();
+
+// Global DB object. Automatically pre-configured by $app->start().
+$db =& DB::getInstance();
+
+
+/********************************************************************
+* MAIN
+********************************************************************/
+
+$options = getopt("habc");
+
+// Give them a fighting chance. Show the help message. ;P
+if (!$options) {
+    printf("%s: Syntax or usage error. Try '-h' if you are lost.\n", $this_script);
+    die(1);    
+}
+
+if (isset($options['h'])) {
+    help();
+    die(1);
+}
+
+if (isset($options['a'])) {
+    // Run code associated with option -a
+    echo "Option a\n";
+}
+
+if (isset($options['b'])) {
+    // Run code associated with option -b
+    echo "Option b\n";
+}
+
+if (isset($options['c'])) {
+    // Run code associated with option -c
+    echo "Option c\n";
+}
+
+
+/********************************************************************
+* FUNCTIONS
+********************************************************************/
+
+function help()
+{
+    global $this_script;
+
+    ?>
+Description of this script goes here...
+
+Usage: <?php echo $this_script; ?> [OPTIONS]
+
+OPTIONS:
+    
+    -a  Blah blah blah
+    -b  Blah blah blah
+    -c  Blah blah blah
+
+Strangecode :: www.strangecode.com
+<?php
+}
+
+
+
+
+?>
