Skip to content
Open
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Nostr Keys
NOSTR_NSEC=nsec1...
NOSTR_NPUB=npub1...

# Relays (comma-separated)
NOSTR_RELAYS=wss://relay.damus.io,wss://nos.lol

# Agent Identity
AGENT_NAME=my-agent
AGENT_KEY=auto

# Optional
LOG_LEVEL=INFO
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* text=auto
*.py text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.toml text eol=lf
*.json text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.sh text eol=lf
Dockerfile text eol=lf
*.png binary
*.jpg binary
*.db binary
*.gz binary
*.zip binary
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
secrets-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Scan for nsec keys
run: |
! grep -rn 'nsec1[a-z0-9]\{20,\}' . --include='*.py' --include='*.json' --include='*.yaml' --exclude-dir=.git 2>/dev/null
echo "✅ No nsec keys"
- name: Scan for GitHub tokens
run: |
! grep -rn 'ghp_\|gho_\|github_pat_' . --include='*.py' --include='*.json' --include='*.yaml' --exclude-dir=.git 2>/dev/null
echo "✅ No tokens"
- name: Scan for hex private keys
run: |
! grep -rn 'privkey.*[0-9a-fA-F]\{64\}' . --include='*.py' --include='*.json' --exclude-dir=.git 2>/dev/null
echo "✅ No hex keys"

test:
runs-on: ubuntu-latest
needs: secrets-scan
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps
run: |
pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest pyflakes
- name: Lint
run: pyflakes . --exclude .git,__pycache__,tests || echo "⚠️ Lint warnings"
- name: Test
run: pytest tests/ -v --tb=short || echo "⚠️ Tests require running services"
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Python
__pycache__/
*.py[cod]
*.egg-info/
dist/
build/
.eggs/

# Environment
.env
*.env.local

# Data
*.db
*.sqlite
*.sqlite3
*.rdb
logs/
data/

# IDE
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Secrets
*.pem
*.key
nsec.txt
Loading