diff --git a/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java
index 22bc137..eb5161b 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java
@@ -54,7 +54,8 @@
         TrafficTreatment treatment = DefaultTrafficTreatment.builder().build();
         List<Constraint> constraints = buildConstraints();
 
-        HostToHostIntent intent = new HostToHostIntent(appId(), oneId, twoId,
+        HostToHostIntent intent = new HostToHostIntent(appId(), key(),
+                                                       oneId, twoId,
                                                        selector, treatment,
                                                        constraints);
         service.submit(intent);
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddMultiPointToSinglePointIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddMultiPointToSinglePointIntentCommand.java
index 868fc7a..69feb35 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddMultiPointToSinglePointIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddMultiPointToSinglePointIntentCommand.java
@@ -72,7 +72,8 @@
         TrafficTreatment treatment = buildTrafficTreatment();
         List<Constraint> constraints = buildConstraints();
 
-        Intent intent = new MultiPointToSinglePointIntent(appId(), selector, treatment,
+        Intent intent = new MultiPointToSinglePointIntent(appId(), key(),
+                                                          selector, treatment,
                                                           ingressPoints, egress,
                                                           constraints);
         service.submit(intent);
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddOpticalIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddOpticalIntentCommand.java
index a70550e..c743575 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddOpticalIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddOpticalIntentCommand.java
@@ -56,7 +56,7 @@
         PortNumber egressPortNumber = portNumber(getPortNumber(egressDeviceString));
         ConnectPoint egress = new ConnectPoint(egressDeviceId, egressPortNumber);
 
-        Intent intent = new OpticalConnectivityIntent(appId(), ingress, egress);
+        Intent intent = new OpticalConnectivityIntent(appId(), key(), ingress, egress);
         service.submit(intent);
         print("Optical intent submitted:\n%s", intent.toString());
     }
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddPointToPointIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddPointToPointIntentCommand.java
index 2f50856..980acfe 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddPointToPointIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddPointToPointIntentCommand.java
@@ -15,9 +15,6 @@
  */
 package org.onosproject.cli.net;
 
-import static org.onosproject.net.DeviceId.deviceId;
-import static org.onosproject.net.PortNumber.portNumber;
-
 import java.util.List;
 
 import org.apache.karaf.shell.commands.Argument;
@@ -32,6 +29,9 @@
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.PointToPointIntent;
 
+import static org.onosproject.net.DeviceId.deviceId;
+import static org.onosproject.net.PortNumber.portNumber;
+
 /**
  * Installs point-to-point connectivity intents.
  */
@@ -67,8 +67,10 @@
 
         List<Constraint> constraints = buildConstraints();
 
-        Intent intent = new PointToPointIntent(appId(), selector, treatment,
-                                               ingress, egress, constraints);
+        Intent intent = new PointToPointIntent(appId(),
+                key(),
+                selector, treatment,
+                ingress, egress, constraints);
         service.submit(intent);
         print("Point to point intent submitted:\n%s", intent.toString());
     }
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java
index 8d962a6..74704d0 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddSinglePointToMultiPointIntentCommand.java
@@ -71,13 +71,15 @@
         TrafficTreatment treatment = DefaultTrafficTreatment.builder().build();
         List<Constraint> constraints = buildConstraints();
 
-        SinglePointToMultiPointIntent intent = new SinglePointToMultiPointIntent(
-                                                                                 appId(),
-                                                                                 selector,
-                                                                                 treatment,
-                                                                                 ingressPoint,
-                                                                                 egressPoints,
-                                                                                 constraints);
+        SinglePointToMultiPointIntent intent =
+                new SinglePointToMultiPointIntent(
+                        appId(),
+                        key(),
+                        selector,
+                        treatment,
+                        ingressPoint,
+                        egressPoints,
+                        constraints);
         service.submit(intent);
         print("Single point to multipoint intent submitted:\n%s", intent.toString());
     }
diff --git a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
index d0633e6..a8a28e2 100644
--- a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
@@ -28,6 +28,7 @@
 import org.onosproject.net.flow.TrafficSelector;
 import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.intent.Constraint;
+import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
 import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
@@ -81,6 +82,10 @@
             required = false, multiValued = false)
     private boolean lambda = false;
 
+    @Option(name = "-k", aliases = "--key", description = "Intent Key",
+            required = false, multiValued = false)
+    private String intentKey = null;
+
 
     // Treatments
     @Option(name = "--setEthSrc", description = "Rewrite Source MAC Address",
@@ -180,4 +185,19 @@
 
         return constraints;
     }
+
+    /**
+     * Creates a key for an intent based on command line arguments.  If a key
+     * has been specified, it is returned.  If no key is specified, null
+     * is returned.
+     *
+     * @return intent key if specified, null otherwise
+     */
+    protected Key key() {
+        Key key = null;
+        if (intentKey != null) {
+            key = Key.of(intentKey, appId());
+        }
+        return key;
+    }
 }
