{"id":20170088,"url":"https://github.com/samuelcaldas/pastebin-bash","last_synced_at":"2026-05-06T00:02:38.942Z","repository":{"id":253845722,"uuid":"304985940","full_name":"samuelcaldas/pastebin-bash","owner":"samuelcaldas","description":"Post text or files to pastebin.com using pastebin-bash. Features include posting messages or entire files and getting the URL of your post.","archived":false,"fork":false,"pushed_at":"2025-05-31T23:36:48.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T10:13:13.648Z","etag":null,"topics":["bash","bash-script","pastebin","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelcaldas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-10-17T23:17:11.000Z","updated_at":"2025-05-31T23:36:51.000Z","dependencies_parsed_at":"2024-08-19T23:55:17.119Z","dependency_job_id":null,"html_url":"https://github.com/samuelcaldas/pastebin-bash","commit_stats":null,"previous_names":["samuelcaldas/pastebin-bash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samuelcaldas/pastebin-bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcaldas%2Fpastebin-bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcaldas%2Fpastebin-bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcaldas%2Fpastebin-bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcaldas%2Fpastebin-bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelcaldas","download_url":"https://codeload.github.com/samuelcaldas/pastebin-bash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcaldas%2Fpastebin-bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bash","bash-script","pastebin","shell-script"],"created_at":"2024-11-14T01:16:17.646Z","updated_at":"2026-05-06T00:02:38.908Z","avatar_url":"https://github.com/samuelcaldas.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pastebin-bash\n\npastebin-bash is a Bash function that allows you to easily post text or files to pastebin.com using `curl`. \n\n## Features\n\nWith pastebin-bash, you can:\n\n- **Post simple messages** to pastebin.com using the command `pastebin 'your message'`.\n- **Post entire files** to pastebin.com using the command `cat your_file.txt | pastebin` or `pastebin -f your_file.txt`.\n- **Customize your pastes** with options for:\n  - Title/name (`-n`, `--name`)\n  - Expiration time (`-e`, `--expire`)\n  - Privacy level (`-p`, `--private`)\n  - Syntax highlighting (`-l`, `--language`)\n- **Get the URL** of your post in the standard output.\n- **View help documentation** with `pastebin -h` or `pastebin --help`.\n\n## Setup\n\nTo start using pastebin-bash, follow these steps:\n\n1. **Ensure Dependencies**: Make sure `bash` and `curl` are installed on your system. You can verify this with:\n   ```bash\n   bash --version\n   curl --version\n   ```\n2. **Obtain a Pastebin API Key**: \n   - Sign up for an account at [pastebin.com](https://pastebin.com).\n   - Obtain your API key from the [Pastebin API documentation](https://pastebin.com/doc_api).\n   \n3. **Set Up the Function**:\n   - Copy and paste the bash function from `pastebin.sh` into your terminal or add it to your `.bashrc` or `.bash_profile`.\n   - Set the API key as an environment variable:\n     ```bash\n     export PASTEBIN_API_KEY='your_api_key'\n     ```\n   - Replace `'your_api_key'` with the API key obtained in step 2.\n\n## Usage\n\nOnce set up, you can use the `pastebin` function in your terminal:\n\n### Basic Usage\n\n- To post a message:\n  ```bash\n  pastebin 'your message'\n  ```\n\n- To post a file:\n  ```bash\n  cat your_file.txt | pastebin\n  # OR\n  pastebin -f your_file.txt\n  ```\n\n### Advanced Options\n\n- To post a file with syntax highlighting:\n  ```bash\n  pastebin -f script.py -l python -n \"My Python Script\"\n  ```\n\n- To create a private paste that expires in one hour:\n  ```bash\n  pastebin -p 1 -e 1H \"Secret message\"\n  ```\n\n- To see all available options:\n  ```bash\n  pastebin --help\n  ```\n\n#### Available Options\n\n| Option | Description | Values |\n|--------|-------------|--------|\n| `-f`, `--file` | Read from file instead of stdin or argument | File path |\n| `-n`, `--name` | Set paste name/title | Text |\n| `-e`, `--expire` | Set expiration time | N_MINUTES, 1H, 1D, 1W, 2W, 1M, 6M, 1Y |\n| `-p`, `--private` | Set privacy level | 0=public, 1=unlisted, 2=private |\n| `-l`, `--language` | Set syntax highlighting language | python, bash, c, etc. |\n| `-h`, `--help` | Display help message | |\n\n## Contributors\n\nThe original concept for this script was inspired by a [Stack Overflow post](https://stackoverflow.com/a/58440856/10637718). All credit goes to the original author.\n\n## Project Status\n\npastebin-bash is maintained and actively developed. The latest update includes enhanced functionality, better error handling, and improved security with HTTPS support. Contributions and feature requests are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelcaldas%2Fpastebin-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelcaldas%2Fpastebin-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelcaldas%2Fpastebin-bash/lists"}