# iterm-tab

> Open iterm tab and run a command programmatically

Latest version **0.4.0** (published 2020-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install iterm-tab
pnpm add iterm-tab
yarn add iterm-tab
bun add iterm-tab
```

## 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.4.0 |
| Published | 2020-09-07 |
| First published | 2018-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Lionel T |
| Maintainers | elrumordelaluz |

## Links

- npm: https://www.npmjs.com/package/iterm-tab
- Repository: https://github.com/elrumordelaluz/iterm-tab
- Homepage: https://github.com/elrumordelaluz/iterm-tab#readme
- Issues: https://github.com/elrumordelaluz/iterm-tab/issues
- npm.io page: https://npm.io/package/iterm-tab

## Recent versions

- 0.4.0 (latest) — 2020-09-07
- 0.3.0 — 2019-01-10
- 0.2.0 — 2018-12-20
- 0.1.0 — 2018-12-20
- 0.0.2 — 2018-07-24
- 0.0.1 — 2018-07-24

## README

# iterm-tab

Open iterm tab and run a command programmatically

## Install

```
yarn add iterm-tab
```

## Usage

```
const itermTab = require('iterm-tab')

itermTab(`cd .. && echo "my command"`)
  .then(() => console.log('yay'))
```

## API

itermTab(command, options)

#### command

The command to execute after open the new tab

Type: `String`

#### options

Type: `Object`

##### options.close

Closes tab immediately or after n seconds. Useful to launch persistent services like `mongod`.

Type: `Boolean|Number`

Default: `false`

##### options.delayAfterRun

Wait number of seconds before let continue the tasks.

Type: `Number`

Default: `0`

##### options.splitTab

Split the current tab horizontally or vertically then run the command.

Type: `Boolean|String`

Default: false

For Vertical Split: `{ splitTab: 'vertically' }`

For Horizontal Split: `{ splitTab: 'horizontally' }`

## Example

Take a look into [this example](https://github.com/elrumordelaluz/iterm-tab/blob/master/test.js) running two instances of `iterm-tab`

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