@dtt_siye/atool 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.sh +10 -8
- package/lib/common.sh +88 -5
- package/lib/install-claude.sh +2 -3
- package/lib/install-cursor.sh +2 -2
- package/lib/install-kiro.sh +2 -2
- package/package.json +1 -1
package/install.sh
CHANGED
|
@@ -584,20 +584,22 @@ main() {
|
|
|
584
584
|
targets=("${detected[@]}")
|
|
585
585
|
fi
|
|
586
586
|
|
|
587
|
-
log_info "Installing to: ${targets[*]}"
|
|
588
587
|
echo ""
|
|
589
|
-
|
|
590
588
|
for ide in "${targets[@]}"; do
|
|
591
589
|
install_to_ide "$ide"
|
|
592
590
|
echo ""
|
|
593
591
|
done
|
|
594
592
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
593
|
+
# Build summary results
|
|
594
|
+
local -a summary_results=()
|
|
595
|
+
for ide in "${targets[@]}"; do
|
|
596
|
+
case "$ide" in
|
|
597
|
+
claude) summary_results+=("Claude Code|skills · hooks · MCP") ;;
|
|
598
|
+
cursor) summary_results+=("Cursor |rules · MCP") ;;
|
|
599
|
+
kiro) summary_results+=("Kiro |steering · MCP") ;;
|
|
600
|
+
esac
|
|
601
|
+
done
|
|
602
|
+
show_install_summary "${summary_results[@]}"
|
|
601
603
|
}
|
|
602
604
|
|
|
603
605
|
main "$@"
|
package/lib/common.sh
CHANGED
|
@@ -1030,12 +1030,95 @@ show_version() {
|
|
|
1030
1030
|
show_banner() {
|
|
1031
1031
|
echo -e "${CYAN}${BOLD}"
|
|
1032
1032
|
cat <<'EOF'
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1033
|
+
/\_/\ _ _ _ _ /\_/\
|
|
1034
|
+
( ^.^ ) / \ ___| (_) | |_ _ ( o.o )
|
|
1035
|
+
( - ) / _ \/ __| | | | | | | | > ~ <
|
|
1036
|
+
/| |\ / ___ \__ \ | | | | |_| | " "
|
|
1037
|
+
(_| |_) /_/ \_\___/_|_| |_|\__, /
|
|
1038
|
+
|___/
|
|
1037
1039
|
EOF
|
|
1038
1040
|
echo -e "${NC}"
|
|
1039
|
-
echo -e "
|
|
1041
|
+
echo -e " ${DIM}v${ATOOL_VERSION} · One command. All AI IDEs.${NC}"
|
|
1040
1042
|
echo ""
|
|
1041
1043
|
}
|
|
1044
|
+
|
|
1045
|
+
# ── UI helpers for installation output ───────────────────────────────────
|
|
1046
|
+
|
|
1047
|
+
# IDE section header: ── Claude Code CLI ──────────
|
|
1048
|
+
log_ide_header() {
|
|
1049
|
+
local ide_name="$1"
|
|
1050
|
+
local line_width=48
|
|
1051
|
+
local name_width=${#ide_name}
|
|
1052
|
+
local dash_count=$((line_width - name_width - 3))
|
|
1053
|
+
[[ $dash_count -lt 3 ]] && dash_count=3
|
|
1054
|
+
echo -e "\n ${BOLD}── ${ide_name} ${DIM}$(printf '%0.s─' $(seq 1 $dash_count))${NC}\n"
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
# IDE section complete: ✓ Claude Code CLI complete
|
|
1058
|
+
log_ide_complete() {
|
|
1059
|
+
local ide_name="$1"
|
|
1060
|
+
local detail="${2:-}"
|
|
1061
|
+
if [[ -n "$detail" ]]; then
|
|
1062
|
+
echo -e " ${GREEN}${BOLD}✓${NC} ${ide_name} ${DIM}${detail}${NC}"
|
|
1063
|
+
else
|
|
1064
|
+
echo -e " ${GREEN}${BOLD}✓${NC} ${ide_name} complete"
|
|
1065
|
+
fi
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
# Compact tree item: ├── label ........ status
|
|
1069
|
+
log_tree() {
|
|
1070
|
+
local label="$1"
|
|
1071
|
+
local status="$2"
|
|
1072
|
+
local is_last="${3:-}"
|
|
1073
|
+
local prefix="├──"
|
|
1074
|
+
[[ "$is_last" == "last" ]] && prefix="└──"
|
|
1075
|
+
# Pad label to 24 chars
|
|
1076
|
+
local padded
|
|
1077
|
+
padded=$(printf '%-24s' "$label")
|
|
1078
|
+
# Color-code status
|
|
1079
|
+
case "$status" in
|
|
1080
|
+
unchanged|skipping) echo -e " ${DIM}${prefix} ${padded} unchanged${NC}" ;;
|
|
1081
|
+
UPDATED) echo -e " ${prefix} ${padded} ${YELLOW}${BOLD}↑ updated${NC}" ;;
|
|
1082
|
+
NEW|installed) echo -e " ${prefix} ${padded} ${GREEN}${BOLD}+ new${NC}" ;;
|
|
1083
|
+
configured) echo -e " ${prefix} ${padded} ${status}" ;;
|
|
1084
|
+
*) echo -e " ${prefix} ${padded} ${DIM}${status}${NC}" ;;
|
|
1085
|
+
esac
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
# Sub-section header (indented)
|
|
1089
|
+
log_subsection() {
|
|
1090
|
+
echo -e "\n ${BOLD}$*${NC}"
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
# Install summary box
|
|
1094
|
+
show_install_summary() {
|
|
1095
|
+
echo ""
|
|
1096
|
+
echo -e " ${BOLD}═══════════════════════════════════════════${NC}"
|
|
1097
|
+
echo ""
|
|
1098
|
+
echo -e " ${GREEN}${BOLD}✓${NC} ${BOLD}aTool${NC} ${DIM}v${ATOOL_VERSION}${NC} ${GREEN}${BOLD}installed!${NC}"
|
|
1099
|
+
echo ""
|
|
1100
|
+
# Print each result: "Claude Code|32 skills · 3 hooks"
|
|
1101
|
+
for result in "$@"; do
|
|
1102
|
+
local name="${result%%|*}"
|
|
1103
|
+
local detail="${result#*|}"
|
|
1104
|
+
echo -e " ${BOLD}${name}${NC} ${GREEN}✓${NC} ${DIM}${detail}${NC}"
|
|
1105
|
+
done
|
|
1106
|
+
echo ""
|
|
1107
|
+
echo -e " ${DIM}Next → restart your IDE, then ${BOLD}/atool-init${NC}"
|
|
1108
|
+
echo ""
|
|
1109
|
+
echo -e " ${BOLD}═══════════════════════════════════════════${NC}"
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
# ── Stats tracking (set by install sub-scripts, read by summary) ─────────
|
|
1113
|
+
_ATOOL_STATS_SKILLS_TOTAL=0
|
|
1114
|
+
_ATOOL_STATS_SKILLS_UPDATED=0
|
|
1115
|
+
_ATOOL_STATS_SKILLS_NEW=0
|
|
1116
|
+
_ATOOL_STATS_HOOKS=0
|
|
1117
|
+
_ATOOL_STATS_MCP=0
|
|
1118
|
+
_atool_reset_stats() {
|
|
1119
|
+
_ATOOL_STATS_SKILLS_TOTAL=0
|
|
1120
|
+
_ATOOL_STATS_SKILLS_UPDATED=0
|
|
1121
|
+
_ATOOL_STATS_SKILLS_NEW=0
|
|
1122
|
+
_ATOOL_STATS_HOOKS=0
|
|
1123
|
+
_ATOOL_STATS_MCP=0
|
|
1124
|
+
}
|
package/lib/install-claude.sh
CHANGED
|
@@ -8,7 +8,7 @@ set -euo pipefail
|
|
|
8
8
|
# common.sh must already be loaded.
|
|
9
9
|
|
|
10
10
|
install_claude() {
|
|
11
|
-
|
|
11
|
+
log_ide_header "Claude Code CLI"
|
|
12
12
|
|
|
13
13
|
# Check if claude is installed
|
|
14
14
|
if ! command -v claude &>/dev/null; then
|
|
@@ -32,9 +32,8 @@ install_claude() {
|
|
|
32
32
|
# 3. Install MCP servers
|
|
33
33
|
install_mcp "claude"
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
log_ide_complete "Claude Code CLI" "skills · hooks · MCP"
|
|
36
36
|
echo ""
|
|
37
|
-
log_info "Installed:"
|
|
38
37
|
log_info " Skills: $claude_skills_dir/"
|
|
39
38
|
log_info " Hooks: $claude_config_dir/hooks/atool-session-start"
|
|
40
39
|
log_info " MCP: $claude_config_dir/settings.json"
|
package/lib/install-cursor.sh
CHANGED
|
@@ -187,7 +187,7 @@ generate_cursor_skill_rules() {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
install_cursor() {
|
|
190
|
-
|
|
190
|
+
log_ide_header "Cursor"
|
|
191
191
|
|
|
192
192
|
# Check if Cursor is installed
|
|
193
193
|
if ! command -v cursor &>/dev/null; then
|
|
@@ -270,7 +270,7 @@ install_cursor() {
|
|
|
270
270
|
# 3. Install MCP servers (global, works for Cursor)
|
|
271
271
|
install_mcp "cursor"
|
|
272
272
|
|
|
273
|
-
|
|
273
|
+
log_ide_complete "Cursor" "rules staged · MCP configured"
|
|
274
274
|
echo ""
|
|
275
275
|
log_info "Installed:"
|
|
276
276
|
log_info " Rules (staging): $staging_dir/"
|
package/lib/install-kiro.sh
CHANGED
|
@@ -468,7 +468,7 @@ cleanup_project_kiro_steering() {
|
|
|
468
468
|
# ── Main Install ───────────────────────────────────────────────────────────
|
|
469
469
|
|
|
470
470
|
install_kiro() {
|
|
471
|
-
|
|
471
|
+
log_ide_header "Kiro"
|
|
472
472
|
|
|
473
473
|
# Check if Kiro is installed
|
|
474
474
|
if ! command -v kiro &>/dev/null; then
|
|
@@ -529,7 +529,7 @@ install_kiro() {
|
|
|
529
529
|
# 4. Install MCP servers (global, works for Kiro)
|
|
530
530
|
install_mcp "kiro"
|
|
531
531
|
|
|
532
|
-
|
|
532
|
+
log_ide_complete "Kiro" "~9 steering · MCP configured"
|
|
533
533
|
echo ""
|
|
534
534
|
log_info "Installed:"
|
|
535
535
|
log_info " Steering (staging): $staging_dir/"
|