# Inspecting data from the shell!

**URL:** <https://forum.rasa.com/t/inspecting-data-from-the-shell/20607>\
**Category:** Rasa Open Source\
**Created:** [October 30, 2019, 12:40am UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607 "2019-10-30T00:40:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sten](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@sten](https://forum.rasa.com/u/sten)\
**Post date:** [October 30, 2019, 12:40am UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/1 "2019-10-30T00:40:54Z")

</div>

Would it be very hard to inspect original data from the shell. Let me give example :

```
> /show intent greet
 hi
 hello
 howdy
 ....

#pipe is grep
> /show i greet | he
hello

#! greps the story name i.e. matches "happy path"
>/show story !happy 
* greet
  - utter_greet
.....

#show story ..
>/s s sad
...

#show 
>/s utter !bye
Bye

#and now for the most important ...resolving some stuff
>?show story !happy
* hello
  - Hey! how are you?
* fine
  - Great, carry on !

```

you get the gist …

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 31, 2019, 8:05am UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/2 "2019-10-31T08:05:15Z")

</div>

Interesting idea! What exactly would be the use case for that? Can’t you always take a look at the data itself?

---

<div class="post-metadata">

**Author:** ![sten](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@sten](https://forum.rasa.com/u/sten)\
**Post date:** [October 31, 2019, 6:27pm UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/3 "2019-10-31T18:27:55Z")

</div>

you don’t leave the shell. when the files become big it is harder to find what you are looking for. you dont need to think which file to look for.

I may be willing to write a class that does the grepping … if it is easier to integrate it in thee shell

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [November 1, 2019, 8:27am UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/4 "2019-11-01T08:27:11Z")

</div>

@tyd@Tobias_Wochinger What do you think?

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [November 1, 2019, 12:06pm UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/5 "2019-11-01T12:06:40Z")

</div>

> you don’t leave the shell. when the files become big

would you also want to edit in the shell right away or just view it?

---

<div class="post-metadata">

**Author:** ![sten](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@sten](https://forum.rasa.com/u/sten)\
**Post date:** [November 1, 2019, 2:32pm UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/6 "2019-11-01T14:32:49Z")

</div>

just view it … it will need retraining anyway if you change it ! will there be benefit of editing ?

should I create a standalone sample class that provides an example API … i.e. you can just integrate it into the shell !!! just wondering

---

<div class="post-metadata">

**Author:** ![sten](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@sten](https://forum.rasa.com/u/sten)\
**Post date:** [November 1, 2019, 5:18pm UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/7 "2019-11-01T17:18:27Z")

</div>

here is quick example : (I’m slurping the files into arrays)

[shell\_cmds.py](https://forum.rasa.com/uploads/short-url/y1L5sJJnj8GxUas55nD8bdDSlAt.py) (2.3 KB)

```
In [72]: from shell_cmds import *

In [73]: c = ShellCmds('nlu.md','stories.md','../domain.yml')

In [74]: print c.find_utter('example')
(63, ' utter_example:\n')

In [75]: print c.show_utter('example')
  utter_example:
  - text: "example : {etype}"

In [80]: print c.show_story('code example')
## code example
* example
 - action_example
* explain
 - utter_explain
* gotit
 - utter_gotit

In [78]: print c.show_story('code example', resolve=True)
## code example
* example
 - action_example
* explain
 - "explain : {etype}" 
* gotit
 - "gotit : {etype}"

In [79]: print c.show_intent('example')
## intent: example
- [assign](etype) example
- [sum](etype) example
- [multiplication](etype) example
- [conditional](etype)
- [loop](etype) example
- [eqvseq2](etype) example
- show me [assignment](etype:assign) example
- can you tell me [loop](etype) example
- do you have [sum](etype) code example
- i'm looking for code example of [assignment](etype:assign)

In [81]: c.grep('domain', 'howdy')
Out[81]: [[34, ' - text: howdy !\n']]

In [83]: print c.show_intent('greet')
## intent:greet
- hey
- hello
- hi
- good morning
- good evening
- hey there
- howdy

In [84]: print c.show_intent('greet', 'h')
- hey
- hello
- hi
- hey there
- howdy

```

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [November 12, 2019, 7:40am UTC](https://forum.rasa.com/t/inspecting-data-from-the-shell/20607/8 "2019-11-12T07:40:35Z")

</div>

Looks great! Can you please create a feature request on GitHub ([https://github.com/RasaHQ/rasa/issues/new/choose](https://github.com/RasaHQ/rasa/issues/new/choose))? Thanks. Please link this thread. Feel also free to work on the feature itself and create a PR.
