Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ REPO="DeusData/codebase-memory-mcp"
INSTALL_DIR="$HOME/.local/bin"
VARIANT="standard"
SKIP_CONFIG=false
GLOBALCHECK_ENABLED=false
CBM_DOWNLOAD_URL="${CBM_DOWNLOAD_URL:-https://github.com/${REPO}/releases/latest/download}"

# Security: reject non-HTTPS download URLs (defense-in-depth)
Expand All @@ -35,12 +36,14 @@ for arg in "$@"; do
--standard) VARIANT="standard" ;;
--dir=*) INSTALL_DIR="${arg#--dir=}" ;;
--skip-config) SKIP_CONFIG=true ;;
--enable-globalcheck) GLOBALCHECK_ENABLED=true ;;
--help|-h)
echo "Usage: install.sh [--ui] [--dir=<path>] [--skip-config]"
echo "Usage: install.sh [--ui] [--dir=<path>] [--skip-config] [--enable-globalcheck]"
echo " --ui Install the UI variant (with graph visualization)"
echo " --standard Install the standard variant (default)"
echo " --dir PATH Install directory (default: ~/.local/bin)"
echo " --skip-config Skip automatic agent configuration"
echo " --enable-globalcheck Enable GlobalCheck compliance for agents"
exit 0
;;
esac
Expand Down Expand Up @@ -196,7 +199,11 @@ if [ "$SKIP_CONFIG" = true ]; then
else
echo ""
echo "Configuring coding agents..."
"$DEST" install -y 2>&1 || {
GLOBALCHECK_ARGS=""
if [ "$GLOBALCHECK_ENABLED" = true ]; then
GLOBALCHECK_ARGS="--enable-globalcheck"
fi
"$DEST" install -y $GLOBALCHECK_ARGS 2>&1 || {
echo ""
echo "Agent configuration failed (non-fatal)."
echo "Run manually: codebase-memory-mcp install"
Expand All @@ -215,6 +222,13 @@ fi
echo ""
echo "Done! Restart your coding agent to start using codebase-memory-mcp."

if [ "$GLOBALCHECK_ENABLED" = true ]; then
echo ""
echo "GlobalCheck compliance enabled. For full functionality, consider setting your API key:"
echo " export GLOBALCHECK_API_KEY=\"YOUR_API_KEY_HERE\""
echo " (Your agent will pick this up when configured by codebase-memory-mcp)"
fi

} # end main()

main "$@"
Loading