# @cozy/cli-tree

Latest version **0.15.1** (published 2026-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cozy/cli-tree
pnpm add @cozy/cli-tree
yarn add @cozy/cli-tree
bun add @cozy/cli-tree
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.15.1 |
| Published | 2026-03-17 |
| First published | 2020-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mycozycloud |

## Links

- npm: https://www.npmjs.com/package/@cozy/cli-tree
- npm.io page: https://npm.io/package/@cozy/cli-tree

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [tabtab](https://npm.io/package/tabtab.md) ^3.0.2
- [argparse](https://npm.io/package/argparse.md) ^2.0.1

## Recent versions

- 0.15.1 (latest) — 2026-03-17
- 0.15.0 — 2026-03-17
- 0.14.3 — 2026-03-16
- 0.14.2 — 2026-03-05
- 0.14.1 — 2025-10-30
- 0.14.0 — 2025-09-09
- 0.13.1 — 2024-11-06
- 0.13.0 — 2024-11-06
- 0.12.0 — 2024-11-06
- 0.11.0 — 2024-11-06
- 0.10.1 — 2024-11-05
- 0.10.0 — 2024-10-30
- 0.9.0 — 2024-10-30
- 0.8.0 — 2024-10-25
- 0.7.2 — 2024-10-23
- … 12 more at https://npm.io/package/@cozy/cli-tree/versions

## README

# CLI tree

CLI tree is a small package based on [argparse][] to create a tree like CLI in a declarative
way.

## Usage

See the [example][].

## Automated help

One of the major advantage of parsers built with argparse is their automated help.

```bash
$ node examples/users.js users list --help
usage: users.js users list [-h] [--deleted]

List users

Optional arguments:
  -h, --help  Show this help message and exit.
  --deleted   Show also deleted users
```

## Command completion

CLI tree uses [tabtab][] to add command completion.

Completion setup commands are automatically added and available like this :

```bash
$ node examples/users.js users completion -h
```

To properly handle completion in you program, you will have to add the completionHandler like in
the [example][].

[example]: ./examples/users.js

[argparse]: https://github.com/nodeca/argparse

[tabtab]: https://www.npmjs.com/package/tabtab

---
_Source: https://npm.io/package/@cozy/cli-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
