{"id":31840508,"url":"https://github.com/kubrickcode/baedal","last_synced_at":"2026-01-20T17:03:11.156Z","repository":{"id":318720740,"uuid":"1073579598","full_name":"KubrickCode/baedal","owner":"KubrickCode","description":"📦 Selectively download specific files or folders from Git repositories (GitHub, GitLab, Bitbucket) with automatic branch detection","archived":false,"fork":false,"pushed_at":"2026-01-12T18:26:32.000Z","size":1548,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T23:59:03.381Z","etag":null,"topics":["bitbucket","boilerplate","cli","degit","developer-tools","devtools","download","downloader","fetch","file-fetcher","giget","git","git-tools","github","gitlab","npm","repository","scaffolding","template"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/baedal","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KubrickCode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["KubrickCode"],"buy_me_a_coffee":"KubrickCode","custom":["https://qr.kakaopay.com/FD9MRukP9"]}},"created_at":"2025-10-10T10:10:56.000Z","updated_at":"2026-01-09T18:07:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"dde017f6-8ec0-4991-8ca4-414286a02f69","html_url":"https://github.com/KubrickCode/baedal","commit_stats":null,"previous_names":["kubrickcode/baedal"],"tags_count":15,"template":false,"template_full_name":"KubrickCode/Template-Repository","purl":"pkg:github/KubrickCode/baedal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KubrickCode%2Fbaedal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KubrickCode%2Fbaedal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KubrickCode%2Fbaedal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KubrickCode%2Fbaedal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KubrickCode","download_url":"https://codeload.github.com/KubrickCode/baedal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KubrickCode%2Fbaedal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","boilerplate","cli","degit","developer-tools","devtools","download","downloader","fetch","file-fetcher","giget","git","git-tools","github","gitlab","npm","repository","scaffolding","template"],"created_at":"2025-10-12T04:58:01.458Z","updated_at":"2026-01-20T17:03:11.144Z","avatar_url":"https://github.com/KubrickCode.png","language":"TypeScript","readme":"# Baedal\n\nSimple GitHub repository downloader CLI tool.\n\n## Requirements\n\n- Node.js \u003e= 18.0.0\n\n## Installation\n\n```bash\nnpm install -g baedal\n# or\npnpm add -g baedal\n```\n\n## Usage\n\n```bash\n# Download entire repository\nbaedal pull user/repo\n\n# Download to specific directory\nbaedal pull user/repo ./output\n\n# Download specific folder or file\nbaedal pull user/repo/src/components ./components\n\n# Exclude specific files or patterns\nbaedal pull user/repo --exclude \"*.test.ts\"\nbaedal pull user/repo --exclude \"*.md\" \".gitignore\"\nbaedal pull user/repo ./output --exclude \"test/**\" \"docs/**\"\n\n# File conflict handling\nbaedal pull user/repo --force                # Force overwrite without confirmation\nbaedal pull user/repo --modified-only        # Update only modified files (ignore new files)\nbaedal pull user/repo --no-clobber          # Abort if any file would be overwritten\nbaedal pull user/repo --skip-existing        # Skip existing files, only add new files\n\n# Explicit GitHub prefix\nbaedal pull github:user/repo\n\n# Using GitHub URL\nbaedal pull https://github.com/user/repo\n\n# Note: 'pull' is the default command, so 'baedal user/repo' also works\nbaedal user/repo\n```\n\n## Private Repository Authentication\n\nBaedal supports downloading from private repositories using GitHub authentication tokens.\n\n### Using CLI Flag\n\n```bash\nbaedal pull user/private-repo --token YOUR_GITHUB_TOKEN\n```\n\n### Using Environment Variables\n\n```bash\n# GitHub token\nexport GITHUB_TOKEN=your_github_token\n# or generic token\nexport BAEDAL_TOKEN=your_token\n\n# Then use baedal normally\nbaedal pull user/private-repo\n```\n\n### Token Generation\n\nCreate a GitHub Personal Access Token at Settings \u003e Developer settings \u003e Personal access tokens\n\n- Required scope: `repo` (for private repositories)\n\n## Features\n\n- Download from GitHub repositories\n- Support for private repositories with authentication tokens\n- Support for specific folders/files\n- Exclude specific files or patterns using glob patterns\n- File conflict handling modes (force, modified-only, no-clobber, skip-existing)\n- Automatic branch detection (main/master)\n- Multiple input formats (prefix, URL, or simple user/repo)\n- Zero configuration\n- Robust error handling with structured error classes (BaseError hierarchy)\n- Standardized logging with testable logger utility\n- Provider-based architecture for future multi-provider support\n- Enhanced CLI input validation for early error detection\n\n## Library Usage\n\n```typescript\nimport { baedal } from \"baedal\";\n\n// Basic usage\nawait baedal(\"user/repo\");\nawait baedal(\"user/repo\", \"./output\");\nawait baedal(\"user/repo/src\", \"./src\");\n\n// With exclude option\nawait baedal(\"user/repo\", \"./output\", {\n  exclude: [\"*.test.ts\", \"*.md\", \"test/**\"],\n});\n\n// Exclude without specifying destination (uses current directory)\nawait baedal(\"user/repo\", {\n  exclude: [\"*.test.ts\", \"docs/**\"],\n});\n\n// File conflict handling (using ConflictMode)\nawait baedal(\"user/repo\", \"./output\", {\n  conflictMode: { mode: \"force\" }, // Force overwrite without confirmation\n});\nawait baedal(\"user/repo\", \"./output\", {\n  conflictMode: { mode: \"modified-only\" }, // Update only modified files (ignore new files)\n});\nawait baedal(\"user/repo\", \"./output\", {\n  conflictMode: { mode: \"no-clobber\" }, // Abort if any file would be overwritten\n});\nawait baedal(\"user/repo\", \"./output\", {\n  conflictMode: { mode: \"skip-existing\" }, // Skip existing files, only add new files\n});\n\n// Legacy conflict handling (still supported)\nawait baedal(\"user/repo\", \"./output\", {\n  force: true, // Deprecated: use conflictMode instead\n});\n\n// Private repository with token\nawait baedal(\"user/private-repo\", \"./output\", {\n  token: process.env.GITHUB_TOKEN,\n});\n\n// Using GitHub URL\nawait baedal(\"https://github.com/user/repo\");\nawait baedal(\"https://github.com/user/repo/src\", \"./src\");\n```\n\n## Contributing\n\nThis project started as a small personal project with a development environment highly tailored to the owner. Given the low probability of external contributors, the current setup is unlikely to change.\n\nIf you'd like to contribute, please contact kubrickcode@gmail.com and we'll adapt the environment to accommodate contributions.\n\n### Development Guidelines\n\n- **Commit Format**: Follow [Conventional Commits](https://www.conventionalcommits.org/) specification\n- **Additional Info**: See [CLAUDE.md](./CLAUDE.md) for detailed development guidelines\n\n### Running Tests\n\n```bash\n# Run all tests\npnpm test\n\n# Run tests with coverage\npnpm test -- --coverage\n\n# Run tests in watch mode\npnpm test -- --watch\n```\n\n## License\n\nMIT\n","funding_links":["https://github.com/sponsors/KubrickCode","https://buymeacoffee.com/KubrickCode","https://qr.kakaopay.com/FD9MRukP9"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubrickcode%2Fbaedal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubrickcode%2Fbaedal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubrickcode%2Fbaedal/lists"}