Rich-formatted error hints for common CLI failure modes.
Functions
hint_no_config
Return a suggestion when no config file is found.
Source code in src/openjarvis/cli/hints.py
| def hint_no_config() -> str:
"""Return a suggestion when no config file is found."""
return (
"[yellow]Hint:[/yellow] No config file found.\n"
" Run [bold]jarvis init[/bold] to detect hardware and generate "
"[cyan]~/.openjarvis/config.toml[/cyan].\n"
" Or run [bold]jarvis quickstart[/bold] for a guided setup."
)
|
hint_no_engine
hint_no_engine(engine_name: Optional[str] = None) -> str
Return a suggestion when the inference engine is unreachable.
Source code in src/openjarvis/cli/hints.py
| def hint_no_engine(engine_name: Optional[str] = None) -> str:
"""Return a suggestion when the inference engine is unreachable."""
name = engine_name or "ollama"
return (
f"[yellow]Hint:[/yellow] Engine '{name}' is not reachable.\n"
f" Make sure the {name} server is running.\n"
" Run [bold]jarvis doctor[/bold] to check all engines.\n"
" Run [bold]jarvis quickstart[/bold] for guided setup."
)
|
hint_no_model
hint_no_model(model_name: Optional[str] = None) -> str
Return a suggestion when no model is available.
Source code in src/openjarvis/cli/hints.py
| def hint_no_model(model_name: Optional[str] = None) -> str:
"""Return a suggestion when no model is available."""
if model_name:
return (
f"[yellow]Hint:[/yellow] Model '{model_name}' not found.\n"
f" Try: [bold]ollama pull {model_name}[/bold]\n"
" Run [bold]jarvis model list[/bold] to see available models."
)
return (
"[yellow]Hint:[/yellow] No models available.\n"
" Pull a model first: [bold]ollama pull qwen3.5:3b[/bold]\n"
" Run [bold]jarvis model list[/bold] to see available models."
)
|