-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·136 lines (111 loc) · 3.37 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·136 lines (111 loc) · 3.37 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
#!/usr/bin/env bash
# keencli kurulum script'i: https://github.com/aethrox/keencli
set -euo pipefail
REPO_URL="https://github.com/aethrox/keencli.git"
BIN_DIR="${HOME}/.local/bin"
CONFIG_DIR="${HOME}/.config/keencli"
DATA_DIR="${HOME}/.local/share/keencli"
SRC_DIR="${KEENETIC_SRC_DIR:-${DATA_DIR}/src}"
rule() {
echo "────────────────────────────────────────────────"
}
heading() {
echo ""
rule
echo " $1"
rule
echo ""
}
step() {
printf " %s) %s\n" "$1" "$2"
}
cmd() {
echo " $1"
}
echo ""
echo " keencli kurulumu"
echo ""
if ! command -v cargo >/dev/null 2>&1; then
echo " Hata: cargo bulunamadı."
echo " Rust kurulumu: https://rustup.rs"
exit 1
fi
if ! command -v git >/dev/null 2>&1; then
echo " Hata: git bulunamadı."
exit 1
fi
mkdir -p "$BIN_DIR" "$CONFIG_DIR" "$DATA_DIR/outputs"
if [[ -d "$SRC_DIR/.git" ]]; then
echo " >> Kaynak güncelleniyor"
echo " $SRC_DIR"
git -C "$SRC_DIR" pull --ff-only
else
echo " >> Kaynak indiriliyor"
echo " $SRC_DIR"
mkdir -p "$(dirname "$SRC_DIR")"
git clone "$REPO_URL" "$SRC_DIR"
fi
echo ""
echo " >> Derleniyor (release)..."
cargo build --release --manifest-path "$SRC_DIR/Cargo.toml"
install -m 755 "$SRC_DIR/target/release/keencli" "$BIN_DIR/keencli"
if [[ ! -f "$CONFIG_DIR/config.toml" ]]; then
cp "$SRC_DIR/config.toml.example" "$CONFIG_DIR/config.toml"
echo " >> Örnek config oluşturuldu"
echo " $CONFIG_DIR/config.toml"
fi
if [[ ! -f "$CONFIG_DIR/.env.example" ]]; then
cp "$SRC_DIR/.env.example" "$CONFIG_DIR/.env.example"
fi
heading "Kurulum tamamlandı"
echo " Dosyalar"
echo ""
printf " %-10s %s\n" "Binary" "$BIN_DIR/keencli"
printf " %-10s %s\n" "Config" "$CONFIG_DIR/config.toml"
printf " %-10s %s\n" "Şifre" "$CONFIG_DIR/.env"
printf " %-10s %s\n" "Veri" "$DATA_DIR/outputs/"
echo ""
if [[ ":${PATH}:" != *":${BIN_DIR}:"* ]]; then
heading "PATH uyarısı"
echo " $BIN_DIR şu an PATH'te değil."
echo " ~/.bashrc veya ~/.zshrc dosyana ekle, sonra yeni terminal aç:"
echo ""
cmd 'export PATH="$HOME/.local/bin:$PATH"'
echo ""
fi
heading "İlk kullanım"
step 1 "Router bilgilerini ayarla (şifre yazma)"
cmd "${EDITOR:-nano} $CONFIG_DIR/config.toml"
echo ""
step 2 "Router şifresini kalıcı olarak tanımla"
cmd "cp $CONFIG_DIR/.env.example $CONFIG_DIR/.env"
cmd "${EDITOR:-nano} $CONFIG_DIR/.env"
echo ""
echo " Geçici alternatif (yalnızca bu terminal):"
cmd "export KEENETIC_PASSWORD='router_şifreniz'"
echo ""
step 3 "Bağlantıyı test et"
cmd "keencli status"
echo ""
step 4 "Veri çek ve analiz et"
cmd "keencli fetch -a"
cmd "keencli analyze"
echo ""
echo " Opsiyonel: AI raporu için .env dosyasına ekleyin:"
echo ""
cmd "OPENROUTER_API_KEY=sk-or-..."
cmd "LLM_MODEL=anthropic/claude-sonnet-4.6 # önerilen"
echo " Alternatif: deepseek/deepseek-v4-pro (ekonomik)"
echo " Test özeti: AI_MODELS.md"
echo ""
heading "Diğer"
echo " Güncelleme"
cmd "curl -fsSL https://raw.githubusercontent.com/aethrox/keencli/main/install.sh | bash"
echo ""
echo " Kaldırma"
cmd "curl -fsSL https://raw.githubusercontent.com/aethrox/keencli/main/uninstall.sh -o uninstall.sh"
cmd "bash uninstall.sh"
echo ""
echo " Belgeler"
cmd "https://github.com/aethrox/keencli#kurulum-sonrası"
echo ""