Quickstart: wizards
Run a built-in interactive wizard to guide you through common development tasks.
from attune.wizards import DebugWizard
wizard = DebugWizard()
result = wizard.run({"error_message": "ImportError: No module named 'requests'"})
print(f"Debugging complete: {result.success}")
Prerequisites
- Attune AI installed locally
- Python environment with the attune package available
Run your first wizard
- Choose a built-in wizard. Start with
DebugWizardfor troubleshooting errors:
from attune.wizards import DebugWizard
wizard = DebugWizard()
- Run the wizard with context. Provide an initial context like an error message or code snippet:
result = wizard.run({"error_message": "ModuleNotFoundError: No module named 'pandas'"})
- Check the results. The wizard returns a
WizardResultwith guidance and next steps:
print(f"Success: {result.success}")
print(f"Generated guidance: {result.generated_output}")
print(f"Steps completed: {result.steps_completed}")
Expected output:
Success: True
Generated guidance: Install pandas using: pip install pandas
Steps completed: ['analyze_error', 'suggest_fix', 'verify_solution']
Next steps
Next: Browse available wizards with list_wizards() to see RefactorWizard, SecurityWizard, and TestGenWizard options.