---
title: "@vltpkg/project: read-project-folders — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/project/read-project-folders"
image: "https://docs.vlt.io/og/client/api-reference/project/read-project-folders"
lang: "en"
---

# read-project-folders

## Type Aliases

### ProjectFolderOptions

```ts
type ProjectFolderOptions = object;
```

Defined in: read-project-folders.ts:17

#### Type declaration

| Name                      | Type                                                  | Description                                                                     |
| ------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------- |
| `path`?                   | `string`                                              | The standard path to read from, defaults to the user's home directory.          |
| `scurry`                  | [`PathScurry`](https://isaacs.github.io/path-scurry/) | A [PathScurry](https://isaacs.github.io/path-scurry/) object, for use in globs. |
| `userDefinedProjectPaths` | `string`\[]                                           | A list of user defined project paths set in the configuration file.             |

## Functions

### readProjectFolders()

```ts
function readProjectFolders(__namedParameters, maxDepth): Promise<PathBase[]>
```

Defined in: read-project-folders.ts:41

Retrieves folders from a given directory, if that directory is recognized to be the current cli project root folder then we proceed to read its siblings.

Traverses nested directory recursively until project folders can be find, always stopping at the first level where a package.json is present.

#### Parameters

| Parameter           | Type                                                                                                                    | Default value |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------- |
| `__namedParameters` | [`ProjectFolderOptions`](https://docs.vlt.io/client/api-reference/project/read-project-folders.md#projectfolderoptions) | `undefined`   |
| `maxDepth`          | `number`                                                                                                                | `7`           |

#### Returns

`Promise`<[`PathBase`](https://isaacs.github.io/path-scurry/)\[]>
