Skip to content

Commit 13caeb0

Browse files
committed
Add hygiene files, .github workflows, and updated skills
1 parent 1461e32 commit 13caeb0

15 files changed

Lines changed: 597 additions & 0 deletions

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2026 Chris Ahrendt — SPDX-License-Identifier: MIT
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_style = space
10+
indent_size = 4
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.{yml,yaml,json,toml,md,html,css,js,jsx,ts,tsx}]
15+
indent_size = 2
16+
17+
[Makefile]
18+
indent_style = tab
19+
20+
[*.{sh,bash}]
21+
indent_size = 2
22+
23+
# Don't trim trailing whitespace from markdown — two trailing spaces
24+
# means line break.
25+
[*.md]
26+
trim_trailing_whitespace = false

.env.example

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Copyright (c) 2026 Chris Ahrendt
2+
# SPDX-License-Identifier: MIT
3+
#
4+
# Copy to .env and fill in.
5+
6+
# ── MCP server ────────────────────────────────────────────────────────────────
7+
# Bearer token used by claude.ai to call the MCP server. Min 32 chars.
8+
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(48))"
9+
MCP_API_KEY=
10+
11+
# Bind address and port for the MCP server.
12+
MCP_HOST=0.0.0.0
13+
MCP_PORT=8000
14+
15+
# Public URLs (only needed when behind a TLS reverse proxy).
16+
# MCP_SERVER_URL=https://mcp.example.com
17+
# MCP_ISSUER_URL=https://mcp.example.com
18+
19+
# ── Couchbase cluster (single-cluster mode) ───────────────────────────────────
20+
CB_ANALYTICS_HOST=localhost
21+
CB_ANALYTICS_USERNAME=Administrator
22+
CB_ANALYTICS_PASSWORD=password
23+
CB_ANALYTICS_CLUSTER_NAME=default
24+
CB_ANALYTICS_TLS=false
25+
CB_ANALYTICS_VERIFY_SSL=true
26+
CB_ANALYTICS_MGMT_PORT=8091
27+
CB_ANALYTICS_ANALYTICS_PORT=8095
28+
CB_ANALYTICS_TIMEOUT_SECONDS=60
29+
CB_ANALYTICS_MAX_RETRIES=3
30+
31+
# Multi-cluster mode (overrides single-cluster vars if set).
32+
# CB_ANALYTICS_CLUSTERS_FILE=/app/config/clusters.json
33+
34+
# ── Capella Management API (optional, enables capella_* tools) ────────────────
35+
# CB_CAPELLA_API_KEY_SECRET=your-capella-api-key
36+
# CB_CAPELLA_BASE_URL=https://cloudapi.cloud.couchbase.com
37+
38+
# ── GUI ───────────────────────────────────────────────────────────────────────
39+
# Enable the admin/query GUI in the same process as the MCP server.
40+
GUI_ENABLED=true
41+
GUI_HOST=0.0.0.0
42+
GUI_PORT=8080
43+
44+
# Login credentials for the GUI (used for admin/query access).
45+
GUI_USERNAME=admin
46+
GUI_PASSWORD=changeme
47+
48+
# Secret used to sign GUI sessions. Generate with:
49+
# python -c "import secrets; print(secrets.token_urlsafe(48))"
50+
GUI_SESSION_SECRET=
51+
52+
# ── Observability ─────────────────────────────────────────────────────────────
53+
LOG_LEVEL=INFO # DEBUG | INFO | WARNING | ERROR
54+
LOG_FORMAT=json # json | console
55+
LOG_FILE= # leave blank to log only to stdout
56+
57+
AUDIT_LOG_FILE=./audit.log # Where to append audit records
58+
AUDIT_LOG_ENABLED=true
59+
60+
# OpenTelemetry tracing
61+
OTEL_ENABLED=false
62+
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
63+
OTEL_SERVICE_NAME=cb-analytics-mcp
64+
65+
# Prometheus metrics endpoint
66+
METRICS_ENABLED=true
67+
METRICS_PORT=9100

