# Using honeybee + radiance with CLI

**URL:** <https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603>\
**Category:** scripting\
**Tags:** honeybee\
**Created:** [June 9, 2022, 3:43am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603 "2022-06-09T03:43:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![compdesigner-nz](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/compdesigner-nz/32/23304_2.png) [@compdesigner-nz](https://discourse.ladybug.tools/u/compdesigner-nz)\
**Post date:** [June 9, 2022, 3:43am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/1 "2022-06-09T03:43:16Z")

</div>

Hello! Is there a guide that exists on how to get started with simulating HB models in radiance from the command line? I have models being generated in GH and output as .hbjson files along with the corresponding .rad directories, and I am wanting to run certain recipes using the CLI rather than going through GH.

Any guidance or direction would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![minggangyin](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/minggangyin/32/216_2.png) [@minggangyin](https://discourse.ladybug.tools/u/minggangyin)\
**Post date:** [June 9, 2022, 6:08am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/2 "2022-06-09T06:08:07Z")

</div>

@compdesigner-nz Maybe this tutorial will help you.  
[https://www.ladybug.tools/honeybee-core/docs/honeybee.cli.html](https://www.ladybug.tools/honeybee-core/docs/honeybee.cli.html)

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/6/b/6b06e1f4828da78f3b04a4979446c4f24e1c567a.png)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [June 9, 2022, 7:58am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/3 "2022-06-09T07:58:17Z")

</div>

Hi @compdesigner-nz,

There are two ways. In both cases you will need an inputs.json file so let’s start with that. When you run a recipe (here `annual-daylight`) through GH you will see in the folder that there is a JSON file. The JSON file stores all the inputs to the recipe. For `annual-daylight` you can see the possible inputs [here](https://github.com/pollination/annual-daylight/blob/master/pollination/annual_daylight/entry.py#L32-L102). Not all inputs are required, e.g., you can see that I don’t have any input for the schedule. For `annual-daylight` the required inputs are model and wea.

 ![annual_daylight_gh](https://discourse.ladybug.tools/uploads/default/original/3X/5/9/596cbc043735639c3613ede55f9b8df7cc78fbfd.png)  
 ![annual_daylight_inputs](https://discourse.ladybug.tools/uploads/default/original/3X/a/8/a8ad49eaacbe235ad79d66dee418207b37b380b9.png)

**Method 1: queenbee local run**  
If you type `queenbee local run --help` in the cmd you get this:

 ![queenbee_help](https://discourse.ladybug.tools/uploads/default/original/3X/5/e/5e45fd22ebcdafb8777cc3a313f85f58c166345f.png)

To run the recipe I would execute the following command:  
`queenbee local run "C:\Program Files\ladybug_tools\python\Lib\site-packages\lbt_recipes\annual_daylight" . -i annual_daylight_inputs.json -w 6 -n queenbee_annual_daylight`

Notice that I use a period for the project\_folder argument because I am already in the folder with the input files. I now have a new folder (queenbee\_annual\_daylight). This folder is similar to the annual\_daylight folder that was generated when I ran the recipe in GH.

 ![queenbee_annual_daylight](https://discourse.ladybug.tools/uploads/default/original/3X/d/0/d0291734da328b2d8c0e84d5fd5abc6237d1156e.png)

You may have to run the following command first:  
`pip install queenbee-local -U`

**Method 2: pollination dsl run (I prefer this)**  
First you have to set an environment variable `QB_POLLINATION_TOKEN`. You do this by generating an API Key on [https://app.pollination.cloud/](https://app.pollination.cloud/). Under settings on your profile you can generate a key.

 ![key](https://discourse.ladybug.tools/uploads/default/original/3X/5/9/59d83bcd6ad1523cd575fc8c8da4d3f0e9bf70dc.png)  
Save the key as an environment variable called `QB_POLLINATION_TOKEN`. Check [this](https://github.com/pollination/guides/tree/master/getting-started#set-environment-variables) if you are not sure what to do. In the link the variable is called `POLLINATION_API_KEY`, but you should call it `QB_POLLINATION_TOKEN`. Once you have done this you can continue.

If you type `pollination dsl run --help` in the cmd you get this:

 ![pollination_help](https://discourse.ladybug.tools/uploads/default/original/3X/a/6/a625321052faceceda2b1a1deacf3ae9c4278834.png)  
To run the recipe I would execute the following command:  
`pollination dsl run annual-daylight . -i annual_daylight_inputs.json -w 6 -n pollination_annual_daylight`

Notice that I left out “pollination” from the recipe name, e.g., `annual-daylight` instead of `pollination-annual-daylight`. Either of them works.

Once again I now have a new folder called `pollination_annual_daylight`.

 ![pollination_annual_daylight](https://discourse.ladybug.tools/uploads/default/original/3X/e/7/e7937aa37b91c77b41b49949bb575fc111b6407f.png)

You may have to run the following command first:  
`pip install pollination-dsl -U`  
`pip install pollination-annual-daylight -U`

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [June 9, 2022, 5:20pm UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/4 "2022-06-09T17:20:04Z")

</div>

Just to supplement what @mikkel said here, there is a third method that’s a little bit more streamlined but only works for the recipes that ship with Ladybug Tools for Grasshopper (aka. [lbt-recipes](https://github.com/ladybug-tools/lbt-recipes)).

**Method 3: lbt-recipes run (Chris prefers this)**  
[Here are the docs for the command](https://www.ladybug.tools/lbt-recipes/docs/cli/main.html#lbt-recipes-run).

It’s very similar to the two other methods @mikkel posted except that you only need the name off the recipe and not the path to a folder with the recipe files. Also, aside from installing Radiance and Python, there are only two steps that you need to get all set up with this workflow:

```auto
pip install lbt-dragonfly -U

```

and then:

```auto
pip install lbt-recipes -U

```

FYI, this is the main page that links to all docs across the entire Ladybug Tools SDK:  
[https://discourse.ladybug.tools/pub/ladybug-tools-core-sdk-documentation](https://discourse.ladybug.tools/pub/ladybug-tools-core-sdk-documentation)  
You will see that lbt-recipes is just one of several libraries that make up the plugin.

---

<div class="post-metadata">

**Author:** ![compdesigner-nz](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/compdesigner-nz/32/23304_2.png) [@compdesigner-nz](https://discourse.ladybug.tools/u/compdesigner-nz)\
**Post date:** [June 14, 2022, 11:30pm UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/5 "2022-06-14T23:30:04Z")

</div>

Thanks for the solution! With the weather file input, does it have to be a .wea file or can it be a .ddy or .epw file?

---

<div class="post-metadata">

**Author:** ![compdesigner-nz](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/compdesigner-nz/32/23304_2.png) [@compdesigner-nz](https://discourse.ladybug.tools/u/compdesigner-nz)\
**Post date:** [June 15, 2022, 12:13am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/6 "2022-06-15T00:13:15Z")

</div>

@chris why would CreateRadFolder fail?

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [June 15, 2022, 7:19am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/7 "2022-06-15T07:19:50Z")

</div>

Hi @compdesigner-nz,

In case you didn’t try yet - yes, you can use an .epw file. Btw, since you are not going to do any development on any of the recipes that ship with Ladybug Tools for Grasshopper (I assume this), but rather use them as they are, I would suggest that you use Method 3.

> [@compdesigner-nz](#):
>
> @chris why would CreateRadFolder fail?

Can you share the logs file? You should find it in the ` __logs__ ` folder.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/d/f/dfb34e992049af4514b4af0ab65c8c5f3a50a004.png)

---

<div class="post-metadata">

**Author:** ![compdesigner-nz](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/compdesigner-nz/32/23304_2.png) [@compdesigner-nz](https://discourse.ladybug.tools/u/compdesigner-nz)\
**Post date:** [June 15, 2022, 10:12am UTC](https://discourse.ladybug.tools/t/using-honeybee-radiance-with-cli/18603/8 "2022-06-15T10:12:17Z")

</div>

Don’t worry about the issue - solved it! Just me being an idiot and forgetting to assign my sensor grid to the test room!
