tmuxinator-yml-gen

1.1.3 • Public • Published

tmuxinator-yml-gen

Tmuxinator YAML file generator

Use Case

  • If your work requires you to check on 10+ projects and switch between them frequently.
  • Tired of manually creating Tmuxinator YAML files for multiple project folders?
  • Here’s a simple way to generate Tmuxinator YAML files automatically.
  • You might already have a better solution, but I hope this helps you ❄️

tmuxinator-yml-gen

Installation

npm install -g tmuxinator-yml-gen

Usage

Switch to the root folder containing your project directories:

.
├── project-1
├── project-10
├── project-2
├── project-3
├── project-4
├── project-5
├── project-6
├── project-7
├── project-8
└── project-9

Run the following command:

mx-yml-gen --name=project-1 --editor=nvim --cp=true
Usage:
  $ mx-yml-gen
Options:
  --name    [Specify the session name]
  --editor  [Specify the editor to use]
  --cp      [Copy the generated file to the tmuxinator config folder]
Examples:
  $ mx-yml-gen --name=amk --editor=vim --cp=true

The generated YAML file will be placed in the tmuxinator-yml-gen folder in the current directory.

You may need to copy the YAML file manually to ~/.tmuxinator, or use the --cp=true option to automate this process.

My Use Case

For batch generation of YAML files for all projects in a directory, you can use the following shell function:

mxgen() {
  for file in *; do
    if [ -d "$file" ]; then
      filenamelowercase=$(echo "$file" | tr '[:upper:]' '[:lower:]')
      cd "$file"
      mx-yml-gen --name=${filenamelowercase} --cp=true --mode=amk --editor=none
      cd ..
      echo "$filenamelowercase"
    fi
  done
}

License

MIT © Aung Myo Kyaw

Package Sidebar

Install

npm i tmuxinator-yml-gen

Weekly Downloads

3

Version

1.1.3

License

MIT

Unpacked Size

1.58 MB

Total Files

8

Last publish

Collaborators

  • aungmyokyaw