Skip to content

Commit

Permalink
feat(docs): doc ls (#9063)
Browse files Browse the repository at this point in the history
### Description

Docs for ls

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
  • Loading branch information
tknickman authored Aug 27, 2024
1 parent 66b3ef6 commit 011e920
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions docs/repo-docs/reference/ls.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: ls
description: API reference for the `turbo ls` command
---

import { ExperimentalBadge } from '#/components/experimental-badge';

List packages in your monorepo.

```bash title="Terminal"
turbo ls [package(s)] [flags]
```

When scoped to the entire repository, output includes package manager, package count, and all package names and directories.

```bash title="Terminal"
# List all packages in the repository
turbo ls
```

When scoped to one or more packages, output includes package name, directory, internal dependencies, and all tasks.

```bash title="Terminal"
# List only two packages
turbo ls web @repo/ui [package(s)]
```

## Flags

### `--affected`

Automatically filter to only packages that are affected by changes on the current branch.

By default the changes considered are those between `main` and `HEAD`.

- You can override `main` as the default base by setting `TURBO_SCM_BASE`.
- You can override `HEAD` as the default head by setting `TURBO_SCM_HEAD`.

```bash title="Terminal"
TURBO_SCM_BASE=development turbo ls --affected
```

### `--output <format>` <ExperimentalBadge />

Format to output the results. `json` or `pretty` (default)

```bash title="Terminal"
turbo ls --output=json
```
1 change: 1 addition & 0 deletions docs/repo-docs/reference/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"run",
"watch",
"prune",
"ls",
"generate",
"scan",
"login",
Expand Down

0 comments on commit 011e920

Please sign in to comment.