Skip to content

Repository files navigation

PasteME - originex.tech - CLI Pastebin

You can find the homepage by visiting https://originex.tech

What is it?

PasteME is a pastebin service designed for users who need to quickly copy logs or other system files using a single command.

Why this project?

I’ve long kept a list of projects I want to build, and Hack Club gives me the motivation to learn and actually bring them to life. As for why this particular project made the list: it always annoyed me that most CLIs don't support copying the way Windows does, and I wanted a quick way to copy text.

General operating principles (and limitations)

Since this project is currently neither popular nor well-funded, there are a few limitations:

  • I am currently using the free plan on Upstash (max 256 MB and 500k commands/requests per month), but I'll move the project to my VPS once it gains popularity
  • The server is hosted on my VPS
  • The max size of a single paste is 2 MB
  • The max expiration time for the paste is 24 hours (this can be reduced)
  • I'm currently considering introducing one-time pastes or password-protected pastes, but for now, there won't be any

Instructions

For Clients

Since I currently do not have access to systems like Linux or macOS, the commands I prepare for them will be generated by AI.

Windows (PowerShell because why not)

  1. The basic command:

Invoke-RestMethod -Uri "https://originex.tech" -Method Post -InFile "file" -ContentType "application/octet-stream"

  1. It can be extended by the expiration time:

(Invoke-WebRequest -Uri "https://originex.tech" -Method Post -Headers @{"X-TTL"="300"} -InFile "file" -ContentType "application/octet-stream").Content

Remember to replace the "file" field with your own file, and note that the max expiration time for the paste is 24 hours (86400 s).

Windows (CMD)

  1. The basic command:

curl --data-binary @file https://originex.tech

  1. It can be extended by the expiration time:

curl -H "X-TTL: 300" --data-binary @file https://originex.tech

Remember to replace the "file" field with your own file, and note that the max expiration time for the paste is 24 hours (86400 s).

Linux (AI generated)

  1. The basic command:

cat file | curl --data-binary @- https://originex.tech

  1. It can be extended by the expiration time:

cat file | curl -H "X-TTL: 300" --data-binary @- https://originex.tech

Remember to replace the "file" field with your own file, and note that the maximum expiration time for the paste is 24 hours (86400 s).

MacOS (AI generated)

  1. The basic command:

cat file | curl --data-binary @- https://originex.tech

  1. It can be extended by the expiration time:

cat file | curl -H "X-TTL: 300" --data-binary @- https://originex.tech

Remember to replace the "file" field with your own file, and note that the maximum expiration time for the paste is 24 hours (86400 s).

For Server

Remember, the repository is configured to run on my server; replace all instances of originex.tech with 127.0.0.1 in main.py. And run everything on the local machine.

Requirements

  • Git
  • Docker and Docker Compose

Example env

You can find it in .env-example

Instruction

  1. Clone repo:

git clone https://github.com/wuffgame/PasteME

  1. Configure .env using .env-example
  2. Start server using: docker compose up -d --build

Note

If you notice any errors or you have any ideas, please message me immediately, preferably via Discord (anik2010), to explain the issue, so I don't mistake you for a scammer!!!

Alternatively, you can send an email to this address: [email protected], but if it ends up in the spam folder, I unfortunately won't see it.

AI Usage

I used AI to provide libraries I could use and generate commands for instructions for Linux and MacOS. I also used AI to provide the structure for the index.html file. The rest of the code was written 100% by myself.

Credits

Thanks HackClub/macondo for the motivation to work on projects from my list.

License

The project is licensed under the GNU GPL v3.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published