Check data-analyze plugin requirements (DuckDB, credentials)
Verifies data-analyze plugin setup by checking DuckDB installation and credential file presence.
/plugin marketplace add meomeocoj/cc-plugins/plugin install meomeocoj-data-analyze-plugins-data-analyze@meomeocoj/cc-pluginsCheck if data-analyze plugin requirements are met.
# Check if duckdb is installed
if command -v duckdb &> /dev/null; then
version=$(duckdb --version 2>&1 | head -1)
echo "✅ DuckDB: installed ($version)"
else
echo "❌ DuckDB: not installed"
echo ""
echo "Install DuckDB:"
echo "https://duckdb.org/docs/installation/"
fi
Search for credentials file in these locations (in order):
./.claude/data-analyze/credentials.json (project scope)~/.claude/data-analyze/credentials.json (user scope)# Check credential locations
project_creds="./.claude/data-analyze/credentials.json"
user_creds="$HOME/.claude/data-analyze/credentials.json"
if [ -f "$project_creds" ]; then
echo "✅ Credentials: found at $project_creds (project)"
creds_file="$project_creds"
elif [ -f "$user_creds" ]; then
echo "✅ Credentials: found at $user_creds (user)"
creds_file="$user_creds"
else
echo "❌ Credentials: not found"
echo ""
echo "Searched locations:"
echo " 1. $project_creds (project)"
echo " 2. $user_creds (user)"
echo ""
echo "To create credentials:"
echo " mkdir -p $project_creds"
echo " # Copy the example template from plugin and edit with your database details"
fi
If credentials file is found, validate the JSON structure:
# Validate credentials using Python
python3 -c "
import sys
sys.path.insert(0, '${CLAUDE_PLUGIN_ROOT}/skills/unified-sql/scripts')
from credential_manager import find_credentials_file, validate_credentials_file
creds_file = find_credentials_file()
if creds_file:
print(f'\nValidating credentials structure...')
results = validate_credentials_file(creds_file)
valid_count = sum(1 for r in results if r['valid'])
total_count = len(results)
for r in results:
if r['valid']:
print(f\" ✅ {r['name']} ({r['type']}) - valid\")
else:
print(f\" ❌ {r['name']} ({r['type']}) - {r['error']}\")
print(f'\n{valid_count}/{total_count} databases configured correctly')
"
Present results clearly: