{"id":16452581,"url":"https://github.com/agent-hellboy/escp","last_synced_at":"2025-09-08T02:37:57.403Z","repository":{"id":243698557,"uuid":"806862657","full_name":"Agent-Hellboy/escp","owner":"Agent-Hellboy","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-24T17:15:44.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T12:45:12.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Agent-Hellboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-05-28T03:53:20.000Z","updated_at":"2024-10-24T17:15:48.000Z","dependencies_parsed_at":"2024-06-10T19:08:50.311Z","dependency_job_id":"638bb8e8-4b72-4339-b744-7750c43bbf92","html_url":"https://github.com/Agent-Hellboy/escp","commit_stats":null,"previous_names":["agent-hellboy/escp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Agent-Hellboy/escp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fescp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fescp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fescp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fescp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agent-Hellboy","download_url":"https://codeload.github.com/Agent-Hellboy/escp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fescp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274124799,"owners_count":25226419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-11T10:13:14.391Z","updated_at":"2025-09-08T02:37:57.378Z","avatar_url":"https://github.com/Agent-Hellboy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# escp\n\n`escp` (Enhanced SCP) is a tool designed to work like `scp` but with the added capability of automatically ignoring files or folders based on specified patterns (similar to `.gitignore`). It is especially useful for uploading files to remote servers like EC2, while excluding certain files or directories that you don't want to upload.\n\n[![codecov](https://codecov.io/gh/Agent-Hellboy/escp/graph/badge.svg?token=596VLH7OJR)](https://codecov.io/gh/Agent-Hellboy/escp)\n\n## Why `escp`?\n\nWhile working with `scp` to upload files to EC2, I wanted a way to automate the process and ignore files or folders of specific patterns (e.g., log files, temporary files, or large directories). With `escp`, you can define a `.scpignore` file, similar to `.gitignore`, to list patterns of files or directories to exclude during the `scp` upload.\n\n## Features\n\n- **Pattern-based exclusion**: Define file and directory patterns in a `.scpignore` file to automatically exclude them from being uploaded.\n\n\n## Installation\n\nTo build the binary for `escp`, follow these steps:\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/Agent-Hellboy/escp.git\n    cd escp\n    ```\n\n2. Build the binary:\n    ```bash\n    go build -o escp\n    ```\n\n3. (Optional) Move the binary to your `$PATH` for easier access:\n    ```bash\n    mv escp /usr/local/bin/\n    ```\n\n## Usage\n\n1. Create a `.scpignore` file in the root of your project (same directory where you're running `escp`) and add the patterns you want to ignore. Example `.scpignore`:\n    ```plaintext\n    *.log          # Ignore all log files\n    temp/          # Ignore everything in the temp directory\n    secret/*.key   # Ignore all key files in the secret directory\n    ```\n\n2. Use `escp` to copy files just like you would with `scp`. The tool will automatically read the `.scpignore` file and skip files that match the patterns:\n    ```bash\n    ./escp source_directory/ user@ec2:/path/to/destination\n    ```\n\n3. `escp` will print the list of files being copied and will exclude those specified in the `.scpignore` file.\n\n## Example\n\nLet's say you have the following directory structure:\n\n```\nproject/\n├── .scpignore\n├── build/\n│   ├── artifact.log\n│   ├── binary\n├── secret/\n│   └── api.key\n└── src/\n    ├── main.go\n    └── util.go\n```\n\nAnd the `.scpignore` file contains:\n```plaintext\n*.log\nsecret/\n```\n\nWhen you run `escp`:\n\n```bash\n./escp project/ user@ec2:/path/to/destination\n```\n\nThe following files will be uploaded:\n- `project/src/main.go`\n- `project/src/util.go`\n\nThe following files will be ignored:\n- `project/build/artifact.log`\n- `project/secret/api.key`\n\n\n## Improving `escp`\n\n1. **Performance Enhancements**:\n   - Add support for parallel file uploads to speed up large directory transfers.\n   - Implement incremental uploads, so only files that have changed are copied.\n\n2. **Error Handling and Logging**:\n   - Add a verbose mode (`-v`) to log detailed information during file transfers.\n   - Enhance error handling by retrying failed transfers and improving error messages.\n\n3. **Cross-Platform Support**:\n   - Extend support for Windows environments using WSL (Windows Subsystem for Linux) or native support.\n\n4. **Multiple Ignore Files**:\n   - Support multiple ignore files such as `.scpignore` and `.escpignore`. Allow custom ignore files with a command-line argument.\n\n## Testing `escp`\n\n1. **Pattern Matching Test Cases**:\n   - Test common patterns (`*.log`, `subdir/`, `subdir/*`).\n   - Check that deeply nested directories are correctly ignored.\n\n2. **Unit Tests**:\n   - Write Go unit tests for key functions like `shouldIgnore`, `filterFiles`, and `parseDirectory`.\n\n3. **Integration Tests**:\n   - Run integration tests to ensure `escp` works as expected across different directory structures and file patterns.\n\n4. **Use `.gitignore` Test Suite for Inspiration**:\n   - Git’s `.gitignore` test suite can serve as a great reference. Build a similar test suite to ensure `escp` reliably ignores files and directories based on the defined patterns.\n\n\n## Contributions\n\nI am 100% sure this broken , please test it and try to contribute if possible\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fescp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagent-hellboy%2Fescp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fescp/lists"}