https://github.com/aungmyokyaw/tmuxinator-yml-gen
tmuxinator yaml file generator
https://github.com/aungmyokyaw/tmuxinator-yml-gen
tmuxinator tmuxinator-configurations-generator tmuxinator-yaml-generator tmuxinator-yml-generator
Last synced: 3 months ago
JSON representation
tmuxinator yaml file generator
- Host: GitHub
- URL: https://github.com/aungmyokyaw/tmuxinator-yml-gen
- Owner: AungMyoKyaw
- License: mit
- Created: 2021-08-14T07:52:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-04T11:41:23.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T08:19:26.461Z (8 months ago)
- Topics: tmuxinator, tmuxinator-configurations-generator, tmuxinator-yaml-generator, tmuxinator-yml-generator
- Language: JavaScript
- Homepage: https://npm.im/tmuxinator-yml-gen
- Size: 2.57 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 ❄️
## Installation
```shell
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:
```shell
mx-yml-gen --name=project-1 --editor=nvim --cp=true
``````shell
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:
```bash
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](https://github.com/AungMyoKyaw)