gitbutlerapp/gitbutler · error
Human input required - run this in a terminal, or specify…
Error message
Human input required - run this in a terminal, or specify --path/--detect to avoid interactive prompts.
What it means
`prompt_for_install_path` needs to interactively ask the user where to install skills. When stdout is not a promptable terminal (`out.can_prompt()` is false), it bails because human input is required, suggesting non-interactive flags instead.
Solutions
- Pass `--path <dir>` so no prompt is needed.
- Pass `--detect` to reuse an existing installation without prompting.
- Run the command directly in an interactive terminal.
Example fix
// before but skill install | tee install.log // error: Human input required... // after but skill install --path ~/.claude/skills/gitbutler | tee install.log
Defensive patterns
Strategy: validation
Validate before calling
# only run prompted install when a TTY is available if [ -t 0 ] && [ -t 1 ]; then but skill install; else but skill install --path ~/.claude/skills/gitbutler; fi
Try / catch
but skill install --path "$DIR" || echo "install failed; run in a terminal or pass --path/--detect"
Prevention
- Avoid piping `but skill install` output; it disables prompting.
- Check `[ -t 0 ]` before relying on interactive prompts.
- Prefer --path in any scripted context.
When it happens
Trigger: Running `but skill install` (human output but not promptable, e.g. output piped, stdin closed, or `yes | but skill install`) when `--path`/`--detect` were not provided and prompting would otherwise be needed.
Common situations: Piping CLI output (`but skill install | tee log`); running under CI with no TTY; wrapping the command in scripts that capture stdout.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- interactive mode requested, but there is no terminal to…
- Interactive setup requires a terminal. Use `but agent setup…
- Could not determine which forge provider to authenticate…
- No branches selected. Aborting.
- Selection aborted
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/26848d2eba362636.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but/src/command/skill/mod.rs:1033
None => Err(UserCancelled.into()),
}
}
/// Prompt user to select installation scope and format
fn prompt_for_install_path(
ctx: Option<&mut Context>,
global: bool,
out: &mut OutputChannel,
progress: &mut impl std::io::Write,
) -> Result<PathBuf> {
let t = theme::get();
if out.for_human().is_none() {
anyhow::bail!(
"No supported agent was detected. In non-interactive mode, specify --path or --detect. Use --path <path> to choose an installation directory, or --detect to update an existing installation."
);
}
if !out.can_prompt() {
anyhow::bail!(
"Human input required - run this in a terminal, or specify --path/--detect to avoid interactive prompts."
);
}
let local_scope_available = if !global {
match ctx.as_ref() {
Some(ctx) => {
let repo = ctx.repo.get()?;
repo.workdir().is_some()
}
None => false,
}
} else {
false
};
let mut input = out
.prepare_for_terminal_input()View on GitHub (pinned to 58e5313667)