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
64
65
66
67
68
69
70
71
|
# File 'lib/generators/glancer/install/install_generator.rb', line 26
def show_readme
info = "\e[32m"
warn = "\e[33m"
debug = "\e[36m"
error = "\e[31m"
reset = "\e[0m"
say <<~MSG
#{info}╔════════════════════════════════════════════════════════════════════╗
║ ✔ Glancer installed successfully! ✔ ║
╚════════════════════════════════════════════════════════════════════╝#{reset}
#{debug}Next steps:#{reset}
#{warn}1. Review and customize the configuration:#{reset}
├── File: #{debug}config/initializers/glancer.rb#{reset}
└── You can set:
✔ Adapter
✔ Read-only DB
✔ LLM provider
✔ Logging options
✔ ...
#{warn}2. Edit the context file (optional but recommended):#{reset}
├── File: #{debug}config/glancer/llm_context.glancer.md#{reset}
├── Currently ignored (first line is '#{error}--glancer-ignore#{reset}')
└── Remove or modify first line to enable indexing.
Use it to describe:
✔ Business rules
✔ Table usage
✔ Domain logic
✔ ...
#{warn}3. Apply the database migrations:#{reset}
└── Run: #{info}rails db:migrate#{reset}
#{warn}4. Index your schema, models, and context:#{reset}
├── Run: #{info}rails glancer:index:all#{reset}
└── #{info}✱#{reset} Or do it separately
├── Run: #{info}rails glancer:index:schema#{reset}
├── Run: #{info}rails glancer:index:context#{reset}
└── Run: #{info}rails glancer:index:models#{reset}
MSG
end
|