smart_ide/services/carbonyl/run-carbonyl.sh
4NK 3f1894e21f Remove AnythingLLM VS Code extension; add Carbonyl service (upstream submodule)
- Delete extensions/anythingllm-workspaces; document migration to anythingllm-devtools
- Add services/carbonyl: shallow submodule fathyb/carbonyl, run-carbonyl.sh (Docker/native)
- Add scripts/open-carbonyl-preview-test.sh and smart_ide.preview_urls.test in example conf
- Docs: service-carbonyl, carbonyl-terminal-browser, architecture index updates
2026-04-03 22:13:34 +02:00

23 lines
682 B
Bash
Executable File

#!/usr/bin/env bash
# Launch Carbonyl (terminal browser) for a URL. Prefer Docker image fathyb/carbonyl.
set -euo pipefail
URL="${1:?usage: $(basename "$0") <url>}"
RUNNER="${CARBONYL_RUNNER:-docker}"
IMAGE="${CARBONYL_DOCKER_IMAGE:-fathyb/carbonyl}"
if [[ "${RUNNER}" == "native" ]]; then
if ! command -v carbonyl >/dev/null 2>&1; then
echo "carbonyl not in PATH; install e.g. npm install -g carbonyl or set CARBONYL_RUNNER=docker" >&2
exit 1
fi
exec carbonyl "${URL}"
fi
if ! command -v docker >/dev/null 2>&1; then
echo "docker not found; install Docker or set CARBONYL_RUNNER=native with carbonyl in PATH" >&2
exit 1
fi
exec docker run --rm -ti "${IMAGE}" "${URL}"