pbakaus/impeccable · info
Available commands: {}
Error message
Available commands: {}
What it means
Companion message to the unknown-command rejection in `pin`: alongside 'Unknown command: {}', the run() function prints the authoritative list of valid command names from VALID_COMMANDS before returning exit code 1. It is informational output on the same failure path, not an independent failure.
Source
Thrown at crates/context/src/pin.rs:228
}
serde_json::from_str(COMMAND_METADATA_JSON).unwrap_or(serde_json::Value::Object(Default::default()))
}
pub fn run(args: &[String], io: &mut Io) -> i32 {
let action = args.first().cloned();
let command = args.get(1).cloned();
let (Some(action), Some(command)) = (action.filter(|a| !a.is_empty()), command.filter(|c| !c.is_empty())) else {
io.out("Usage: impeccable pin <pin|unpin> <command>\n");
io.out(&format!("\nAvailable commands: {}\n", VALID_COMMANDS.join(", ")));
return 1;
};
if action != "pin" && action != "unpin" {
io.err(&format!("Unknown action: {}. Use 'pin' or 'unpin'.\n", action));
return 1;
}
if !VALID_COMMANDS.contains(&command.as_str()) {
io.err(&format!("Unknown command: {}\n", command));
io.err(&format!("Available commands: {}\n", VALID_COMMANDS.join(", ")));
return 1;
}
let cwd = io.cwd.to_string_lossy().into_owned();
let root = find_project_root(&cwd);
if action == "pin" {
let metadata = load_metadata(io);
let harness_dirs = find_harness_dirs(&root);
let opencode_commands_dirs = find_opencode_commands_dirs(&root, io, false);
if harness_dirs.is_empty() && opencode_commands_dirs.is_empty() {
io.out("No harness directories with impeccable installed found.\n");
return 0;
}
let mut created = 0;
// OpenCode is handled separately below because its shortcut format is
// a slash command, not a SKILL.md. Excluding it from the skill loop
// prevents a duplicate `.opencode/skills/<cmd>/SKILL.md` that OpenCode
// would never surface as `/<cmd>`.
for skills_dir in &harness_dirs {View on GitHub (pinned to 2bc2879276)
Solutions
- Copy a command name verbatim from this list and re-run the pin/unpin action.
- List VALID_COMMANDS in this crate's source if you need to script against it programmatically.
Example fix
// before pin 'reindex' // not in list // after pin 'index' // one of the commands printed by this message
Defensive patterns
Strategy: validation
Validate before calling
// capture stderr, parse the available commands, and diff against the attempted one
const m = stderr.match(/Available commands: (.+)/);
if (m && !m[1].split(', ').includes(cmd)) console.warn(`${cmd} not supported`); Type guard
null
Try / catch
if (exitCode === 1 && stderr.includes('Available commands:')) {
const valid = stderr.match(/Available commands: (.+)/)[1].split(', ');
// pick from `valid` and retry
} Prevention
- Treat this line as the source of truth for supported commands
- Re-check the list after upgrading the tool
- Never hardcode command names without verifying against this output
When it happens
Trigger: Emitted whenever the command argument fails the VALID_COMMANDS containment check during a pin/unpin action.
Common situations: Same as the unknown-command case: typos, renamed commands, or scripting with stale names; the developer sees this line to learn which commands are accepted.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- invalid session id: ${id}
- build-phase: finish --disposition ship|fix|rebuild|recapture
- comp-spec: cannot read regions {rf}: {e}
- embed-prompt: malformed PNG
- Unknown command: {}
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/60d74f8a4770b592.
Report an issue: GitHub.