Deployment and DevOps tooling for ByteLyst
Go to file
sarvana7 8708ae55fe
Add Ubuntu VM security update automation script
This script automates security updates for Ubuntu VMs, including unattended upgrades, SSH protection, and package integrity checks.
2026-05-04 18:03:47 -07:00
_AZURE docs: remove Ollama from VM, switch to openrouter/auto 2026-03-31 01:43:35 -07:00
.github/workflows precommit & git_repos_rebase_commit_push.sh 2025-06-25 12:29:55 -07:00
docs feat: add interactive user removal tool with wildcard matching 2025-07-04 12:49:05 -07:00
git-work-safety-tools more scripts and precommit checks 2025-06-25 12:48:48 -07:00
github_access_scripts feat: git commit related 2025-09-16 17:43:59 -07:00
github_repo_scanners feat: git commit related 2025-09-16 17:43:59 -07:00
scripts Add Ubuntu VM security update automation script 2026-05-04 18:03:47 -07:00
Slack Message Add AI-powered question answering with Perplexity API integration 2025-10-05 15:21:06 +05:30
supabase monitor Update project structure: remove MERGED directory and add new Slack Message and supabase monitor directories 2025-10-04 22:03:02 +05:30
youtube Add generated YouTube transcript summary and fix API model 2026-02-14 15:04:32 -08:00
.gitignore feat: transcript generation 2025-09-16 21:38:17 -07:00
.pre-commit-config.yaml precommit & git_repos_rebase_commit_push.sh 2025-06-25 12:29:55 -07:00
accounts.json chore: more jsons 2025-07-10 02:15:06 -07:00
bytelyst-ai.json chore: more jsons 2025-07-10 02:15:06 -07:00
bytelyst-cli.sh more changes 2025-06-23 21:59:14 -07:00
check_i_ayushh18_collaborator.sh feat: git commit related 2025-09-16 17:43:59 -07:00
CLAUDE.md feat: add interactive user removal tool with wildcard matching 2025-07-04 12:49:05 -07:00
clean_chrome.sh feat: clean up scripts 2025-05-21 21:43:59 -07:00
cleanup.sh feat: clean up scripts 2025-05-21 21:43:59 -07:00
delete_team_interactive.sh more changes 2025-06-23 21:59:14 -07:00
github_acc_input.json more changes 2025-06-23 21:59:14 -07:00
github_repos.json more changes 2025-06-23 21:59:14 -07:00
interactive_user_removal.sh feat: git commit related 2025-09-16 17:43:59 -07:00
list_all_public_repos.sh more changes 2025-06-23 21:59:14 -07:00
list_all_repos_tree.sh feat: list repos and prs 2025-06-24 23:22:19 -07:00
list_orgs_teams_members.sh more changes 2025-06-23 21:59:14 -07:00
list_prs_by_user.sh feat: list repos and prs 2025-06-24 23:22:19 -07:00
list_repos_contributors_by_user_saravanakumardb.json more changes 2025-06-23 21:59:14 -07:00
list_repos_contributors_by_user.sh more changes 2025-06-23 21:59:14 -07:00
list_repos_contributors.sh more changes 2025-06-23 21:59:14 -07:00
make_repos_private.sh ops: add failure reason 2025-02-08 23:56:43 -08:00
README_interactive_script.md feat: git commit related 2025-09-16 17:43:59 -07:00
README_remove_user_script.md feat: git commit related 2025-09-16 17:43:59 -07:00
README.md feat: add interactive user removal tool with wildcard matching 2025-07-04 12:49:05 -07:00
remove_user_from_repos.sh feat: git commit related 2025-09-16 17:43:59 -07:00
remove_user_guided.sh feat: git commit related 2025-09-16 17:43:59 -07:00
remove_user_i-ayushh18.sh feat: git commit related 2025-09-16 17:43:59 -07:00
remove_user_interactive.sh feat: git commit related 2025-09-16 17:43:59 -07:00
repos.json users and repos 2025-06-23 21:11:45 -07:00
repos.txt repos.txt 2025-05-21 21:43:42 -07:00
saravanakumardb1.json chore: more jsons 2025-07-10 02:15:06 -07:00
saravanakumardb.json chore: more jsons 2025-07-10 02:15:06 -07:00
setup.sh chore: more jsons 2025-07-10 02:15:06 -07:00
sync_repos.sh sync_repos.sh 2026-04-13 15:10:02 -07:00
test_interactive.sh feat: git commit related 2025-09-16 17:43:59 -07:00
test.sh feat: clean up scripts 2025-05-21 21:43:59 -07:00
users_black_list.json more changes 2025-06-24 00:14:27 -07:00
users_white_list.json more changes 2025-06-24 00:14:27 -07:00

