# Directory structure for flows

**URL:** https://discourse.nodered.org/t/directory-structure-for-flows/73504
**Category:** Feature Requests
**Created:** [10 January 2023 23:26 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504 "2023-01-10T23:26:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ryanlynnhorlacher](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ryanlynnhorlacher/32/74139_2.png) [@ryanlynnhorlacher](https://discourse.nodered.org/u/ryanlynnhorlacher)
#### Post date: [10 January 2023 23:26 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504/1 "2023-01-10T23:26:06Z")

</div>

I'm beginning a project in which I expect to have many flows. I have not been able to find an option to organize flows in a directory-like structure for easier organization. Is there a reason this hasn't been attempted or is it already possible and I'm missing it?

If there is no option for this currently, I might be interested in submitting a PR if enough people think it's a good idea. I'd love some guidance from the core team on how they would like to see something like this implemented.

---

<div class="post-metadata">

### Author: ![yOyOeK1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yoyoek1/32/73011_2.png) [@yOyOeK1](https://discourse.nodered.org/u/yOyOeK1)
#### Post date: [11 January 2023 01:29 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504/2 "2023-01-11T01:29:50Z")

</div>

In my otdm-tools I have some helpers to manage flows as json's. It help you import export flow by flow and that way you can automate it?

> **[GitHub - yOyOeK1/oiyshTerminal: off-line iot collection](https://github.com/yOyOeK1/oiyshTerminal)**
>
> off-line iot collection . Contribute to yOyOeK1/oiyshTerminal development by creating an account on GitHub.

in repository you can find otdm-tools directory.  
python3, jq, request as depes.

---

<div class="post-metadata">

### Author: ![ryanlynnhorlacher](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ryanlynnhorlacher/32/74139_2.png) [@ryanlynnhorlacher](https://discourse.nodered.org/u/ryanlynnhorlacher)
#### Post date: [11 January 2023 15:25 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504/3 "2023-01-11T15:25:15Z")

</div>

I don't need to import or export them. I'd just like to be able to organize them in Node Red in a simple directory structure. Instead of always seeing all tabs open at once, I'd like to be able to group tabs (flows) into directories and only open a single directory at a time.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [11 January 2023 16:17 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504/4 "2023-01-11T16:17:21Z")

</div>

It's a bit clunky but you can hide flows individually (alt-w) or all but the current flow (no keyboard shortcut assigned, maybe alt-W).  
Then shift-ctrl-f lists them and you can click on a hidden flow to unhide it.  
You can assign a shortcut (maybe shift-alt-W) to show all flows too.

You can't currently group flows but you can drag related flows next to each other so they show up together in the list.  
I wonder if the flow description could somehow be leveraged to group flows. I have no idea what people use this for. There is a Markdown editor with a "Preview" button.  
A keyboard shortcut "Hide/show all flows with the same H1 in their description" perhaps.

---

<div class="post-metadata">

### Author: ![yOyOeK1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yoyoek1/32/73011_2.png) [@yOyOeK1](https://discourse.nodered.org/u/yOyOeK1)
#### Post date: [11 January 2023 16:35 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504/5 "2023-01-11T16:35:59Z")

</div>

using otdm-tools:  
`$ ./otdmTools.py -forceHost localhost -dnrfByUid "*" -oFile '/tmp/flowsListRes.json'`  
Returns to /tmp/flowsListRes.json json with basic info about flows in localhost. It looks like .....

```auto
..........
  },
    {
        "id": "e960dab18be5ba03",
        "type": "tab",
        "label": "mqtt hu to yss",
        "disabled": false,
        "info": "",
        "env": []
    }
]

```

so by doing:  
`$ ./otdmTools.py -forceHost localhost -dnrfByUid "e960dab18be5ba03" -oFile '/tmp/flow_e960dab18be5ba03.json'`

You will get ready json for later to import.

RTFM of otdm-tools 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [12 March 2023 16:36 UTC](https://discourse.nodered.org/t/directory-structure-for-flows/73504/6 "2023-03-12T16:36:53Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
