# tli

> Tree command emulator

Latest version **0.0.1** (published 2015-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install tli
pnpm add tli
yarn add tli
bun add tli
```

Provides the command `tli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-11-11 |
| First published | 2015-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | 59naga |
| Maintainers | 59naga |
| Keywords | tree, cli |

## Links

- npm: https://www.npmjs.com/package/tli
- Repository: https://github.com/59naga/tli
- Homepage: https://github.com/59naga/tli#readme
- Issues: https://github.com/59naga/tli/issues
- npm.io page: https://npm.io/package/tli

## Dependencies (3)

- [glob](https://npm.io/package/glob.md) ^5.0.10
- [lodash](https://npm.io/package/lodash.md) ^3.9.3
- [commander](https://npm.io/package/commander.md) ^2.8.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2015-11-11
- 0.0.1-alpha.3 — 2015-06-08
- 0.0.1-alpha.2 — 2015-06-03
- 0.0.1-alpha.1 — 2015-06-02
- 0.0.1-alpha.0 — 2015-06-02
- 0.0.0 — 2015-06-02
- 0.0.0-alpha.2 — 2015-06-02
- 0.0.0-alpha.1 — 2015-06-02
- 0.0.0-alpha.0 — 2015-06-02

## README

# Tli [![NPM version][npm-image]][npm] [![Build Status][travis-image]][travis] [![Coverage Status][coveralls-image]][coveralls]

> Tree command emulator

# CLI

## Installation
```bash
$ npm install tli --global
$ tli -V
# 0.0.0

$ tli --help
#
#  Usage: tli /path/to/dir
#
#  Options:
#
#    -h, --help          output usage information
#    -L --level <level>  Descend only level directories deep.
#    -j --json           Output json
```

## Try

```bash
$ tli
.
├─ cli.spec.coffee
├─ fixtures
│  ├─ foo
│  │  ├─ bar
│  │  │  └─ beep
│  │  └─ baz
│  └─ hoge
│     ├─ fuga
│     ├─ ninja
│     │  └─ nande
│     │     └─ aieeee
│     └─ piyo
│        └─ guwa-
└─ index.coffee

10 directories, 10 files
```

# API
```bash
$ npm install tli --save
```

## `.treeSync(path)` -> `{file,directory,tree}`

File and directory synchronous searching.

```js
var tli= require('tli');

var result= tli.treeSync(__dirname);
console.log(result);
// {
//   file: 2,
//   directory: 3,
//
//   tree: {
//     baz: {
//       beep: 1024,//bytes
//       boop: 2048,
//     },
//     foo: {
//       bar: {},
//     },
//     noop: {},
//   },
// }
```

## `.stringify(tree)` -> `treeString`

Prettify the `tree` object

```js
var tli= require('tli');
var result= tli.treeSync(__dirname);
var tree= tli.stringify(result.tree);

console.log(tree);
//├─ baz
//│  ├─ beep
//│  └─ boop
//├─ foo
//│  └─ bar
//└─ noop
```

License
---
[MIT][License]

[License]: http://59naga.mit-license.org/

[npm-image]:https://img.shields.io/npm/v/tli.svg?style=flat-square
[npm]: https://npmjs.org/package/tli
[travis-image]: http://img.shields.io/travis/59naga/tli.svg?style=flat-square
[travis]: https://travis-ci.org/59naga/tli
[coveralls-image]: http://img.shields.io/coveralls/59naga/tli.svg?style=flat-square
[coveralls]: https://coveralls.io/r/59naga/tli?branch=master

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