Skip interactive setup wizard in non-TTY environments#353
Conversation
When the install script runs without a terminal (e.g. from Claude Code, CI, or piped input), the interactive setup wizard hangs on TUI prompts. Detect non-TTY and run `basecamp setup claude` non-interactively instead, which installs the agent skill, Claude plugin, and marketplace registration without prompts. Auth remains the only manual step. Also adds BASECAMP_SKIP_SETUP=1 env var for explicit opt-out when a TTY is present.
There was a problem hiding this comment.
Pull request overview
This PR adds automatic detection of non-interactive environments to the Basecamp CLI install script, preventing the script from hanging when run via piped input (e.g., in Claude Code). It implements conditional logic that skips the interactive setup wizard in non-TTY environments or when explicitly skipped via the BASECAMP_SKIP_SETUP=1 environment variable, while maintaining unchanged behavior for normal terminal installations.
Changes:
- Add TTY detection to conditionally skip interactive setup wizard based on terminal availability
- Introduce
BASECAMP_SKIP_SETUPenvironment variable for explicit opt-out - Run non-interactive
basecamp setup claudecommand in non-TTY environments - Provide next-step instructions pointing to
basecamp auth loginfor manual authentication - Document the auto-detection behavior and environment variable in install.md
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/install.sh | Implement conditional setup logic with TTY detection and environment variable support |
| install.md | Document non-interactive detection and BASECAMP_SKIP_SETUP environment variable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/install.sh">
<violation number="1" location="scripts/install.sh:339">
P2: Don’t suppress and ignore failures from `basecamp setup claude`. If this command fails, users will be told install succeeded even though the skill/plugin setup didn’t run, and there’s no stderr to diagnose it.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Remove 2>/dev/null so failures from 'basecamp setup claude' are visible and diagnosable. Keep || true since the agent setup is best-effort — the binary install already succeeded at this point.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When someone asks Claude Code to install the Basecamp CLI via
curl -fsSL https://basecamp.com/install-cli | bash, the install script hangs — it unconditionally runsbasecamp setupat the end, which launches an interactive wizard with TUI pickers, browser OAuth, and confirmation prompts that can't work without a terminal.Ref: https://3.basecamp.com/2914079/buckets/46292715/card_tables/cards/9706904758
Changes
scripts/install.shbasecamp setup claudenon-interactively instead, which installs the agent skill + Claude plugin + marketplace registration without promptsBASECAMP_SKIP_SETUP=1env var for explicit opt-out even when a TTY is presentbasecamp auth logininstall.mdBASECAMP_SKIP_SETUPenv varHow it works
The install script already had TTY detection for the banner animation. This extends that pattern to the setup step:
BASECAMP_SKIP_SETUP=1basecamp setup claudenon-interactivelybasecamp setupwizard (unchanged)basecamp setup claudenon-interactivelyAfter the install script finishes in a non-TTY environment, Claude Code has:
~/.agents/skills/basecamp/SKILL.md~/.claude/skills/basecampbasecamp auth loginin a terminalTesting
Future consideration: OAuth within coding agents
The one remaining manual step is
basecamp auth login, which requires a terminal because the OAuth flow either opens a browser (local mode) or blocks on stdin waiting for a pasted callback URL (remote mode). Neither works inside a coding agent's bash tool.A potential improvement would be splitting the remote auth flow into two non-interactive commands:
This would let a coding agent orchestrate the flow conversationally — show the URL, ask the user to paste the callback URL back in chat, then finish the exchange. Today this isn't possible because
--remotebundles both steps into a single blocking process.Not in scope for this PR, but worth considering as agent-driven installs become more common.