Repository navigation
Expand file tree
/
Copy pathdemo_setup.py
More file actions
63 lines (50 loc) · 1.88 KB
/
Copy pathdemo_setup.py
File metadata and controls
63 lines (50 loc) · 1.88 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python3
"""
ScriptMate Demo Script
Demonstrates complete configuration and usage workflow
"""
import json
from pathlib import Path
def create_demo_config():
"""Create demo configuration"""
config_dir = Path.home() / '.scriptmate'
config_dir.mkdir(exist_ok=True)
demo_config = {
"api_key": "demo-api-key-12345",
"model_name": "gpt-3.5-turbo",
"base_url": "https://api.openai.com/v1",
"temperature": 0.1,
"max_tokens": 1000
}
config_file = config_dir / 'config.json'
with open(config_file, 'w', encoding='utf-8') as f:
json.dump(demo_config, f, indent=2, ensure_ascii=False)
print(f"✅ Demo configuration created: {config_file}")
return config_file
def show_demo_usage():
"""Show usage examples"""
print("\n🚀 ScriptMate Usage Demo:")
print("=" * 50)
examples = [
"scriptmate generate list files in current directory",
"scriptmate generate find all Python files",
"scriptmate generate show system memory usage",
"scriptmate generate create a new directory called test",
"scriptmate generate --dry-run delete temporary files"
]
for i, example in enumerate(examples, 1):
print(f"{i}. {example}")
print("\n📚 More commands:")
print("- scriptmate info # Show system information")
print("- scriptmate config show # Show configuration")
print("- scriptmate config test # Test configuration")
print("- scriptmate history # View history")
if __name__ == '__main__':
print("🎯 ScriptMate Demo Setup")
print("=" * 30)
# Create demo configuration
# config_file = create_demo_config()
# print(f"\n💡 Tip: Configuration file located at {config_file}")
# Show usage examples
show_demo_usage()
print("Now you can use ScriptMate commands!")