Index: src/main/groovy/org/gradle/StartParameter.java
===================================================================
--- src/main/groovy/org/gradle/StartParameter.java	(revision 1716)
+++ src/main/groovy/org/gradle/StartParameter.java	(working copy)
@@ -75,6 +75,7 @@
     private boolean showVersion = false;
     private boolean dryRun = false;
     private boolean noOpt = false;
+    private boolean shell = false;
 
     /**
      * Creates a {@code StartParameter} with default values. This is roughly equivalent to running Gradle on the
@@ -392,6 +393,14 @@
     public void setNoOpt(boolean noOpt) {
         this.noOpt = noOpt;
     }
+    
+    public boolean isShell() {
+        return shell;
+    }
+
+    public void setShell(boolean shell) {
+        this.shell = shell;
+    }
 
     /**
      * Sets the settings file to use for the build. Use null to use the default settings file.
Index: src/main/groovy/org/gradle/DefaultCommandLine2StartParameterConverter.java
===================================================================
--- src/main/groovy/org/gradle/DefaultCommandLine2StartParameterConverter.java	(revision 1716)
+++ src/main/groovy/org/gradle/DefaultCommandLine2StartParameterConverter.java	(working copy)
@@ -55,6 +55,7 @@
     private static final String QUIET = "q";
     public static final String FULL_STACKTRACE = "f";
     public static final String STACKTRACE = "s";
+    public static final String SHELL = "S";
     private static final String SYSTEM_PROP = "D";
     private static final String PROJECT_PROP = "P";
     private static final String NO_DEFAULT_IMPORTS = "I";
@@ -95,7 +96,8 @@
             acceptsAll(WrapUtil.toList(PROJECT_DEPENDENCY_TASK_NAMES, "dep-tasks"), "Specify additional tasks for building project dependencies.").withRequiredArg().ofType(String.class);
             acceptsAll(WrapUtil.toList(NO_PROJECT_DEPENDENCY_REBUILD, "no-rebuild"), "Do not rebuild project dependencies.");
             acceptsAll(WrapUtil.toList(NO_OPT, "no-opt"), "Ignore any task optimization.");
-            acceptsAll(WrapUtil.toList(HELP, "?", "help"), "Shows this help message");
+            acceptsAll(WrapUtil.toList(HELP, "?", "help"), "Shows  this help message");
+            acceptsAll(WrapUtil.toList(SHELL, "shell"), "Runs the gradle shell.");
         }
     };
 
@@ -108,7 +110,7 @@
         } catch (OptionException e) {
             throw new CommandLineArgumentException(e.getMessage());
         }
-
+        
         if (options.has(HELP)) {
             startParameter.setShowHelp(true);
             return startParameter;
@@ -230,6 +232,10 @@
         if (options.has(NO_OPT)) {
             startParameter.setNoOpt(true);
         }
+        
+        if (options.has(SHELL)) {
+            startParameter.setShell(true);
+        }
 
         startParameter.setLogLevel(getLogLevel(options));
         return startParameter;
Index: src/main/groovy/org/gradle/Main.java
===================================================================
--- src/main/groovy/org/gradle/Main.java	(revision 1716)
+++ src/main/groovy/org/gradle/Main.java	(working copy)
@@ -15,6 +15,13 @@
  */
 package org.gradle;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Vector;
 import org.gradle.util.GradleVersion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -33,6 +40,8 @@
     private final String[] args;
     private BuildCompleter buildCompleter = new ProcessExitBuildCompleter();
     private CommandLine2StartParameterConverter parameterConverter = new DefaultCommandLine2StartParameterConverter();
+    
+    private static boolean shellRunning;
 
     public Main(String[] args) {
         this.args = args;
@@ -60,6 +69,12 @@
             parameterConverter.showHelp(System.err);
             buildCompleter.exit(e);
         }
+        
+        if (startParameter.isShell() && !shellRunning) {
+            shellRunning = true;
+            startShell(args);
+            buildCompleter.exit(null);
+        }
 
         if (startParameter.isShowHelp()) {
             parameterConverter.showHelp(System.out);
@@ -91,6 +106,26 @@
         buildCompleter.exit(null);
     }
 
+    private void startShell(String[] shellArgs) throws Exception {
+        String in = "";
+        List<String> args = new Vector<String>(); 
+        BufferedReader stdin = new BufferedReader(new InputStreamReader( System.in ) );
+        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
+        while(! in.equals("exit")) {
+            out.write("gradle> ");
+            out.flush();
+            in = stdin.readLine();
+            args.clear();
+            args.addAll(Arrays.asList(shellArgs));
+            args.addAll(Arrays.asList(in.split("\\s")));
+            Main m = new Main(args.toArray(new String[0]));
+            m.setBuildCompleter(new ProcessNoExitBuildCompleter());
+            m.execute();
+        }
+        stdin.close();
+        out.close();
+    }
+
     public interface BuildCompleter {
         void exit(Throwable failure);
     }
@@ -100,4 +135,10 @@
             System.exit(failure == null ? 0 : 1);
         }
     }
+    
+    private static class ProcessNoExitBuildCompleter implements BuildCompleter {
+        public void exit(Throwable failure) {
+            // Do nothing
+        }
+    }
 }
