Neon Database Resources
Resource-focused Neon monitor showing storage usage, compute consumption, and cost tracking. Perfect for monitoring resource usage and billing. Setup: Add variables to your project's .env file or export them: NEON_ENDPOINT, NEON_DATABASE, NEON_API_KEY, and NEON_PROJECT_ID. Shows storage usage, compute hours, estimated costs, activity metrics, and resource consumption tracking.
Before you use this component
This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.
Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.
Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.
- Source publisher
- Claude Code Templates
- Creator supplied by source
- Not listed in source
- Pinned source version
- a344359459263d73d8948651c789244093c02e4e
- License evidence
- LICENSE
Source preview
cli-tool/components/settings/statusline/neon-database-resources.json
{
"description": "Resource-focused Neon monitor showing storage usage, compute consumption, and cost tracking. Perfect for monitoring resource usage and billing. Setup: Add variables to your project's .env file or export them: NEON_ENDPOINT, NEON_DATABASE, NEON_API_KEY, and NEON_PROJECT_ID. Shows storage usage, compute hours, estimated costs, activity metrics, and resource consumption tracking.",
"statusLine": {
"type": "command",
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\" 2>/dev/null || echo \"unknown\"); DIR_NAME=$(basename \"$DIR\" 2>/dev/null || echo \"project\"); if [ -f \"$DIR/.env\" ]; then while IFS= read -r line; do case \"$line\" in NEON_ENDPOINT=*) export NEON_ENDPOINT=\"${line#*=}\";; NEON_DATABASE=*) export NEON_DATABASE=\"${line#*=}\";; NEON_API_KEY=*) export NEON_API_KEY=\"${line#*=}\";; NEON_PROJECT_ID=*) export NEON_PROJECT_ID=\"${line#*=}\";; esac; done < \"$DIR/.env\"; fi; if [ -n \"$NEON_ENDPOINT\" ] && [ -n \"$NEON_DATABASE\" ] && [ -n \"$NEON_API_KEY\" ] && [ -n \"$NEON_PROJECT_ID\" ]; then REGION=$(echo \"$NEON_ENDPOINT\" | grep -o \"us-[a-z0-9-]*\" | head -1 || echo \"unknown\"); DB_NAME=$(echo \"$NEON_DATABASE\" | cut -c1-6); CONNECTION_TEST=$(timeout 3 nc -z \"$NEON_ENDPOINT\" 5432 >/dev/null 2>&1 && echo \"connected\" || echo \"sleeping\"); if [ \"$CONNECTION_TEST\" = \"connected\" ]; then CONN_ICON=\"🟢\"; STATUS=\"active\"; else CONN_ICON=\"🟡\"; STATUS=\"sleep\"; fi; CONSUMPTION_DATA=$(curl -s -m 5 -H \"Authorization: Bearer $NEON_API_KEY\" \"https://console.neon.tech/api/v2/consumption_history/projects/$NEON_PROJECT_ID?limit=1\" 2>/dev/null); if [ -n \"$CONSUMPTION_DATA\" ] && echo \"$CONSUMPTION_DATA\" | jq -e \".periods[0]\" >/dev/null 2>&1; then PERIOD_DATA=$(echo \"$CONSUMPTION_DATA\" | jq \".periods[0]\" 2>/dev/null); ACTIVE_TIME=$(echo \"$PERIOD_DATA\" | jq -r \".active_time_seconds // 0\"); COMPUTE_TIME=$(echo \"$PERIOD_DATA\" | jq -r \".compute_time_seconds // 0\"); STORAGE_BYTES=$(echo \"$PERIOD_DATA\" | jq -r \".synthetic_storage_size_bytes // 0\"); WRITTEN_BYTES=$(echo \"$PERIOD_DATA\" | jq -r \".written_data_bytes // 0\"); ACTIVE_HOURS=$(( ACTIVE_TIME / 3600 )); COMPUTE_HOURS=$(( COMPUTE_TIME / 3600 )); if [ \"$STORAGE_BYTES\" -gt 0 ]; then STORAGE_MB=$(( STORAGE_BYTES / 1048576 )); if [ \"$STORAGE_MB\" -lt 1024 ]; then STORAGE_DISPLAY=\"${STORAGE_MB}MB\"; else STORAGE_GB=$(( STORAGE_MB / 1024 )); STORAGE_DISPLAY=\"${STORAGE_GB}GB\"; fi; else STORAGE_DISPLAY=\"<1MB\"; fi; if [ \"$WRITTEN_BYTES\" -gt 0 ]; then WRITTEN_MB=$(( WRITTEN_BYTES / 1048576 )); ACTIVITY_DISPLAY=\"${WRITTEN_MB}MB↑\"; else ACTIVITY_DISPLAY=\"idle\"; fi; ESTIMATED_COST=$(echo \"scale=2; ($ACTIVE_HOURS * 0.25) + ($STORAGE_MB * 0.0001)\" | bc 2>/dev/null || echo \"0.00\"); COST_DISPLAY=\"\\$${ESTIMATED_COST}\"; if [ \"$ACTIVE_HOURS\" -gt 100 ]; then USAGE_ICON=\"🔴\"; elif [ \"$ACTIVE_HOURS\" -gt 50 ]; then USAGE_ICON=\"🟡\"; else USAGE_ICON=\"🟢\"; fi; else ACTIVE_HOURS=0; STORAGE_DISPLAY=\"n/a\"; ACTIVITY_DISPLAY=\"n/a\"; COST_DISPLAY=\"n/a\"; USAGE_ICON=\"❓\"; fi; CURRENT_TIME=$(date \"+%H:%M\"); PLAN_TYPE=\"free\"; if [ \"$ACTIVE_HOURS\" -gt 100 ]; then PLAN_TYPE=\"paid\"; fi; echo \"🐘 Neon $CONN_ICON $STATUS | 💾 $STORAGE_DISPLAY | $USAGE_ICON ${ACTIVE_HOURS}h compute | 💰 $COST_DISPLAY/$PLAN_TYPE | 📈 $ACTIVITY_DISPLAY | ⏰ $CURRENT_TIME | 📁 $DIR_NAME\"; else echo \"🐘 Neon 🔧 config-needed | ⚠️ set NEON_ENDPOINT, NEON_DATABASE, NEON_API_KEY & NEON_PROJECT_ID | 📁 $DIR_NAME\"; fi'"
}
}Preview capped at 60,000 characters. Download the bundle for every original file and notice.
Read the redistribution license
MIT License Copyright (c) 2025 Daniel (San) Ávila Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bundle SHA-256: 175276caf2849b6fc9b32f5c81ee421ea3f1b766987f3b7a9f585581d260dd89. Files are served as downloads and are never executed by this page.