Skip to content

cbwinslow/Knowledge-Base

Repository files navigation

Knowledge Base

This repository contains documentation, scripts, and configurations for server setup and management, including AI agent memories, rules, dotfiles, and various configuration files. The document library has been consolidated under the new docs/ directory for easier navigation.

Directories

  • docs - Consolidated documentation library organized by topic (setup, architecture, agents, projects, resumes, metadata)
  • documentation - Existing documentation system with guides, examples, and research (being consolidated into docs/)
  • master_documents - Legacy setup bundles, reports, and configuration archives
  • scripts - Organized collection of utility scripts
  • agents - AI agent definitions and supporting material
  • ai_agents - CrewAI configurations, rules, memories, and workflows
  • dotfiles - Shell configuration files, functions, and aliases
  • mcp_servers - Model Context Protocol server configs
  • docker_configs - Docker Compose and container configs

Documentation Organization

Master Documents

The master_documents directory contains:

AI Agents & Configuration Management

The repository includes automated workflows and tools for managing AI configurations:

AI Agents

  • memories - Store and retrieve AI agent memories
  • rules - Define and manage AI agent rules
  • crews - CrewAI crew configurations

Dotfiles

  • bash - Bash configurations, functions, and aliases
  • zsh - Zsh configurations, functions, and aliases

Infrastructure

GitHub Workflows

Use these workflows to save configurations:

  • save-ai-memory.yml - Save AI agent memories
  • save-ai-rule.yml - Save AI agent rules
  • save-dotfile.yml - Save shell dotfiles
  • save-docker-config.yml - Save Docker configurations
  • save-mcp-server.yml - Save MCP server configs
  • save-crew-config.yml - Save CrewAI crew configs

Security

This repository uses automated secret scanning to prevent accidental commits of sensitive information:

  • secret-scanning.yml - Automatically scans all commits and pull requests for secrets using Gitleaks
    • Runs on every push and pull request to any branch
    • Blocks commits and PRs that contain secrets (API keys, passwords, tokens, etc.)
    • To enable protection, configure branch protection rules in repository settings to require this check to pass

Important: Always review your code before committing to ensure no sensitive data is included. The secret scanner helps catch common mistakes but should not be your only line of defense.

CLI Tool

Use the kb_manager.sh script for quick access:

# Save a memory
./scripts/utilities/kb_manager.sh memory "topic_name" "content here"

# Save a rule
./scripts/utilities/kb_manager.sh rule "rule_name" "rule content"

# Search content
./scripts/utilities/kb_manager.sh search "docker"

# List items
./scripts/utilities/kb_manager.sh list memories

# Recall content
./scripts/utilities/kb_manager.sh recall ai_agents/memories/file.md

Scripts

The scripts directory contains organized scripts by category:

  • AI Monitoring - Scripts for AI monitoring and related tools
  • Database - Scripts for database management and configuration
  • Deployment - Scripts for system deployment and setup
  • Documentation - Documentation management and knowledge base scripts
  • Networking - Scripts for networking configuration
  • Storage - Scripts for storage management
  • Utilities - Various utility scripts including kb_manager.sh

Documentation Management System

The documentation directory contains a comprehensive documentation management system with extensive examples and guides:

Structure

documentation/
├── examples/           # Production-ready code examples
│   ├── shell-scripts/ # Shell scripting best practices
│   └── python/        # Python examples (API, AI, automation)
├── how-to-guides/     # Step-by-step tutorials
├── troubleshooting-guide.md  # Comprehensive troubleshooting
└── README.md

Code Examples

Shell Scripts (examples/shell-scripts)

  • Production-ready database backup script
  • Best practices and patterns
  • Error handling and logging
  • Complete with documentation

Python Examples (examples/python)

  • AI Integration: OpenAI, Anthropic, Ollama, LangChain
  • REST APIs: Complete FastAPI application with auth
  • Automation: System monitoring, file processing
  • Production-ready patterns and best practices

Docker Compose Examples

Available Stacks (docker_configs/compose)

  • PostgreSQL: Full setup with pgAdmin, backups, monitoring
  • Redis: Cache setup with Redis Commander
  • Nginx: Reverse proxy with SSL, load balancing
  • MongoDB: Database with Mongo Express interface

Each includes:

  • docker-compose.yml configuration
  • Environment variable templates
  • Comprehensive README with usage examples
  • Production best practices
  • Troubleshooting guides

How-To Guides

Available Guides (documentation/how-to-guides)

  1. Setting Up Production PostgreSQL
  2. Docker Compose Deployment
  3. Integrating LLMs in Your Application

Each guide includes:

  • Step-by-step instructions
  • Code examples and configurations
  • Verification steps
  • Troubleshooting section
  • Production checklist

Troubleshooting

See the Troubleshooting Guide for:

  • Common Docker issues
  • Database connection problems
  • API and networking issues
  • Performance optimization
  • Debug commands and tools

Key Features

  • Production-Ready Examples: All code is tested and follows best practices
  • Comprehensive Documentation: Each example includes full documentation
  • Real-World Patterns: Error handling, logging, monitoring, security
  • Multiple Languages: Shell, Python, YAML, SQL examples
  • Copy-Paste Ready: Examples can be used directly in your projects

Quick Start with Examples

# Use PostgreSQL stack
cd docker_configs/compose/postgresql
cp .env.example .env
docker-compose up -d

# Try Python LLM integration
cd documentation/examples/python/ai-integration
python llm-examples.py

# Run system monitoring
cd documentation/examples/python/automation
python system-monitoring.py

See documentation/README.md for detailed information about the documentation management system.

Getting Started

  1. Review the documentation in master_documents
  2. Use the report scripts in master_documents/reports to gather system information
  3. Set up log centralization using the scripts in master_documents/logs
  4. Install AI services using the configurations in master_documents/ai_services

Contributing

Feel free to contribute by adding new scripts, updating documentation, or improving existing tools.

About

A knowledge base repository for documents, scripts, and configurations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5