> For the complete documentation index, see [llms.txt](https://cosmo-lang.gitbook.io/cosmo-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cosmo-lang.gitbook.io/cosmo-docs/general/modules.md).

# Modules

Modules are used to separate Cosmo code into separate files and import them from another file.

{% hint style="danger" %}
Warning: There's currently a bug that makes it so that you cannot use types imported from other files. This includes classes. Sorry, this will be fixed soon hopefully.
{% endhint %}

Cosmo's module system is similar to TypeScript. Here is an example of how you might import a file in the same directory:

```sql
use member from "./mod_name"
```

You can import any intrinsics or Stars packages by just omitting the `./` and writing the name of the package/intrinsic.
