diff --git a/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCommand.java b/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCommand.java
new file mode 100644
index 0000000..f67a833
--- /dev/null
+++ b/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCommand.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2022-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.workflow.cli;
+
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.workflow.api.WorkflowLogStore;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Displays workflow logs of each context.
+ */
+@Service
+@Command(scope = "onos", name = "workflow-logs", description = "Workflow Logs CLI")
+public class WorkflowLogStoreCommand extends AbstractShellCommand {
+
+    protected static final String SHOW = "show";
+
+     // Executes this command.
+    @Argument(name = "command", description = "command (" + SHOW + ")", required = true)
+    @Completion(WorkflowLogStoreCompleter.class)
+    private String command;
+
+    @Argument(index = 1, name = "arg1")
+    @Completion(WorkflowLogStoreCtxtNameCompleter.class)
+    private String arg1;
+
+    @Override
+    protected void doExecute() {
+        switch (command) {
+            case SHOW:
+                showLogs();
+                break;
+            default:
+                error("Wrong command - " + command);
+                break;
+        }
+    }
+
+    private void showLogs() {
+        WorkflowLogStore workflowLogStore = get(WorkflowLogStore.class);
+        Map<String, List<String>> logMap = workflowLogStore.asJavaMap();
+
+        if (arg1 == null) {
+            logMap.forEach(this::printLogs);
+            return;
+        }
+
+        if (!logMap.containsKey(arg1)) {
+            error("There are no logs for key:" + arg1);
+            return;
+        }
+        printLogs(arg1, logMap.get(arg1));
+    }
+
+    private void printLogs(String contextName, List<String> logs) {
+        String msg = "Context Name: " + contextName + "\n"
+                + "Log:\n" + String.join("\n", logs) + "\n";
+        print(msg);
+    }
+}
diff --git a/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCompleter.java b/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCompleter.java
new file mode 100644
index 0000000..cdcdf2b
--- /dev/null
+++ b/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCompleter.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2022-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.workflow.cli;
+
+import com.google.common.collect.ImmutableList;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.onosproject.cli.AbstractChoicesCompleter;
+
+import java.util.List;
+
+import static org.onosproject.workflow.cli.WorkflowLogStoreCommand.SHOW;
+
+/**
+ * Workflow Log Store command completer.
+ */
+@Service
+public class WorkflowLogStoreCompleter extends AbstractChoicesCompleter {
+    @Override
+    protected List<String> choices() {
+        return ImmutableList.of(SHOW);
+    }
+}
diff --git a/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCtxtNameCompleter.java b/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCtxtNameCompleter.java
new file mode 100644
index 0000000..e9c66a8
--- /dev/null
+++ b/apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkflowLogStoreCtxtNameCompleter.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2022-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.workflow.cli;
+
+import com.google.common.collect.Lists;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.onosproject.cli.AbstractChoicesCompleter;
+import org.onosproject.workflow.api.WorkflowLogStore;
+
+import java.util.List;
+
+import static org.onlab.osgi.DefaultServiceDirectory.getService;
+
+/**
+ * Workflow Log Store - context name completer.
+ */
+@Service
+public class WorkflowLogStoreCtxtNameCompleter extends AbstractChoicesCompleter {
+    @Override
+    protected List<String> choices() {
+        WorkflowLogStore workflowLogStore = getService(WorkflowLogStore.class);
+        return Lists.newArrayList(workflowLogStore.asJavaMap().keySet());
+    }
+}
