{"id":47692143,"url":"https://github.com/davidmks/sarj","last_synced_at":"2026-04-02T15:46:46.966Z","repository":{"id":346308336,"uuid":"1189214882","full_name":"davidmks/sarj","owner":"davidmks","description":"Git worktree + tmux session manager. Create isolated worktrees with pre-configured tmux sessions in one command.","archived":false,"fork":false,"pushed_at":"2026-03-23T21:39:27.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T05:10:46.065Z","etag":null,"topics":["cli","developer-tools","git","go","golang","tmux","worktree"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidmks.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-23T05:01:29.000Z","updated_at":"2026-03-23T21:39:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/davidmks/sarj","commit_stats":null,"previous_names":["davidmks/sarj"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/davidmks/sarj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmks%2Fsarj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmks%2Fsarj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmks%2Fsarj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmks%2Fsarj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidmks","download_url":"https://codeload.github.com/davidmks/sarj/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmks%2Fsarj/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","developer-tools","git","go","golang","tmux","worktree"],"created_at":"2026-04-02T15:46:46.363Z","updated_at":"2026-04-02T15:46:46.959Z","avatar_url":"https://github.com/davidmks.png","language":"Go","readme":"# sarj\n\n**/ˈʃɒrʲ/ — Hungarian for shoot, sprout, new growth from a living tree. Also: offspring, descendant.**\n\nGit worktree + tmux session manager. One command to create an isolated worktree with symlinks, setup, and a pre-configured tmux session — one command to tear it all down. tmux is optional.\n\n## Requirements\n\n- **git** — sarj manages git worktrees\n- **tmux** (optional) — for session management. Without tmux, sarj works as a pure worktree manager.\n\n## Install\n\n### Homebrew\n\n```bash\nbrew install davidmks/tap/sarj\n```\n\n### Go\n\n```bash\ngo install github.com/davidmks/sarj/cmd/sarj@latest\n```\n\n### Binary\n\nDownload the latest release from [GitHub Releases](https://github.com/davidmks/sarj/releases), extract it, and add the binary to your PATH.\n\n## Quick start\n\n```bash\n# Create a worktree with a tmux session\nsarj create feat/my-feature\n\n# Create with auto-generated name\nsarj create\n# =\u003e Created worktree calm-spinning-oak\n\n# Create from a specific base branch\nsarj create feat/v2 -b feat/v1\n\n# List worktrees and their tmux session status\nsarj list\n\n# Delete a worktree (kills tmux session, removes worktree)\nsarj delete feat/my-feature\n\n# Delete and also remove the branch\nsarj delete feat/my-feature -D\n```\n\n## How it works\n\n**`sarj create`**\n- Fetch latest from remote\n- Create worktree and branch\n- Symlink shared files (`.env`, secrets, etc.)\n- Run setup command — rolls back everything on failure\n- Open tmux session with configured windows/panes\n\n**`sarj delete`**\n- Kill tmux session\n- Remove worktree\n- Optionally delete the branch\n\n## Configuration\n\nsarj works with zero configuration. To customize, use `sarj init`:\n\n```bash\n# Per-project config (commit to repo)\nsarj init\n\n# Global config (personal preferences)\nsarj init --global\n\n# Local config (per-user, per-project — gitignored)\nsarj init --local\n```\n\n### Global: `~/.config/sarj/config.toml`\n\nPersonal preferences — worktree location, tmux windows, auto-attach behavior. `{{.RepoName}}` expands to the repository directory name.\n\n```toml\nworktree_base = \"~/wt/{{.RepoName}}\"\ndefault_branch = \"main\"\nauto_attach = true\n\n[tmux]\nenabled = true\n\n[[tmux.windows]]\nname = \"terminal\"\ncommand = \"\"\n\n[[tmux.windows]]\nname = \"editor\"\ncommand = \"nvim .\"\nenv_file = \".env.test\"\n\n[[tmux.windows]]\nname = \"script\"\ncommand = \"\"\nenv = { UV_ENV_FILE = \".env\" }\n```\n\n**Environment variables**: Use `env_file` to source a file (all variables are exported) or `env` to set individual variables. Both can be combined — the file is sourced first, then individual vars are exported. Panes inherit environment from their parent window.\n\nWindows can have panes for side-by-side layouts:\n\n```toml\n[[tmux.windows]]\nname = \"dev\"\n\n[[tmux.windows.panes]]\ncommand = \"make dev\"\nsize = 70\n\n[[tmux.windows.panes]]\ncommand = \"make test-watch\"\nsplit = \"horizontal\"\n```\n\nUse `focus = true` to control which window is active on attach (defaults to the first window):\n\n```toml\n[[tmux.windows]]\nname = \"editor\"\ncommand = \"nvim .\"\n\n[[tmux.windows]]\nname = \"shell\"\nfocus = true\n```\n\nPanes support `focus` too — select a specific pane instead of the last one created:\n\n```toml\n[[tmux.windows.panes]]\ncommand = \"nvim .\"\nfocus = true\n\n[[tmux.windows.panes]]\ncommand = \"make watch\"\nsplit = \"horizontal\"\nsize = 30\n```\n\n### Per-project: `.sarj.toml`\n\nTeam-shared settings — setup command, symlinks, default branch, tmux windows.\n\n```toml\ndefault_branch = \"trunk\"\nsetup_command = \"make setup\"\n\nsymlinks = [\n    \".env\",\n    \".env.secrets\",\n    \"ssl\",\n    \".claude/settings.local.json\",\n]\n```\n\n### Local: `.sarj.local.toml`\n\nPer-user overrides for a specific project — gitignored, never committed. Sections defined here replace the corresponding section from the project or global config. Generate with `sarj init --local`.\n\nWhen multiple configs exist: **Global → Project → Local**, each layer overrides the one above for sections it defines.\n\n## Commands\n\n### `sarj create [name] [flags]`\n\nCreate a worktree with optional tmux session.\n\n| Flag | Description |\n|------|-------------|\n| `-b, --base \u003cbranch\u003e` | Base branch (default: auto-detect) |\n| `--no-setup` | Skip setup command |\n| `--no-symlinks` | Skip symlinking |\n| `--no-tmux` | Skip tmux session |\n| `--no-attach` | Create session but don't attach |\n\n### `sarj delete \u003cname\u003e [flags]`\n\nRemove a worktree and kill its tmux session.\n\n| Flag | Description |\n|------|-------------|\n| `-D, --delete-branch` | Delete the branch (no prompt) |\n| `--keep-branch` | Keep the branch (no prompt) |\n\n### `sarj list`\n\nList worktrees with branch and tmux session status.\n\n### `sarj init [--global | --local]`\n\nGenerate a config file with commented defaults.\n\n## Shell completions\n\nsarj supports bash, zsh, and fish. Run `sarj completion \u003cshell\u003e --help` for setup instructions.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmks%2Fsarj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidmks%2Fsarj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmks%2Fsarj/lists"}