add: karakeep cli wrapper (#14618)

* add: karakeep cli wrapper

* Create /usr/bin/karakeep if it doesn't exist

* add: ejs for yt-dlp

* add: ejs for yt-dlp

* Fix pip install command for yt-dlp-ejs

* Fix pip install command to use STD variable

* rm python3 dep

* rm python3 dep

* ensure_dependencies

* add: deno

* add: deno

* rm: not needed msg block
This commit is contained in:
Tobias
2026-05-22 19:20:18 +02:00
committed by GitHub
parent 274505536f
commit 202f1c7e84
2 changed files with 30 additions and 0 deletions
+11
View File
@@ -20,11 +20,13 @@ $STD apt install -y \
chromium \
graphicsmagick \
ghostscript \
python3-pip \
ffmpeg
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "monolith" "Y2Z/monolith" "singlefile" "latest" "/usr/bin" "monolith-gnu-linux-x86_64"
fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp-nightly-builds" "singlefile" "latest" "/usr/bin" "yt-dlp_linux"
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-$(uname -m)-unknown-linux-gnu.zip"
setup_meilisearch
fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep" "tarball"
@@ -32,6 +34,10 @@ cd /opt/karakeep
MODULE_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/karakeep/package.json)"
NODE_VERSION="24" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
msg_info "Installing external JavaScript Extension for yt-dlp"
$STD pip install -U yt-dlp-ejs
msg_ok "Installed external JavaScript Extension for yt-dlp"
msg_info "Installing karakeep"
export PUPPETEER_SKIP_DOWNLOAD="true"
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="true"
@@ -47,6 +53,11 @@ cd /opt/karakeep/apps/cli
$STD pnpm install --frozen-lockfile
$STD pnpm build
$STD pnpm store prune
cat <<'EOF' >/usr/bin/karakeep
#!/usr/bin/env node
import('/opt/karakeep/apps/cli/dist/index.mjs')
EOF
chmod +x /usr/bin/karakeep
export DATA_DIR=/opt/karakeep_data
karakeep_SECRET=$(openssl rand -base64 36 | cut -c1-24)