Files
holocron/scripts/setup-neuledge-context.sh
Defame1297 75c6ea1dd5 feat(skills): add neuledge-context skill for @neuledge/context MCP server
Adds a complete cross-cutting skill to install, configure, and manage
@neuledge/context — a local-first MCP server that delivers version-specific
library docs to AI agents via SQLite FTS5.

Includes:
- SKILL.md with 9-step process: install, global MCP registration, per-project
  --libs scoping, package management, auth, custom registry, upgrade, uninstall
- setup-neuledge-context.sh: pinned version install, idempotent version check
- secure-context-config.sh: chmod 600 on ~/.context/config.json after auth
- 13-case test suite covering both scripts (all pass)
- eval.yaml with 6 trigger tests and 4 output tests
- references/: context-cli-reference.md, http-mode.md, install-notes.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
2026-06-20 23:16:27 +00:00

37 lines
1022 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Installs @neuledge/context globally at a pinned version.
# Usage: setup-neuledge-context.sh [VERSION]
# VERSION — npm version string (default: 1.2.0)
# Idempotent: skips install if already at the target version.
TARGET_VERSION="${1:-1.2.0}"
current_version() {
context --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo ""
}
CURRENT="$(current_version)"
if [ "$CURRENT" = "$TARGET_VERSION" ]; then
echo "Already at @neuledge/context@${TARGET_VERSION} — nothing to do."
exit 0
fi
if [ -n "$CURRENT" ]; then
echo "Upgrading @neuledge/context from ${CURRENT} to ${TARGET_VERSION}..."
else
echo "Installing @neuledge/context@${TARGET_VERSION}..."
fi
npm install -g "@neuledge/context@${TARGET_VERSION}"
INSTALLED="$(current_version)"
if [ "$INSTALLED" = "$TARGET_VERSION" ]; then
echo "Done: @neuledge/context@${TARGET_VERSION} installed."
else
echo "Error: expected version ${TARGET_VERSION} but got '${INSTALLED}'" >&2
exit 1
fi