jdx/mise · error
--stdin reads the value from stdin; do not provide a value…
Error message
--stdin reads the value from stdin; do not provide a value with KEY=VALUE syntax
What it means
When --stdin is used, the value must come exclusively from standard input. If the user also supplies KEY=VALUE syntax, the value field is already populated, which is contradictory, so mise bails before reading stdin.
Solutions
- Drop the =value part: `echo value | mise set --stdin KEY`
- Drop --stdin if you want the inline value: `mise set KEY=value`
Example fix
// before mise set --stdin API_KEY=abc123 # error // after mise set API_KEY=abc123 # or: echo abc123 | mise set --stdin API_KEY
Defensive patterns
Strategy: validation
Validate before calling
[[ "$1" != *=* ]] || { echo 'with --stdin pass only KEY, not KEY=VALUE'; exit 1; } Prevention
- Never mix inline values with --stdin
- Choose one form per invocation: pipe or inline
When it happens
Trigger: `mise set --stdin KEY=value` — providing an inline value together with the --stdin flag.
Common situations: Copy-pasting a normal `mise set KEY=value` command and appending --stdin; scripted commands mixing both forms.
Understand the failure class
Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.
Related errors
- --stdin requires exactly one environment variable key
- Environment variable
- failed to open the editor
- has no value
- not connected: stdin ended before an answer; choose --sync…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/e57857cd4e7455ac.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/set.rs:192
if ev.value.is_none() {
let prompt_msg = format!("Enter value for {}", ev.key);
let value = Input::new(&prompt_msg)
.password(self.age_encrypt) // Mask input if encrypting
.theme(&theme)
.run()?;
ev.value = Some(value);
}
}
}
// Read value from stdin if requested
if self.stdin {
if env_vars.len() != 1 {
bail!("--stdin requires exactly one environment variable key");
}
let ev = &mut env_vars[0];
if ev.value.is_some() {
bail!(
"--stdin reads the value from stdin; do not provide a value with KEY=VALUE syntax"
);
}
let mut value = String::new();
std::io::stdin().read_to_string(&mut value)?;
// Strip a single trailing newline (matches `gh secret set` behavior)
if value.ends_with("\r\n") {
value.truncate(value.len() - 2);
} else if value.ends_with('\n') {
value.truncate(value.len() - 1);
}
ev.value = Some(value);
}
// Handle age encryption if requested
if self.age_encrypt {
Settings::get().ensure_experimental("age encryption")?;
// Collect recipients once before the loop to avoid repeated I/OView on GitHub (pinned to 533346cc37)