.gitattributes

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright (c) 2026 Chris Ahrendt — SPDX-License-Identifier: MIT
2+
#
3+
# Force LF line endings for text files (prevents CRLF damage on Windows
4+
# checkouts). Mark binary types explicitly.
5+
6+
* text=auto eol=lf
7+
8+
# Source
9+
*.py text diff=python
10+
*.html text
11+
*.css text
12+
*.js text
13+
*.md text
14+
*.yml text
15+
*.yaml text
16+
*.toml text
17+
*.json text
18+
*.sh text eol=lf
19+
*.cfg text
20+
*.ini text
21+
22+
# Templates and config
23+
Dockerfile text
24+
Makefile text
25+
26+
# Binaries
27+
*.png binary
28+
*.jpg binary
29+
*.jpeg binary
30+
*.ico binary
31+
*.gif binary
32+
*.pdf binary
33+
*.zip binary
34+
*.tar binary
35+
*.gz binary
36+
*.tgz binary
37+
*.whl binary
38+
39+
# Generated artifacts that GitHub should hide in PR diffs
40+
docs/img/* linguist-generated=true
41+
src/cb_analytics_mcp/gui/static/js/htmx.min.js linguist-vendored=true

.github/CODEOWNERS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2026 Chris Ahrendt — SPDX-License-Identifier: MIT
2+
#
3+
# These owners will be automatically requested for review when someone
4+
# opens a PR that modifies the matching files. See:
5+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
6+
7+
# Default: every file
8+
* @celticht32
9+
10+
# Critical paths get the same default, but listed explicitly so additions
11+
# don't accidentally lose review coverage if you add more entries later.
12+
/.github/ @celticht32
13+
/src/cb_analytics_mcp/ @celticht32
14+
/tests/ @celticht32
15+
/docs/ @celticht32
16+
/.claude/ @celticht32
17+
/Dockerfile @celticht32
18+
/docker-compose.yml @celticht32
19+
/pyproject.toml @celticht32

.github/FUNDING.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2026 Chris Ahrendt — SPDX-License-Identifier: MIT
2+
#
3+
# Uncomment and fill any line below to enable a "Sponsor" button on the
4+
# repo page. Leave all commented if you don't want sponsorships.
5+
6+
# github: [celticht32]
7+
# patreon: your_patreon_username
8+
# open_collective: your_collective_name
9+
# ko_fi: your_ko_fi_username
10+
# tidelift: pypi/cb-analytics-mcp
11+
# community_bridge: your_project_name
12+
# liberapay: your_liberapay_username
13+
# issuehunt: your_issuehunt_username
14+
# otechie: your_otechie_username
15+
# lfx_crowdfunding: your_lfx_crowdfunding_username
16+
# polar: your_polar_username
17+
# buy_me_a_coffee: your_buy_me_a_coffee_username
18+
# thanks_dev: your_thanks_dev_username
19+
# custom: ['https://example.com/sponsor']
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Something isn't working as documented
4+
title: '[bug] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## What happened
10+
11+
A clear, specific description. Include the tool name or GUI page.
12+
13+
## What you expected
14+
15+
What you thought should happen.
16+
17+
## Reproduction steps
18+
19+
1. Configure with ``
20+
2. Run `cb-analytics-mcp …`
21+
3. From Claude / the GUI, call ``
22+
23+
## Logs
24+
25+
Paste the relevant lines. Redact any secrets that slipped through.
26+
27+
```
28+
29+
```
30+
31+
## Environment
32+
33+
- `cb-analytics-mcp --version`:
34+
- Python version (`python --version`):
35+
- Couchbase Server / Capella version:
36+
- Deployment (Docker / venv / k8s):
37+
38+
## Anything else
39+
40+
Screenshots, config diffs, related issues, etc.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security vulnerability
4+
url: https://github.com/celticht32/cb-analytics-mcp/security/advisories/new
5+
about: Please report security issues privately, not as a public issue.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new tool, GUI feature, or behaviour change
4+
title: '[feature] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## What you want to do
10+
11+
Describe the use case in one or two sentences. Concrete examples help.
12+
13+
## The friction today
14+
15+
What's missing or awkward? Which existing tools come closest?
16+
17+
## Proposed shape
18+
19+
If you have one — a tool signature, an env var, a GUI flow. Doesn't have
20+
to be final; this is a starting point for discussion.
21+
22+
## Alternatives considered
23+
24+
What else did you try or think about?
25+
26+
## Anything else
27+
28+
Couchbase docs links, related issues, prior art in other tools.

.github/dependabot.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright (c) 2026 Chris Ahrendt — SPDX-License-Identifier: MIT
2+
#
3+
# Keep dependencies fresh and patched. Weekly cadence is enough for an app
4+
# at this scale; daily generates noise.
5+
6+
version: 2
7+
updates:
8+
9+
- package-ecosystem: pip
10+
directory: /
11+
schedule:
12+
interval: weekly
13+
day: monday
14+
time: "06:00"
15+
open-pull-requests-limit: 5
16+
groups:
17+
# Patch + minor pyproject deps grouped into one PR
18+
python-runtime:
19+
patterns: ["*"]
20+
update-types: ["minor", "patch"]
21+
labels: ["dependencies", "python"]
22+
commit-message:
23+
prefix: "deps"
24+
include: scope
25+
26+
- package-ecosystem: github-actions
27+
directory: /
28+
schedule:
29+
interval: monthly
30+
open-pull-requests-limit: 5
31+
labels: ["dependencies", "ci"]
32+
commit-message:
33+
prefix: "ci"
34+
include: scope
35+
36+
- package-ecosystem: docker
37+
directory: /
38+
schedule:
39+
interval: monthly
40+
open-pull-requests-limit: 3
41+
labels: ["dependencies", "docker"]

.github/pull_request_template.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
Thanks for the contribution! A few quick checks before you submit.
3+
-->
4+
5+
## What this changes
6+
7+
A short summary of the user-visible behaviour change, or "internal refactor"
8+
if there isn't one.
9+
10+
## Why
11+
12+
Link an issue if there is one. Otherwise describe the problem this solves.
13+
14+
## How to test
15+
16+
The reviewer will run `make scan`. If your change needs special setup
17+
(real Couchbase, a Capella sandbox, env vars), say so here.
18+
19+
## Checklist
20+
21+
- [ ] `make scan` passes locally (pyflakes + ruff + mypy strict + bandit + pytest)
22+
- [ ] Coverage is still ≥ 80 %
23+
- [ ] Added tests for new behaviour
24+
- [ ] Updated `CHANGELOG.md` under `## [Unreleased]`
25+
- [ ] Updated docs (`docs/` or skill files) if behaviour changed
26+
- [ ] No new secrets in logs (redactor still catches them)

0 commit comments

Comments
 (0)