Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamssen/multiplerun
🛠Run multiple terminals (or iTerm split panes) at once
https://github.com/iamssen/multiplerun
Last synced: 27 days ago
JSON representation
🛠Run multiple terminals (or iTerm split panes) at once
- Host: GitHub
- URL: https://github.com/iamssen/multiplerun
- Owner: iamssen
- Created: 2019-01-19T07:30:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T16:24:06.000Z (3 months ago)
- Last Synced: 2024-11-05T21:46:18.013Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/multiplerun
- Size: 1.69 MB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-javascript - @workspace/root
- awesome-javascript - @workspace/root
README
# Run multiple terminals (or iTerm split panes) at once
If you have installed [iTerm.app](https://www.iterm2.com/) on your Mac. Your iTerm will opened like this.
If you don't have iTerm, those commands will be executed via default terminal app (`cmd.exe` or `Terminal.app`)
## Usage
And add config
```yaml
test:
- echo multiplerun!
- - echo hello
- echo world
``````sh
npx multiplerun test
```## Usage on `package.json`
```sh
npm install multiplerun --save-dev
```And add config to your `package.json`
```json
{
"name": "some-package",
"scripts": {
"multiplerun-test": "multiplerun test"
},
"multiplerun": {
"test": ["echo multiplerun!", ["echo hello", "echo world"]]
}
}
``````sh
npm run multiplerun-test
```# Run in script
```js
import multiplerun from 'multiplerun';multiplerun(['echo multiplerun!', ['echo hello', 'echo world']]);
```API
```ts
export type Command = { command: string; wait: number; cwd: string };export type Commands = (Command | Command[])[];
export type ConfigCommand =
| string
| { command: string; wait?: number; cwd?: string };export type ConfigCommands = (ConfigCommand | ConfigCommand[])[];
export type Options = {
cwd?: string;
};
``````ts
function multiplerun(commands: ConfigCommands, options?: Options);
```