jdx/mise · error
No tool specified and not running interactively
Error message
No tool specified and not running interactively
What it means
`mise use` with no tool arguments launches an interactive selector (tool_selector) when it can prompt the user. If stderr is not attended (no TTY, e.g. CI, piped scripts), the selector cannot run, so mise bails asking the caller to name a tool.
Solutions
- Specify the tool explicitly: `mise use node@22` instead of bare `mise use`.
- Ensure stderr is a TTY if interaction is intended (run it in a real terminal).
- Use `mise ls` non-interactively to decide which tool to pin in a script, then pass it.
Example fix
// before (CI script) mise use // after mise use node@22 terraform@1.9
Defensive patterns
Strategy: fallback
Validate before calling
if [ -t 2 ]; then mise use; else mise use <tool>@<version>; fi
Try / catch
if ! mise use 2>/dev/null; then echo 'non-interactive: specify tools explicitly' mise use node@22 fi
Prevention
- Never run bare `mise use` in CI or scripts; always pass tool@version
- Detect TTY before invoking interactive commands
- Use `mise ls` to script tool selection instead of the interactive picker
When it happens
Trigger: Running bare `mise use` (no tool args) in a non-interactive context: CI pipelines, `mise use < script`, piped stderr, docker build RUN steps, or output redirected away from a terminal.
Common situations: CI config mistakenly running plain `mise use`; scripts that expect `mise use` to be a no-op; copy-pasting interactive instructions into automation.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- not connected: choose --sync manual, --sync sync, or --sync…
- a branch name is required
- a glob is required
- a repository preview directory requires a dry run
- a repository url is required
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3c92940e206126eb.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/use.rs:514
style("mise").green(),
style(&path).cyan().for_stderr(),
);
}
if !remove.is_empty() {
let tools_to_remove = remove.iter().map(|r| r.to_string()).join(", ");
miseprintln!(
"{} {} removed: {tools_to_remove}",
style("mise").green(),
style(&path).cyan().for_stderr(),
);
}
}
Ok(())
}
async fn tool_selector(&self) -> Result<ToolArg> {
if !console::user_attended_stderr() {
bail!("No tool specified and not running interactively");
}
let theme = crate::ui::theme::get_theme();
let mut s = demand::Select::new("Tools")
.description("Select a tool to install")
.filtering(true)
.filterable(true)
.theme(&theme);
for tool in crate::tool_catalog::search("")
.await
.into_iter()
.filter(|tool| tool.selectable())
.unique_by(|tool| tool.canonical_id().to_string())
{
let id = tool.canonical_id().to_string();
let description = tool.selector_description().to_string();
s = s.option(demand::DemandOption::new(id).description(&description));
}
ctrlc::show_cursor_after_ctrl_c();View on GitHub (pinned to 533346cc37)