The Aether Inquiry spell creates a bridge to an AI oracle powered by OpenAI's GPT-4 model, enabling interactive conversations, code analysis, and file system exploration. It features conversation persistence, file analysis capabilities, and multiple export formats for generated content.
Multiple export formats supported:
- Spell Files (.spell): Stored in .tome directory
- Bash Scripts (.sh): Executable shell scripts
- Python Scripts (.py): Python source files
- Markdown (.md): Documentation format
- Text Files (.txt): Plain text exports
__requires__ = ['click', 'openai']
OPENAI_API_KEY
: Required for AI functionalitySANCTUM_PATH
: Base path for storage locations~/.sanctum/
└── .aether/
├── Inquiry-{timestamp}.md # Saved conversations
└── directory_contents_{timestamp}.md # Directory analyses
# Basic invocation
cast ai
# File analysis
cast ai path/to/file.py
# Directory analysis
cast ai path/to/directory
# Multiple files
cast ai file1.py file2.py directory1
During an active session:
quit: Exit and save conversation (optional)
bash
You: quit
Save this conversation? [y/N]:
scribe: Export last response
bash
You: scribe
Save as (yaml, python, bash, markdown, copy):
Enter name for file:
$ cast ai
You: I need a spell that can set a timer for 5 minutes
mAGI: Certainly! I shall conjure a spell named `temporal_timer` that sets a countdown timer for 5 minutes.
```yaml
name: temporal_timer
description: A spell that manipulates time by setting a countdown timer for 5 minutes, alerting you when the time has elapsed.
type: script
shell_type: python
requires:
- click
code: |
#!/usr/bin/env python3
import click
import time
@click.command()
@click.option('--minutes', default=5, help='Number of minutes for the timer.')
def timer(minutes):
"""Start a countdown timer for the specified number of minutes."""
total_seconds = minutes * 60
click.echo(f"Starting a {minutes}-minute timer...")
for remaining in range(total_seconds, 0, -1):
mins, secs = divmod(remaining, 60)
timeformat = '{:02d}:{:02d}'.format(mins, secs)
print(f"Time left: {timeformat}", end='\r')
time.sleep(1)
click.echo("\nTime's up!")
if __name__ == '__main__':
timer()
### Step 3: Save Configuration
```bash
You: scribe
Save as (yaml, python, bash, markdown, copy): yaml
Enter name for YAML file (without extension): timer
YAML configuration saved as timer.yaml
$ cast sc timer.yaml
» Adding: spell\main.py
» Adding: spell\spell.yaml
- Adding files to bundle:
Adding: spell\main.py
Adding: spell\spell.yaml
- Generating sigil at: [path]/temporal_timer_sigil.svg
✨ Spell crafted successfully: [path]/temporal_timer.spell
$ cast temporal_timer
Starting a 5-minute timer...
Time left: 05:00
[...]
Time left: 00:01
Time's up!
You: scribe
Save as (yaml, python, bash, markdown, copy): yaml
Enter name for YAML file (without extension): spell_name
You: scribe
Save as (yaml, python, bash, markdown, copy): python
Enter name for Python file (without extension): script_name
You: scribe
Save as (yaml, python, bash, markdown, copy): bash
Enter name for Bash file (without extension): script_name
You: scribe
Save as (yaml, python, bash, markdown, copy): markdown
Enter name for Markdown file (without extension): doc_name
You: scribe
Save as (yaml, python, bash, markdown, copy): copy
Enter name for text file (without extension): text_name
~/.sanctum/.tome/
cast ai complex_module.py
You: Can you explain the main algorithms in this code?
You: What are potential optimization opportunities?
cast ai ./project_directory
You: What's the overall architecture?
You: Are there any potential security issues?
cast ai
You: Help me write a script to process log files
# Review response
You: scribe
# Save as Python script
scribe
to save useful code or information