Giter Club home page Giter Club logo

muxed's Introduction

Muxed - “Another TMUX project manager”

Build Status

Drop muxed in to your $PATH and take it for a spin. Happy to receive feature requests or bug reports!

Muxed

Muxed: Provides the functionality for creating, opening and parsing your project configs to launch a TMUX session.

Snapshot: Experimental : Create a config file based on a running tmux session.

Installation

Download a release:

See the releases page for muxed packages. Download and untar the package as desired. Make sure the bin is somewhere in your $PATH. I generally move the bins in to /usr/local/bin.

$ tar -xvzf muxed-VERSION-SYSTEM.tar.gz
x muxed
$ mv muxed /usr/local/bin
$ muxed --help
$ muxed my_new_project

From Homebrew taps

This will add a tap to install a pre-compiled Muxed bin.

$ brew tap brianp/homebrew-muxed
$ brew install muxed_bin

For development

With Docker

Docker commands are long so I use a make file that points all the commands to a runing docker container.

$ git clone [email protected]:brianp/muxed.git
$ export MUXED_ENV=nix
$ make build
$ make start
$ make cargo cmd='test --workspace --color=always'

From source:

Have rust stable installed. Clone this repo. Then run cargo to build the source, and again use cargo to run the app.

$ git clone [email protected]:brianp/muxed.git
$ cargo build
$ cargo run -- --help
$ cargo test --workspace --color=always

Setup

1. Create a new project file.

If this is your first run, muxed will create the ~/.muxed/ directory for you.

$ muxed new my_project
Looks like this is your first time here. Muxed could't find the configuration directory: `/root/.muxed`
Creating that now 👌

✌ The template file my_project.yml has been written to /root/.muxed
Happy tmuxing!

The generated template will look like this (but with some inline docs):

root: "~/"
windows:
  - editor:
      layout: "main-vertical"
      panes: ["vi", "ls -alh"]
  - processes: "ls /proc"
  - logs: "tail -f /var/log/dmesg"

This config will create a new tmux session with three windows named editor, processes and logs. By default your view will be on the first window opened, on the first pane, which in this case is vi in the editor window. The first window will have two panes split vertically, the left will have the editor vi running and the right will have a shell listing of your current working directory.

2. Edit your template

Now you can use your favourite editor and make changes to the config as desired. This makes the assumption you have an $EDITOR env var set.

$ muxed edit my_project

3. Open TMUX with your muxed config

$ muxed my_project

Usage Options

Usage:
    muxed (list | ls)
    muxed [flags] [options] <project>
    muxed edit [options] <project>
    muxed load [flags] [options] <project>
    muxed new [flags] [options] <project>
    muxed snapshot [flags] [options] <project>
    muxed (-h | --help)
    muxed (-v | --version)

Flags:
    -d                  If you want to create a muxed session without connecting to it
    -f                  Overwrite existing file if one exists
    --debug             Prints debug information while executing (project opening only)
    -h, --help          Prints help information
    -v, --version       Prints version information

Options:
    -p <project_dir>    The directory your project config files live in. Defaults to ~/.muxed/
    -t <session>        The name of the running TMUX session to codify

Args:
    <project>           The name of your project to open

Subcommands:
    list                             List the availiable project configs
    edit <project>                   Edit an existing project file
    load <project>                   Load the specified project, this is the default command
    new <project>                    To create a new project file
    snapshot -t <session> <project>  Capture a running session and create a config file for it

Inspiration

This project has been inspired by the work done on the tmuxinator project. Check it out for a ruby based tmux session management solution.

Copyright

Copyright (c) 2014-2020 Brian Pearce. See LICENSE for further details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.