# Creating custom modules via the CLI

**URL:** <https://community.hubspot.com/t/creating-custom-modules-via-the-cli/67165>\
**Category:** CMS Development\
**Tags:** local-development\
**Created:** [October 14, 2022, 4:02pm UTC](https://community.hubspot.com/t/creating-custom-modules-via-the-cli/67165 "2022-10-14T16:02:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JC6](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@JC6](https://community.hubspot.com/u/JC6)\
**Post date:** [October 14, 2022, 4:02pm UTC](https://community.hubspot.com/t/creating-custom-modules-via-the-cli/67165/1 "2022-10-14T16:02:28Z")

</div>

Hi,

Maybe this is already possible and I’m missing it, but it would be nice if there was a CLI command to create a default file structure for modules.

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [October 14, 2022, 4:15pm UTC](https://community.hubspot.com/t/creating-custom-modules-via-the-cli/67165/2 "2022-10-14T16:15:33Z")

</div>

@JC6

You should be able to use the following to create a new module using CLI:

`hs create module <name> [dest]`

---

<div class="post-metadata">

**Author:** ![JC6](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@JC6](https://community.hubspot.com/u/JC6)\
**Post date:** [October 14, 2022, 4:30pm UTC](https://community.hubspot.com/t/creating-custom-modules-via-the-cli/67165/3 "2022-10-14T16:30:09Z")

</div>

I KNEW I was missing it. I just re looked at the docs based on your answer I can use that syntax to do alot of other things too! Ha thanks, for replying to my lack of attation to documentation.

One little random thing to note I did have to use the following for it to work in powershell

`npx hs create module <name> [dest]`

, but switched to regular command prompt and you don’t need to npx.

Thanks!

---

<div class="post-metadata">

**Author:** ![ahmeddev](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@ahmeddev](https://community.hubspot.com/u/ahmeddev)\
**Post date:** [February 11, 2025, 2:53pm UTC](https://community.hubspot.com/t/creating-custom-modules-via-the-cli/67165/4 "2025-02-11T14:53:22Z")

</div>

npx hs create module **modulename**  **path**

Example: I want to create Two Column Feature Module inside the folder:

**npx hs create module Two-Column-Feature test-theme/src/modules**