ByteLyst DevOps Tools

A comprehensive collection of Bash-based DevOps tools for GitHub repository management, specifically designed for ByteLyst AI organization. The tools focus on repository security, user management, and multi-repository operations.

🚀 Quick Start

  1. Setup the environment:

    ./setup.sh
    
  2. Set your GitHub token:

    export GITHUB_TOKEN=your_github_token_here
    
  3. Run the main CLI:

    ./bytelyst-cli.sh
    

📋 Available Tools

🎯 Main CLI Interface

  • bytelyst-cli.sh - Unified command-line interface for all tools
    • Interactive menu mode
    • Direct command execution
    • Supports both user and organization operations

🔐 User Management Tools

  • remove_user_interactive.sh - Interactive user removal with wildcard repository matching
    • Supports patterns like *-go-api*, frontend-*
    • Handles both root account and organization repositories
    • Rich visual logging with progress tracking
    • Flexible confirmation system (yes/no/all/skip/quit)

🛡️ Git Safety Tools (git-work-safety-tools/)

  • git_repos_status.sh - Recursively scan directories for git repositories status
  • git_repos_rebase_commit_push.sh - Safely rebase, commit, and push changes
  • multi_repo_*.sh - Additional multi-repository management utilities

📊 Repository Analysis Tools

  • list_all_public_repos.sh - List all public repositories for a user
  • list_orgs_teams_members.sh - List organization teams and members
  • list_prs_by_user.sh - List pull requests by specific user
  • list_repos_contributors.sh - List contributors for repositories
  • list_repos_contributors_by_user.sh - List contributors filtered by user

🔧 Repository Management Tools

  • make_repos_private.sh - Convert public repositories to private
  • delete_team_interactive.sh - Interactive team deletion tool
  • cleanup.sh - General cleanup utilities

🛠️ Prerequisites

  • Required tools: curl, jq
  • GitHub Personal Access Token with permissions:
    • repo (for repository access)
    • admin:org (for organization management)

📝 Usage Examples

Interactive User Removal

./remove_user_interactive.sh
# Follow the prompts to:
# 1. Enter GitHub token
# 2. Specify root user/organization
# 3. Enter user to remove
# 4. Define repository pattern (e.g., *-go-api*)
# 5. Confirm removals interactively

CLI Commands

# List public repositories
./bytelyst-cli.sh list-public-repos --user username

# List private repositories
./bytelyst-cli.sh list-private-repos --org orgname

# Check collaborators
./bytelyst-cli.sh check-collaborators --input input.json

# Remove user from all matching repositories
./bytelyst-cli.sh remove-user-from-all-repos --user username

Git Repository Status

# Check status of all git repositories in current directory tree
./git-work-safety-tools/git_repos_status.sh

# Safe multi-repository operations
./git-work-safety-tools/multi_repo_safe_push.sh

📁 Configuration Files

  • github_repos.json - Repository configuration for batch operations
  • github_acc_input.json - Account input configuration
  • users_white_list.json / users_black_list.json - User access control lists
  • repos.json / repos.txt - Repository lists for operations

🔒 Security Features

  • Token validation before operations
  • Interactive confirmations for destructive operations
  • Access control via whitelist/blacklist mechanisms
  • Pre-commit hooks with security checks
  • Error handling for API failures and network issues

🎨 Visual Features

  • Rich logging with colors and emojis
  • Progress tracking with percentage indicators
  • Summary reports with success/failure statistics
  • Interactive menus for ease of use

📋 Pre-commit Hooks

This project uses pre-commit to ensure code quality and consistent formatting for all contributors.

First-time setup

  1. Run the setup script (recommended):

    ./setup.sh
    

    This will install pre-commit (if not already installed) and set up the git hooks for you.

  2. Or, manually install pre-commit and the hooks:

    pip install pre-commit
    pre-commit install
    

Running hooks manually

To check all files with pre-commit hooks:

pre-commit run --all-files

CI Enforcement

All commits and pull requests are checked with pre-commit hooks in CI. You must pass these checks to merge code.

🤝 Contributing

  1. Ensure all scripts pass shellcheck validation
  2. Follow existing code conventions and patterns
  3. Add appropriate error handling and logging
  4. Test scripts thoroughly before committing
  5. Update documentation for new features

📄 License

This project is designed for internal use by ByteLyst AI organization.