-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathneuro
More file actions
42 lines (33 loc) · 969 Bytes
/
Copy pathneuro
File metadata and controls
42 lines (33 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
"""
Neuro - The Intent-Driven Language Interpreter
Usage: neuro <file.neuro>
"""
import sys
import os
from pathlib import Path
# Load environment variables from .env file if it exists
try:
from dotenv import load_dotenv
load_dotenv()
except ImportError:
pass # python-dotenv not required
# Add src to path
sys.path.insert(0, str(Path(__file__).parent / 'src'))
from neuro.interpreter import NeuroInterpreter
def main():
if len(sys.argv) < 2:
print("Neuro - The Intent-Driven Language")
print("Usage: neuro <file.neuro>")
print("\nExample:")
print(" neuro my_job_search.neuro")
sys.exit(1)
neuro_file = sys.argv[1]
if not os.path.exists(neuro_file):
print(f"Error: File '{neuro_file}' not found")
sys.exit(1)
# Interpret and execute
interpreter = NeuroInterpreter()
interpreter.run(neuro_file)
if __name__ == "__main__":
main()