{"id":16035233,"url":"https://github.com/dlurak/moxide","last_synced_at":"2025-04-14T11:07:40.349Z","repository":{"id":253804938,"uuid":"844271284","full_name":"Dlurak/moxide","owner":"Dlurak","description":"A tmux session manager with a modular config","archived":false,"fork":false,"pushed_at":"2025-03-30T18:45:32.000Z","size":85,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T11:07:31.400Z","etag":null,"topics":["clap","rust","tmux","tmux-session-manager"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dlurak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T22:19:34.000Z","updated_at":"2025-04-13T08:11:23.000Z","dependencies_parsed_at":"2024-08-22T02:19:03.047Z","dependency_job_id":"84edfe42-78c0-4aba-9346-9ebbb60820ef","html_url":"https://github.com/Dlurak/moxide","commit_stats":null,"previous_names":["dlurak/muxmate","dlurak/moxide"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dlurak%2Fmoxide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dlurak%2Fmoxide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dlurak%2Fmoxide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dlurak%2Fmoxide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dlurak","download_url":"https://codeload.github.com/Dlurak/moxide/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868768,"owners_count":21174758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clap","rust","tmux","tmux-session-manager"],"created_at":"2024-10-08T22:01:31.235Z","updated_at":"2025-04-14T11:07:40.333Z","avatar_url":"https://github.com/Dlurak.png","language":"Rust","funding_links":[],"categories":["Recently Updated","\u003ca name=\"tools\"\u003e\u003c/a\u003eTools and session management"],"sub_categories":["[Oct 08, 2024](/content/2024/10/08/README.md)"],"readme":"# Moxide\n\n**Moxide** is a powerful tmux session manager written in Rust that simplifies the process of creating and managing complex tmux sessions. It allows you to define and control multiple windows and commands effortlessly, making it a perfect fit for developers and teams alike.\n\n## Features\n\n- **Declarative and Extensible**: Define your sessions using simple YAML configuration files. Customize and extend your setup as needed.\n- **Single Binary**: Moxide is distributed as a single binary, requiring no runtime or interpreter, making it easy to install and run.\n- **Projects, Templates, and Directories**:\n  - **Directories**: Create named sessions based on the directory you're working in.\n  - **Templates**: Reusable templates for common setups. For instance, a Rust template might open Neovim in one window and run Cargo commands in another.\n  - **Projects**: Combine directories with templates to streamline workflows. Specify a template for a project or directly define the windows and commands needed.\n\n## Installation\n\nTo install Moxide, use the following command:\n\n```bash\ncargo install moxide\n```\n\n### Nix\n\nMoxide is also available in nixpkgs under the name `moxide`, if you use nix you know how to install a nixpkg but still here is a command:\n\n```bash\nnix shell nixpkgs#moxide\n```\n\nThis repo also provides a flake, it is always up to date and includes a home-manager module.\n\n## Why moxide\n\nMoxide offers a unique combination of features:\n\n- **Reusable Templates**: Easily define a session once and apply it across multiple projects, making it ideal for managing similar setups.\n- **Flexibility**: Choose whether to use a template or define project-specific configurations, allowing for customization when needed.\n- **Declarative Configuration**: Use simple YAML files for configuration, promoting readability and ease of management, it can even be generated from an active session.\n\nHere are some scenarios how moxide might help people:\n\n- Developers managing multiple projects that require similar setups (For example 5 JavaScript projects, where only the directory differs).\n- Teams looking for a standardized tmux environment across shared codebases.\n- Individuals who appreciate the flexibility of reusing templates while maintaining the option for custom project configurations.\n\n## Configuration Files\n\nMoxide uses simple YAML configuration files. Below are examples of how to configure directories, projects, and templates.\n\n### Example Configuration Files\n\n#### Directories\n\n`~/.config/moxide/directories.yaml`\n\n```yaml\n- name: \"Downloads\"\n  path: \"~/Downloads/\"\n- name: \"Home\"\n  path: \"~/\"\n```\n\n#### Projects\n\n`~/.config/moxide/projects/Moxide.yaml`\n\n```yaml\nname: Moxide\n\nroot_dir: ~/SoftwareDevelopment/cli/moxide/\ntemplate: Rust\n```\n\nIt is also possible to have project specific configs.\n\n#### Templates\n\n`~/.config/template/Rust.yaml`\n\n```yaml\nname: Rust\n\nwindows:\n  - name: Neovim\n    panes:\n      - nvim\n  - name: Cargo\n    layout: even-horizontal\n    panes:\n      - cargo build\n      - cargo clippy\n```\n\n## Usage\n\nMoxide allows you to choose whether to apply a template to a project or define the windows and commands per project. This flexibility enables teams to maintain standard setups while accommodating unique project needs.\n\n### Launching Moxide Sessions\n\n```bash\nmoxide project start ProjectName\n```\n```bash\nmoxide template start Rust --directory ~\n```\n```bash\nmoxide dir start Downloads\n```\n```bash\nmoxide dir start \"~/Pictures/\"\n```\n\n## Scripting integration\n\nMoxide can be easily integrated into shell scripts. Below is a sample script for launching Moxide sessions with a selection tool:\n\n```bash\n#!/bin/bash\n\nproject_emoji=\"🚀\"\ntemplate_emoji=\"🛠️\"\ndirectory_emoji=\"📁\"\n\nlist=$(moxide list \\\n    --format-project \"$project_emoji {}\"\\\n    --format-template \"$template_emoji {}\"\\\n    --format-directory \"$directory_emoji {}\"\n)\n\nvalue=$(echo \"$list\" | \\\n    fzf \\\n    --no-sort \\\n    --layout reverse \\\n    --border rounded \\\n    --border-label \"Moxide Sessions\" \\\n    --no-scrollbar \\\n    --prompt \"✨ \" \\\n    --pointer \"👉\" \\\n    --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \\\n    --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \\\n    --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \\\n    --color=selected-bg:#45475a\n)\n\nIFS=' ' read -r emoji name \u003c\u003c\u003c \"$value\"\ncase \"$emoji\" in\n    $project_emoji)\n        moxide project start \"$name\"\n        ;;\n    $template_emoji)\n        moxide template start \"$name\"\n        ;;\n    $directory_emoji)\n        moxide dir start \"$name\"\n        ;;\nesac\n```\nYou can bind this script into a tmux popup with the following command:\n\n```tmux\nbind-key s display-popup -B -E -w 40% -h 13 \"~/Dotfiles/scripts/shell/moxide.sh\"\n```\n\n## Similar Projects\n\nIf you are exploring alternatives, you might find these similar tools useful:\n\n- [Sesh](https://github.com/joshmedeski/sesh)\n- [tmuxinator](https://github.com/tmuxinator/tmuxinator)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlurak%2Fmoxide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlurak%2Fmoxide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlurak%2Fmoxide/lists"}