# run-in-iterm2

> 一键在iTerm2中跑齐命令的效率脚本

Latest version **1.0.5** (published 2020-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install run-in-iterm2
pnpm add run-in-iterm2
yarn add run-in-iterm2
bun add run-in-iterm2
```

Provides the command `run`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-01-10 |
| First published | 2020-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | deswan |

## Links

- npm: https://www.npmjs.com/package/run-in-iterm2
- Repository: https://github.com/deswan/run-in-iTerm2
- Issues: https://github.com/deswan/run-in-iTerm2/issues
- npm.io page: https://npm.io/package/run-in-iterm2

## Dependencies (3)

- [js-yaml](https://npm.io/package/js-yaml.md) ^3.13.1
- [inquirer](https://npm.io/package/inquirer.md) ^7.0.3
- [node-yaml](https://npm.io/package/node-yaml.md) ^4.0.1

## Recent versions

- 1.0.5 (latest) — 2020-01-10
- 1.0.4 — 2020-01-10
- 1.0.3 — 2020-01-10
- 1.0.2 — 2020-01-10
- 1.0.1 — 2020-01-10
- 1.0.0 — 2020-01-10

## README

# run-in-iterm2

一键在iTerm2中跑齐命令的效率脚本

## 安装
需要自行安装python3

#### 先安装 python 依赖
```
pip3 instaill iterm2
```

#### 安装 run-in-iterm2
```
sudo npm i -g run-in-iterm2
```


## 使用

#### 配置
``` bash
$ cd ~
$ vim .run-in-iterm2.yaml
```

``` yaml
# ~/.run-in-iterm2.yaml

# 默认路径前缀
defaultPath: /Users/micky 
# 默认命令
defaultCommand: 
  - npm run webpack
  - npm run develop
# 项目列表，每次执行 run 命令选择其中一个项目，将会在你的 iTerm2 中新建一个 tab，执行 command
projects: 
  - project1 #仅指定项目名称
  - 
    name: project2     #项目名称
    title: my_project2 #iTerm2 Tab标题，不填默认为 name 的值
    path: /Users/micky/my_project2    #项目路径，command 将会在 path 下执行，不填默认为 defaultPath + name
    command:    #要执行的命令，每一项会 split panel 一次执行，如只需执行单个命令则可填为字符串，不填默认为 defaultCommand 的值
        - npm run webpack
        - npm run develop

```

#### 执行
``` bash
# 选择项目，即可在 iTerm2 中优雅执行相应命令
$ run
```

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