MCPcopy Index your code
hub / github.com/brianp/muxed

github.com/brianp/muxed @0.8.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.8.2 ↗ · + Follow
204 symbols 490 edges 28 files 20 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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 git@github.com: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 git@github.com: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.

Extension points exported contracts — how you extend this code

Command (Interface)
(no doc) [10 implementers]
load/src/command.rs

Core symbols most depended-on inside this repo

call
called by 21
load/src/project/parser.rs
project_file_with_dir
called by 20
common/src/rand_names.rs
retrieve_capture
called by 11
snapshot/src/capture/mod.rs
project_paths
called by 9
common/src/project_paths.rs
open
called by 9
load/src/project/mod.rs
as_ref
called by 9
snapshot/src/tmux/pane/pid.rs
write_template
called by 8
new/src/lib.rs
find_window
called by 7
snapshot/src/tmux/session.rs

Shape

Function 148
Method 31
Class 22
Enum 2
Interface 1

Languages

Rust100%

Modules by API surface

load/src/project/parser.rs29 symbols
snapshot/src/tmux/window.rs19 symbols
load/src/command.rs18 symbols
load/tests/load.rs16 symbols
new/src/lib.rs15 symbols
snapshot/src/lib.rs11 symbols
common/src/project_paths.rs9 symbols
snapshot/src/tmux/pane/mod.rs8 symbols
load/tests/helpers/mod.rs8 symbols
load/src/tmux/config.rs8 symbols
load/src/project/mod.rs8 symbols
load/src/tmux/target.rs7 symbols

For agents

$ claude mcp add muxed \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact