-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquick-demo.sh
More file actions
executable file
·144 lines (128 loc) · 5.02 KB
/
Copy pathquick-demo.sh
File metadata and controls
executable file
·144 lines (128 loc) · 5.02 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
# ==========================================================================
# Library Insight — Quick Demo (3 min)
# ==========================================================================
# A concise walkthrough of the 12 most important commands.
# Great for onboarding, YouTube demos, and new user exploration.
#
# Requirements:
# - JDK 17+
# - library-insight installed:
# curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash
#
# Usage:
# chmod +x quick-demo.sh
# ./quick-demo.sh
# ==========================================================================
set -e
LIBRARY="com.squareup.retrofit2:retrofit:2.11.0"
LIBRARY_OLD="com.squareup.retrofit2:retrofit:2.9.0"
LIBRARY_NEW="com.squareup.retrofit2:retrofit:2.11.0"
SEP="=================================================="
echo ""
echo "$SEP"
echo " LIBRARY INSIGHT — QUICK DEMO (v1.3.0 Suite)"
echo "$SEP"
echo ""
# ------------------------------------------------------------------
# 1. SCAN
# ------------------------------------------------------------------
echo ">> 1. SCAN — Index compiled dependency API from Maven"
echo " library-insight scan $LIBRARY"
echo ""
library-insight scan $LIBRARY
echo ""
# ------------------------------------------------------------------
# 2. SCAN-SOURCE
# ------------------------------------------------------------------
echo ">> 2. SCAN-SOURCE — Index local raw Java & Kotlin source files"
echo " library-insight scan-source sample/src/main/kotlin"
echo ""
library-insight scan-source sample/src/main/kotlin
echo ""
# ------------------------------------------------------------------
# 3. SEARCH
# ------------------------------------------------------------------
echo ">> 3. SEARCH — Find class, methods, or sourceLocation annotations"
echo " library-insight search \"anno:Keep\""
echo ""
library-insight search "anno:Keep"
echo ""
# ------------------------------------------------------------------
# 4. EXPLAIN
# ------------------------------------------------------------------
echo ">> 4. EXPLAIN — Inspect class structure, source pointers, DSL scopes, & receivers"
echo " library-insight explain HtmlBuilder"
echo ""
library-insight explain HtmlBuilder
echo ""
# ------------------------------------------------------------------
# 5. DSL REPORT
# ------------------------------------------------------------------
echo ">> 5. DSL-REPORT — Kotlin DSL scopes, aliases, and extension receivers"
echo " library-insight dsl-report"
echo ""
library-insight dsl-report
echo ""
# ------------------------------------------------------------------
# 6. EXAMPLES
# ------------------------------------------------------------------
echo ">> 6. EXAMPLES — Generate usage patterns & extract guide examples"
echo " library-insight scan sample/build/libs/sample-1.1.0.jar --sources sample"
library-insight scan sample/build/libs/sample-1.1.0.jar --sources sample > /dev/null
echo " library-insight examples HtmlBuilder"
echo ""
library-insight examples HtmlBuilder
echo ""
# ------------------------------------------------------------------
# 7. HEALTH
# ------------------------------------------------------------------
echo ">> 7. HEALTH — Generate Package Health & API Complexity Report"
echo " library-insight health"
echo ""
library-insight health
echo ""
# ------------------------------------------------------------------
# 8. AUDIT
# ------------------------------------------------------------------
echo ">> 8. AUDIT — Scan dependencies for deprecated APIs recursively"
echo " library-insight audit"
echo ""
library-insight audit
echo ""
# ------------------------------------------------------------------
# 9. MIGRATE
# ------------------------------------------------------------------
echo ">> 9. MIGRATE — Get migration advisor report with replacements"
echo " library-insight migrate $LIBRARY_OLD $LIBRARY_NEW"
echo ""
library-insight migrate $LIBRARY_OLD $LIBRARY_NEW
echo ""
# ------------------------------------------------------------------
# 10. DEPENDENCY-CHECK
# ------------------------------------------------------------------
echo ">> 10. DEPENDENCY-CHECK — Scan classpath for Linkage/ABI conflicts"
echo " library-insight dependency-check"
echo ""
library-insight dependency-check
echo ""
# ------------------------------------------------------------------
# 11. CALLGRAPH
# ------------------------------------------------------------------
echo ">> 11. CALLGRAPH — Generate method call graph visual tree"
echo " library-insight callgraph HtmlBuilder.div"
echo ""
library-insight callgraph HtmlBuilder.div
echo ""
# ------------------------------------------------------------------
# 12. MCP
# ------------------------------------------------------------------
echo ">> 12. MCP — Test Model Context Protocol tools list interface"
echo " echo '{...}' | library-insight mcp"
echo ""
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | library-insight mcp
echo ""
echo "$SEP"
echo " Done! Run demo.sh for the full 22-command walkthrough."
echo "$SEP"
echo ""