https://github.com/healeycodes/file-share-cli
📁 Share files with friends from your terminal.
https://github.com/healeycodes/file-share-cli
share-files terminal upload-file
Last synced: 28 days ago
JSON representation
📁 Share files with friends from your terminal.
- Host: GitHub
- URL: https://github.com/healeycodes/file-share-cli
- Owner: healeycodes
- Created: 2022-12-27T13:01:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-03T16:39:42.000Z (over 2 years ago)
- Last Synced: 2025-05-12T19:12:56.239Z (28 days ago)
- Topics: share-files, terminal, upload-file
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📂 file-share-cli
> My blog post: [A Personal File Share CLI](https://healeycodes.com/a-personal-file-share-cli)
A quick way to share public files with friends.
I built this to get around Discord's file size limit.
Visiting the home path `/` returns a copy-able shell function with a dynamic URL like this:
```bash
# if you are me, copy this to your ~/.bashrc
# and use it like this: share somefile.txt
# and a download link will be echoed
# (don't forget to replace user/pass)
function share () {
curl -u user:pass -F "file=@$1" https://my-url-at.railway.app/upload
}
```You can then upload files from your terminal and get a download link.
Note: dragging files into the terminal on macOS pastes the file's path!
## Dev
Start the server.
```bash
AUTH_USERNAME=a AUTH_PASSWORD=b go run .
```Visit `localhost:4000` and copy the bash snippet.
## Deploy
Deployable via [Railway](https://railway.app).
Set environmental variables `AUTH_USERNAME` and `AUTH_PASSWORD`.