Move 150+ scripts from root and scripts/ into client/project directories: - clients/dataforth/scripts/ (110 files: AD2, sync, SSH, DB, DOS scripts) - clients/bg-builders/scripts/ (14 files: Lesley mgmt, Exchange, termination) - clients/internal-infrastructure/scripts/ (10 files: GDAP, Gitea, backups) - projects/msp-tools/scripts/ (9 files: CIPP, MSP onboarding, Datto) - projects/gururmm-agent/scripts/ (3 files: API test, JWT, record counts) - clients/glaztech/scripts/ (1 file: CentraStage removal) Also reorganized: - VPN scripts → infrastructure/vpn-configs/ - Retrieved API/JS files → api/ - Forum posts → projects/community-forum/forum-posts/ - SSH docs → clients/internal-infrastructure/docs/ - NWTOC/CTONW docs → projects/wrightstown-smarthome/docs/ - ACG website files → projects/internal/acg-website-2025/ - Dataforth docs → clients/dataforth/docs/ - schema-retrieved.sql → docs/database/ Deleted 24 tmp_*.ps1 one-off debug scripts (preserved in git history). Root reduced from 220+ files to 62 items (docs + directories only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
718 B
Python
29 lines
718 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Create a JWT token for ClaudeTools API access
|
|
"""
|
|
import jwt
|
|
from datetime import datetime, timedelta, timezone
|
|
|
|
# Get the JWT secret from the RMM server's .env file
|
|
# This should match what's in /opt/claudetools/.env on 172.16.3.30
|
|
JWT_SECRET = "NdwgH6jsGR1WfPdUwR3u9i1NwNx3QthhLHBsRCfFxcg="
|
|
|
|
# Create token data
|
|
data = {
|
|
"sub": "import-script",
|
|
"scopes": ["admin", "import"],
|
|
"exp": datetime.now(timezone.utc) + timedelta(days=30)
|
|
}
|
|
|
|
# Create token
|
|
token = jwt.encode(data, JWT_SECRET, algorithm="HS256")
|
|
|
|
print(f"New JWT Token:")
|
|
print(token)
|
|
print()
|
|
print(f"Expires: {data['exp']}")
|
|
print()
|
|
print("Add this to .claude/context-recall-config.env:")
|
|
print(f"JWT_TOKEN={token}")
|