diff --git a/.depend b/.depend
index e4f3d0922161254f76592ff6ac6c5e516e5f99e9..8fa00869982c3d67ef16cba7e1c16b4f1ae18a64 100644
--- a/.depend
+++ b/.depend
@@ -3,3 +3,5 @@ goaljobs.cmo : goaljobs_config.cmo goaljobs.cmi
 goaljobs.cmx : goaljobs_config.cmx goaljobs.cmi
 goaljobs_config.cmo :
 goaljobs_config.cmx :
+goaljobs_memory.cmo : goaljobs.cmi
+goaljobs_memory.cmx : goaljobs.cmx
diff --git a/.gitignore b/.gitignore
index a38579840234fee095c8d3388194d81dad17c6c8..177201c793dfcc7821d219064b8b1ccfd9a8f01b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ Makefile
 /goaljobs_config.ml
 /goaljobs.spec
 /goaljobs-*.tar.gz
+/goaljobs-memory
 /install-sh
 /libtool
 /ltmain.sh
diff --git a/Makefile.am b/Makefile.am
index 54c3a6fbc2851227da842958544c8c1d4a1499b1..7ed61d1838901eafdff5656ed8aa048da5e206b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,7 @@ EXTRA_DIST = \
 	goaljobs_config.ml.in \
 	goaljobs.ml \
 	goaljobs.mli \
+	goaljobs_memory.ml \
 	goaljobs.pod \
 	goaljobs-reference.pod \
 	goaljobs.spec \
@@ -40,9 +41,10 @@ SUBDIRS = . examples tests
 sources = \
 	goaljobs_config.ml \
 	goaljobs.ml \
-	goaljobs.mli
+	goaljobs.mli \
+	goaljobs_memory.ml
 
-bin_SCRIPTS = goaljobs
+bin_SCRIPTS = goaljobs goaljobs-memory
 
 # These targets are noinst because we use a custom install hook to
 # install them, and are _SCRIPTS because automake doesn't know how to
@@ -61,6 +63,11 @@ pa_goal.cmo: pa_goal.ml
 	$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -package camlp4.lib -linkpkg \
 	    -pp $(CAMLP4OF) -c $< -o $@
 
+# Standalone program for examining the goaljobs memory.
+goaljobs-memory: goaljobs_config.cmx goaljobs.cmx goaljobs_memory.cmx
+	$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) \
+	  $^ -linkpkg -o $@
+
 # Install.
 install-data-hook:
 	mkdir -p $(DESTDIR)$(OCAMLLIB)
diff --git a/goaljobs.ml b/goaljobs.ml
index 4024b6da999770be1dc4c56fcc60853c95e2f541..208882cc6eed4f5badd779be6c92dc78e9da575e 100644
--- a/goaljobs.ml
+++ b/goaljobs.ml
@@ -420,6 +420,14 @@ let memory_delete key =
       Pervasives.flush chan;
   )
 
+let memory_list () =
+  with_memory_locked (
+    fun fd ->
+      let chan = in_channel_of_descr fd in
+      let memory : (string, string) Hashtbl.t = input_value chan in
+      Hashtbl.fold (fun key value xs -> (key, value) :: xs) memory []
+  )
+
 let published_goals = ref []
 let publish name fn = published_goals := (name, fn) :: !published_goals
 let get_goal name =
diff --git a/goaljobs.mli b/goaljobs.mli
index 43432f162a45c319a474574adc2256bcf02ce36e..7374f546e021637d8ce8b0302f8da2dcd3825cd9 100644
--- a/goaljobs.mli
+++ b/goaljobs.mli
@@ -265,6 +265,9 @@ val memory_get : string -> string option
 val memory_delete : string -> unit
   (** Delete the [key].  If the key doesn't exist, has no effect. *)
 
+val memory_list : unit -> (string * string) list
+  (** Return all [(key, value)] pairs in the memory. *)
+
 (** {2 Publishing goals} *)
 
 val publish : string -> (string list -> unit) -> unit
diff --git a/goaljobs_memory.ml b/goaljobs_memory.ml
new file mode 100644
index 0000000000000000000000000000000000000000..a2cf618d5083c3e88a21c4f2d9587a0a942ec6b1
--- /dev/null
+++ b/goaljobs_memory.ml
@@ -0,0 +1,58 @@
+(* goaljobs
+ * Copyright (C) 2013-2014 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+open Unix
+open Printf
+
+open Goaljobs
+
+(* Stand-alone tool to read and modify the user's goaljobs memory. *)
+
+let usage ret =
+    printf "  %s list\n" Sys.executable_name;
+    printf "  %s [exists|get|delete] key\n" Sys.executable_name;
+    printf "  %s set key value\n" Sys.executable_name;
+    printf "Subcommands:\n";
+    printf "  exists    - Check if key exists, exit code 0 if exists, 1 if not\n";
+    printf "  get       - Print the current value of the key\n";
+    printf "  set       - Set the key to a new value\n";
+    printf "  delete    - Delete the key\n";
+    printf "  list      - List the names and values of all keys\n";
+    exit ret
+
+let () =
+  match Array.to_list Sys.argv with
+  | [] -> usage 1
+  | [ ("--help" | "-h" | "-?") ] -> usage 0
+  | [ _; "exists"; key ] ->
+    if memory_exists key then exit 0 else exit 1
+  | [ _; "get"; key ] ->
+    (match memory_get key with
+    | None ->
+      eprintf "%s: key '%s' not found in memory\n" Sys.executable_name key;
+      exit 1
+    | Some v -> print_endline v
+    )
+  | [ _; "set"; key; value ] ->
+    memory_set key value
+  | [ _; "delete"; key ] ->
+    memory_delete key
+  | [ _; "list" ] ->
+    let mem = memory_list () in
+    List.iter (fun (key, value) -> printf "%s\t%s\n" key value) mem
+  | _ -> usage 1