Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cmux-conjure
# cmuxup

> One command to conjure your terminal-first agentic workspace in [cmux](https://cmux.com).
> One command to cmuxup your terminal-first agentic workspace in [cmux](https://cmux.com).

`conjure` builds a full IDE-like layout in cmux using its **control socket API** — no AppleScript, no keystroke timing, reproducible every run.
`cmuxup` builds a full IDE-like layout in cmux using its **control socket API** — no AppleScript, no keystroke timing, reproducible every run.

```
┌──────────────┬───────────────────────┐
Expand All @@ -21,7 +21,7 @@
## Install

```bash
curl -fsSL https://raw.githubusercontent.com/ITZSHOAIB/cmux-conjure/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/ITZSHOAIB/cmuxup/main/install.sh | bash
```

The interactive installer (powered by [gum](https://github.com/charmbracelet/gum)) will ask you to choose:
Expand All @@ -38,10 +38,10 @@ It installs and configures: `lazygit`, `delta`, `helix`, `yazi`, `starship`, `zo
## Usage

```bash
conjure ~/my-project
cmuxup ~/my-project
```

Open a new shell after installing, then run `conjure` from anywhere.
Open a new shell after installing, then run `cmuxup` from anywhere.

## What opens

Expand All @@ -57,10 +57,10 @@ Open a new shell after installing, then run `conjure` from anywhere.
Override any pane command without reinstalling:

```bash
CONJURE_MAIN_CMD="opencode" conjure ~/my-project
CONJURE_LG_CMD="tig" conjure ~/my-project
CONJURE_HX_CMD="nvim ." conjure ~/my-project
CONJURE_DEV_CMD="yarn dev" conjure ~/my-project
CMUXUP_MAIN_CMD="opencode" cmuxup ~/my-project
CMUXUP_LG_CMD="tig" cmuxup ~/my-project
CMUXUP_HX_CMD="nvim ." cmuxup ~/my-project
CMUXUP_DEV_CMD="yarn dev" cmuxup ~/my-project
```

## Config templates
Expand All @@ -80,11 +80,11 @@ All configs live in `templates/` and use `{{PLACEHOLDER}}` substitution. Edit th
## Non-interactive install (CI / scripting)

```bash
CONJURE_NON_INTERACTIVE=1 \
CONJURE_THEME="Catppuccin Mocha" \
CONJURE_FONT_SIZE=14 \
CONJURE_AGENT=claude \
CONJURE_EDITOR=helix \
CMUXUP_NON_INTERACTIVE=1 \
CMUXUP_THEME="Catppuccin Mocha" \
CMUXUP_FONT_SIZE=14 \
CMUXUP_AGENT=claude \
CMUXUP_EDITOR=helix \
bash install.sh
```

Expand Down
38 changes: 19 additions & 19 deletions bin/conjure → bin/cmuxup
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

VERSION="0.1.0"

# conjure [/path/to/project]
# cmuxup [/path/to/project]
#
# Builds a terminal-first agentic IDE layout in cmux via its control socket.
# No AppleScript, no keystroke timing — pure cmux socket API.
Expand All @@ -16,14 +16,14 @@ VERSION="0.1.0"
# └──────────────┴───────────────────────┘
#
# Env overrides:
# CONJURE_MAIN_CMD default: claude
# CONJURE_LG_CMD default: lazygit
# CONJURE_HX_CMD default: hx .
# CONJURE_DEV_CMD default: (empty — just cd's into project)
# CMUXUP_MAIN_CMD default: claude
# CMUXUP_LG_CMD default: lazygit
# CMUXUP_HX_CMD default: hx .
# CMUXUP_DEV_CMD default: (empty — just cd's into project)

usage() {
cat <<EOF
Usage: conjure [options] [/path/to/project]
Usage: cmuxup [options] [/path/to/project]

Conjure a terminal-first agentic workspace in cmux.

Expand All @@ -35,15 +35,15 @@ Options:
--version, -v Print version

Layout:
Left pane — main agent (CONJURE_MAIN_CMD, default: claude)
Left pane — main agent (CMUXUP_MAIN_CMD, default: claude)
Right-top pane — two tabs: lazygit + helix editor
Right-bottom — dev terminal

Env overrides:
CONJURE_MAIN_CMD Command for the left pane (default: claude)
CONJURE_LG_CMD Command for lazygit tab (default: lazygit)
CONJURE_HX_CMD Command for helix tab (default: hx .)
CONJURE_DEV_CMD Command for dev terminal (default: empty)
CMUXUP_MAIN_CMD Command for the left pane (default: claude)
CMUXUP_LG_CMD Command for lazygit tab (default: lazygit)
CMUXUP_HX_CMD Command for helix tab (default: hx .)
CMUXUP_DEV_CMD Command for dev terminal (default: empty)
EOF
}

Expand All @@ -56,15 +56,15 @@ export CMUX_QUIET=1

PROJECT_DIR="${1:-$PWD}"
if ! PROJECT_DIR="$(cd "$PROJECT_DIR" 2>/dev/null && pwd)"; then
echo "conjure: '${1:-$PWD}' is not a directory" >&2
echo "cmuxup: '${1:-$PWD}' is not a directory" >&2
exit 1
fi
NAME="$(basename "$PROJECT_DIR")"

MAIN_CMD="${CONJURE_MAIN_CMD:-claude}"
LG_CMD="${CONJURE_LG_CMD:-lazygit}"
HX_CMD="${CONJURE_HX_CMD:-hx .}"
DEV_CMD="${CONJURE_DEV_CMD:-}"
MAIN_CMD="${CMUXUP_MAIN_CMD:-claude}"
LG_CMD="${CMUXUP_LG_CMD:-lazygit}"
HX_CMD="${CMUXUP_HX_CMD:-hx .}"
DEV_CMD="${CMUXUP_DEV_CMD:-}"

CMUX_BIN="$(command -v cmux 2>/dev/null || echo /Applications/cmux.app/Contents/Resources/bin/cmux)"
cx() { "$CMUX_BIN" "$@"; }
Expand All @@ -76,7 +76,7 @@ if ! cx ping >/dev/null 2>&1; then
cx ping >/dev/null 2>&1 && break
sleep 0.5
done
cx ping >/dev/null 2>&1 || { echo "conjure: cmux control socket not responding" >&2; exit 1; }
cx ping >/dev/null 2>&1 || { echo "cmuxup: cmux control socket not responding" >&2; exit 1; }
fi

# Parse the first "type:N" ref from stdin.
Expand All @@ -98,7 +98,7 @@ _run_in() { # surface workspace command

# 1. Create workspace; main pane launches the agent command.
WS="$(cx new-workspace --name "$NAME" --cwd "$PROJECT_DIR" --command "$MAIN_CMD" --focus true | _ref workspace)"
[ -n "$WS" ] || { echo "conjure: failed to create cmux workspace" >&2; exit 1; }
[ -n "$WS" ] || { echo "cmuxup: failed to create cmux workspace" >&2; exit 1; }

# 2. Identify the initial surface (the only one that exists right after creation).
MAIN_SURFACE="$(cx tree --workspace "$WS" | _ref surface)"
Expand Down Expand Up @@ -129,7 +129,7 @@ fi
# 8. Return focus to the agent pane on the left.
cx focus-panel --panel "$MAIN_SURFACE" --workspace "$WS" >/dev/null 2>&1 || true

echo "conjure: workspace '$NAME' ready ($WS)"
echo "cmuxup: workspace '$NAME' ready ($WS)"
echo " left $MAIN_CMD"
echo " right-top lazygit | helix (tabs)"
echo " right-bottom dev terminal"
84 changes: 42 additions & 42 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

# conjure-cmux installer
# Usage: curl -fsSL https://raw.githubusercontent.com/ITZSHOAIB/cmux-conjure/main/install.sh | bash
# cmuxup installer
# Usage: curl -fsSL https://raw.githubusercontent.com/ITZSHOAIB/cmuxup/main/install.sh | bash
# Or: bash install.sh [--help] [--dry-run]
#
# Non-interactive mode (for CI / testing):
# CONJURE_NON_INTERACTIVE=1 skip all gum prompts, use env vars below
# CONJURE_THEME one of: "Catppuccin Mocha" | "TokyoNight Storm" | "Gruvbox Dark Hard" | "Kanagawa Wave"
# CONJURE_FONT_SIZE 13 | 14 | 15
# CONJURE_AGENT claude | opencode | codex | none
# CONJURE_EDITOR helix | nvim | vim
# CONJURE_OVERWRITE 1 = overwrite existing configs without prompting
# CMUXUP_NON_INTERACTIVE=1 skip all gum prompts, use env vars below
# CMUXUP_THEME one of: "Catppuccin Mocha" | "TokyoNight Storm" | "Gruvbox Dark Hard" | "Kanagawa Wave"
# CMUXUP_FONT_SIZE 13 | 14 | 15
# CMUXUP_AGENT claude | opencode | codex | none
# CMUXUP_EDITOR helix | nvim | vim
# CMUXUP_OVERWRITE 1 = overwrite existing configs without prompting

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERSION="0.1.0"
Expand All @@ -21,18 +21,18 @@ usage() {
cat <<EOF
Usage: bash install.sh [options]

Install cmux-conjure: a terminal-first agentic workspace setup for cmux.
Install cmuxup: a terminal-first agentic workspace setup for cmux.

Options:
--help, -h Show this help message
--dry-run Show what would be installed without making changes

Non-interactive env vars (set CONJURE_NON_INTERACTIVE=1):
CONJURE_THEME Theme name (default: Catppuccin Mocha)
CONJURE_FONT_SIZE Font size (default: 14)
CONJURE_AGENT AI agent command (default: claude)
CONJURE_EDITOR Editor for hx tab (default: helix)
CONJURE_OVERWRITE Overwrite existing configs (default: 0)
Non-interactive env vars (set CMUXUP_NON_INTERACTIVE=1):
CMUXUP_THEME Theme name (default: Catppuccin Mocha)
CMUXUP_FONT_SIZE Font size (default: 14)
CMUXUP_AGENT AI agent command (default: claude)
CMUXUP_EDITOR Editor for hx tab (default: helix)
CMUXUP_OVERWRITE Overwrite existing configs (default: 0)
EOF
}

Expand All @@ -57,15 +57,15 @@ _write_file() { # dest content
return
fi
mkdir -p "$(dirname "$dest")"
if [ -f "$dest" ] && [ "${CONJURE_OVERWRITE:-0}" != "1" ]; then
if [ "${CONJURE_NON_INTERACTIVE:-0}" = "1" ]; then
if [ -f "$dest" ] && [ "${CMUXUP_OVERWRITE:-0}" != "1" ]; then
if [ "${CMUXUP_NON_INTERACTIVE:-0}" = "1" ]; then
_skip "$dest already exists"
return
fi
if command -v gum >/dev/null 2>&1; then
gum confirm "Overwrite $dest?" || { _skip "$dest already exists"; return; }
else
_skip "$dest already exists (use CONJURE_OVERWRITE=1 to overwrite)"
_skip "$dest already exists (use CMUXUP_OVERWRITE=1 to overwrite)"
return
fi
fi
Expand Down Expand Up @@ -121,7 +121,7 @@ if ! command -v brew >/dev/null 2>&1; then
fi

# Bootstrap gum for the interactive UI (skip in dry-run or non-interactive).
if [ "${CONJURE_NON_INTERACTIVE:-0}" != "1" ] && [ "$DRY_RUN" -eq 0 ]; then
if [ "${CMUXUP_NON_INTERACTIVE:-0}" != "1" ] && [ "$DRY_RUN" -eq 0 ]; then
if ! command -v gum >/dev/null 2>&1; then
echo "Installing gum for the interactive UI..."
brew install gum >/dev/null 2>&1
Expand All @@ -130,17 +130,17 @@ fi

# ── Gather choices ────────────────────────────────────────────────────────────

if [ "${CONJURE_NON_INTERACTIVE:-0}" = "1" ] || [ "$DRY_RUN" -eq 1 ]; then
THEME="${CONJURE_THEME:-Catppuccin Mocha}"
FONT_SIZE="${CONJURE_FONT_SIZE:-14}"
AGENT="${CONJURE_AGENT:-claude}"
EDITOR_CHOICE="${CONJURE_EDITOR:-helix}"
if [ "${CMUXUP_NON_INTERACTIVE:-0}" = "1" ] || [ "$DRY_RUN" -eq 1 ]; then
THEME="${CMUXUP_THEME:-Catppuccin Mocha}"
FONT_SIZE="${CMUXUP_FONT_SIZE:-14}"
AGENT="${CMUXUP_AGENT:-claude}"
EDITOR_CHOICE="${CMUXUP_EDITOR:-helix}"
else
if command -v gum >/dev/null 2>&1; then
gum style \
--border double --border-foreground 212 \
--padding "1 4" --margin "1 0" \
--bold "cmux-conjure v${VERSION}" \
--bold "cmuxup v${VERSION}" \
"Terminal-first agentic workspace for cmux"

THEME="$(gum choose --header "Choose your theme:" \
Expand Down Expand Up @@ -190,7 +190,7 @@ _apply_template "$TEMPLATES/helix.toml" "${HOME}/.config/helix/config.t
_apply_template "$TEMPLATES/lazygit.yml" "${HOME}/Library/Application Support/lazygit/config.yml" "$THEME" "$FONT_SIZE" "$DELTA_THEME" "$HELIX_THEME"
_apply_template "$TEMPLATES/yazi.toml" "${HOME}/.config/yazi/yazi.toml" "$THEME" "$FONT_SIZE" "$DELTA_THEME" "$HELIX_THEME"
_apply_template "$TEMPLATES/starship.toml" "${HOME}/.config/starship.toml" "$THEME" "$FONT_SIZE" "$DELTA_THEME" "$HELIX_THEME"
_apply_template "$TEMPLATES/gitconfig-delta.ini" "${TMPDIR:-/tmp}/conjure-gitdelta.ini" "$THEME" "$FONT_SIZE" "$DELTA_THEME" "$HELIX_THEME"
_apply_template "$TEMPLATES/gitconfig-delta.ini" "${TMPDIR:-/tmp}/cmuxup-gitdelta.ini" "$THEME" "$FONT_SIZE" "$DELTA_THEME" "$HELIX_THEME"

# Merge delta git config (non-destructive: only sets keys not already present).
if [ "$DRY_RUN" -eq 0 ]; then
Expand All @@ -201,7 +201,7 @@ if [ "$DRY_RUN" -eq 0 ]; then
section=""
# We'll use git config --global directly.
true
done < "${TMPDIR:-/tmp}/conjure-gitdelta.ini"
done < "${TMPDIR:-/tmp}/cmuxup-gitdelta.ini"
git config --global core.pager "delta"
git config --global interactive.diffFilter "delta --color-only"
git config --global delta.navigate true
Expand All @@ -218,30 +218,30 @@ fi
# Write cmux.json settings if not already customized.
CMUX_JSON="${HOME}/.config/cmux/cmux.json"
if [ -f "$CMUX_JSON" ] && grep -q '"diffViewer"' "$CMUX_JSON" 2>/dev/null; then
_skip "cmux.json already has conjure settings"
_skip "cmux.json already has cmuxup settings"
else
_apply_template "$TEMPLATES/cmux-settings.jsonc" "$CMUX_JSON" "$THEME" "$FONT_SIZE" "$DELTA_THEME" "$HELIX_THEME"
fi

# ── Install conjure command ────────────────────────────────────────────────────
# ── Install cmuxup command ────────────────────────────────────────────────────

echo ""
_log "Installing conjure command..."
_log "Installing cmuxup command..."
INSTALL_DIR="${HOME}/.local/bin"
if [ "$DRY_RUN" -eq 1 ]; then
_dry "would install conjure to $INSTALL_DIR/conjure"
_dry "would install cmuxup to $INSTALL_DIR/cmuxup"
else
mkdir -p "$INSTALL_DIR"
cp "$SCRIPT_DIR/bin/conjure" "$INSTALL_DIR/conjure"
chmod +x "$INSTALL_DIR/conjure"
_ok "installed conjure to $INSTALL_DIR/conjure"
cp "$SCRIPT_DIR/bin/cmuxup" "$INSTALL_DIR/cmuxup"
chmod +x "$INSTALL_DIR/cmuxup"
_ok "installed cmuxup to $INSTALL_DIR/cmuxup"
fi

# ── Shell integration ─────────────────────────────────────────────────────────

ZSHRC="${HOME}/.zshrc"
SHELL_BLOCK='
# ── cmux-conjure shell integration ──────────────────────────────────────────
# ── cmuxup shell integration ──────────────────────────────────────────
export EDITOR="hx"
export VISUAL="hx"
eval "$(zoxide init zsh)"
Expand All @@ -257,11 +257,11 @@ function y() {
}
alias lg="lazygit"
alias e="hx"
# ── end cmux-conjure ─────────────────────────────────────────────────────────'
# ── end cmuxup ─────────────────────────────────────────────────────────'

if [ "$DRY_RUN" -eq 1 ]; then
_dry "would append shell integration to $ZSHRC"
elif grep -q "cmux-conjure shell integration" "$ZSHRC" 2>/dev/null; then
elif grep -q "cmuxup shell integration" "$ZSHRC" 2>/dev/null; then
_skip "shell integration already in $ZSHRC"
else
echo "$SHELL_BLOCK" >> "$ZSHRC"
Expand All @@ -271,10 +271,10 @@ fi
# ── Done ──────────────────────────────────────────────────────────────────────

echo ""
if command -v gum >/dev/null 2>&1 && [ "$DRY_RUN" -eq 0 ] && [ "${CONJURE_NON_INTERACTIVE:-0}" != "1" ]; then
gum style --foreground 212 --bold "conjure is ready."
gum style "Open a new shell and run: conjure ~/your-project"
if command -v gum >/dev/null 2>&1 && [ "$DRY_RUN" -eq 0 ] && [ "${CMUXUP_NON_INTERACTIVE:-0}" != "1" ]; then
gum style --foreground 212 --bold "cmuxup is ready."
gum style "Open a new shell and run: cmuxup ~/your-project"
else
echo "conjure is ready."
echo "Open a new shell and run: conjure ~/your-project"
echo "cmuxup is ready."
echo "Open a new shell and run: cmuxup ~/your-project"
fi
2 changes: 1 addition & 1 deletion templates/ghostty.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ghostty terminal config — managed by cmux-conjure
# Ghostty terminal config — managed by cmuxup
# Edit manually or re-run install.sh to regenerate.
# After editing: cmux reload-config

Expand Down
2 changes: 1 addition & 1 deletion templates/helix.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Helix editor config — managed by cmux-conjure
# Helix editor config — managed by cmuxup
theme = "{{HELIX_THEME}}"

[editor]
Expand Down
2 changes: 1 addition & 1 deletion templates/lazygit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lazygit config — managed by cmux-conjure
# lazygit config — managed by cmuxup
git:
paging:
colorArg: always
Expand Down
2 changes: 1 addition & 1 deletion templates/yazi.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yazi file manager config — managed by cmux-conjure
# yazi file manager config — managed by cmuxup
[mgr]
ratio = [1, 3, 4]
sort_by = "natural"
Expand Down
Loading
Loading