Skip to content

Commit d4106a2

Browse files
committed
docs: use bash -c "$(curl)" pattern for install script
curl | bash replaces stdin with the pipe β€” TUI apps like claude can't get a real terminal fd even with /dev/tty workarounds. bash -c "$(curl)" downloads the script first via subshell substitution so stdin stays as the terminal throughout. Same pattern as Homebrew.
1 parent f411d51 commit d4106a2

2 files changed

Lines changed: 51 additions & 59 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Running coding agents in tmux? remobi lets you monitor and control them from you
3737
## Install
3838

3939
```bash
40-
curl -fsSL https://raw.githubusercontent.com/connorads/remobi/refs/heads/main/install.sh | bash
40+
/bin/bash -c "$(curl -fsSL http://remobi.app/install.sh)"
4141
```
4242

4343
Installs the setup skill, picks your coding agent, and walks you through the full setup interactively.

β€Žinstall.shβ€Ž

Lines changed: 50 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,66 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
# Wrap in a function so bash reads the entire script from stdin before executing.
5-
# Without this, `curl | bash` breaks when we redirect stdin to /dev/tty.
6-
main() {
7-
# Redirect stdin to the terminal only when piped (e.g. curl | bash).
8-
# When run directly, keep the inherited fd β€” TUI apps like claude need it untouched.
9-
if [ ! -t 0 ]; then
10-
exec < /dev/tty
11-
fi
4+
# Run with: /bin/bash -c "$(curl -fsSL http://remobi.app/install.sh)"
5+
# The $() substitution downloads the script first, so stdin stays as the terminal.
6+
# This is the same pattern Homebrew uses β€” TUI apps like claude need real terminal stdin.
127

13-
echo ""
14-
echo " remobi β€” your terminal, everywhere"
15-
echo " https://github.com/connorads/remobi"
16-
echo ""
17-
echo " This script will:"
18-
echo " 1. Install the remobi setup skill (via npx skills)"
19-
echo " 2. Ask which coding agent you use"
20-
echo " 3. Start an interactive agent session that walks you through setup"
21-
echo ""
22-
read -r -p "Press Enter to continue..."
23-
24-
# ── Install the remobi-setup skill ────────────────────────────────────────
25-
26-
echo ""
27-
echo "Installing the remobi setup skill..."
28-
echo ""
29-
npx skills add connorads/remobi
30-
echo ""
8+
echo ""
9+
echo " remobi β€” your terminal, everywhere"
10+
echo " https://github.com/connorads/remobi"
11+
echo ""
12+
echo " This script will:"
13+
echo " 1. Install the remobi setup skill (via npx skills)"
14+
echo " 2. Ask which coding agent you use"
15+
echo " 3. Start an interactive agent session that walks you through setup"
16+
echo ""
17+
read -r -p "Press Enter to continue..."
3118

32-
# ── Pick a coding agent ───────────────────────────────────────────────────
19+
# ── Install the remobi-setup skill ──────────────────────────────────────────
3320

34-
echo "Which coding agent do you use?"
35-
echo " 1) Claude Code"
36-
echo " 2) Codex"
37-
printf "Choose [1-2]: "
38-
read -r choice
21+
echo ""
22+
echo "Installing the remobi setup skill..."
23+
echo ""
24+
npx skills add connorads/remobi
25+
echo ""
3926

40-
case "$choice" in
41-
1) agent="claude" ;;
42-
2) agent="codex" ;;
43-
*)
44-
echo "Invalid choice. Exiting."
45-
exit 1
46-
;;
47-
esac
27+
# ── Pick a coding agent ─────────────────────────────────────────────────────
4828

49-
# ── Check the agent is installed ──────────────────────────────────────────
29+
echo "Which coding agent do you use?"
30+
echo " 1) Claude Code"
31+
echo " 2) Codex"
32+
printf "Choose [1-2]: "
33+
read -r choice
5034

51-
if ! command -v "$agent" > /dev/null 2>&1; then
52-
echo ""
53-
echo "Error: '$agent' is not installed."
54-
echo ""
55-
case "$agent" in
56-
claude) echo " curl -fsSL https://claude.ai/install.sh | bash" ;;
57-
codex) echo " npm install -g @openai/codex" ;;
58-
esac
59-
echo ""
60-
echo "Install it, then re-run this script."
35+
case "$choice" in
36+
1) agent="claude" ;;
37+
2) agent="codex" ;;
38+
*)
39+
echo "Invalid choice. Exiting."
6140
exit 1
62-
fi
41+
;;
42+
esac
6343

64-
# ── Launch interactive setup session ──────────────────────────────────────
44+
# ── Check the agent is installed ────────────────────────────────────────────
6545

46+
if ! command -v "$agent" > /dev/null 2>&1; then
6647
echo ""
67-
echo "Starting $agent with the remobi-setup skill..."
48+
echo "Error: '$agent' is not installed."
6849
echo ""
50+
case "$agent" in
51+
claude) echo " curl -fsSL https://claude.ai/install.sh | bash" ;;
52+
codex) echo " npm install -g @openai/codex" ;;
53+
esac
54+
echo ""
55+
echo "Install it, then re-run this script."
56+
exit 1
57+
fi
58+
59+
# ── Launch interactive setup session ────────────────────────────────────────
6960

70-
# exec replaces this shell with the agent process, giving it full terminal control
71-
exec "$agent" "Use the remobi-setup skill to onboard me."
72-
}
61+
echo ""
62+
echo "Starting $agent with the remobi-setup skill..."
63+
echo ""
7364

74-
main "$@"
65+
# exec replaces this shell with the agent process, giving it full terminal control
66+
exec "$agent" "Use the remobi-setup skill to onboard me."

0 commit comments

Comments
Β (0)