#serve #file-server #ui #directory #upload #networking #default #download #back-end

bin+lib nlfmt-serve

quickly serve files from a directory in your local network

12 releases (4 breaking)

new 0.5.3 Apr 19, 2025
0.5.2 Apr 16, 2025
0.4.2 Apr 15, 2025
0.3.2 Apr 9, 2025
0.1.0 Mar 7, 2025

#728 in Command line utilities

Download history 264/week @ 2025-03-07 14/week @ 2025-03-14 423/week @ 2025-04-04 643/week @ 2025-04-11

1,066 downloads per month

MIT license

665KB
1.5K SLoC

Contains (WOFF font, 200KB) file-icons-Byv9wKV-.woff2, (WOFF font, 78KB) fontawesome-B-jkhYfk.woff2, (WOFF font, 53KB) devopicons-JYBX4xNv.woff2, (WOFF font, 26KB) app/dist/assets/mfixx-DfQCz-aF.woff2, (WOFF font, 21KB) app/dist/assets/octicons-CS-gsnb3.woff2

serve

Quickly serve and receive files to/from anyone on your local network, using an easy web ui

serve ui example

Features

  • Easy and quick Uploads
  • Zip Folder downloads
  • Rename/Delete Files and Folders
  • QR Code to connect
  • Password Protection
  • Sane Defaults
  • Fast, thanks to rust backend
  • Goodlooking UI

Installation

Using cargo:

cargo install nlfmt-serve
serve --help

From source:

git clone https://github.com/nlfmt/serve
cd serve
# build frontend
cd app && pnpm i && pnpm build
cd .. && cargo install --path .
serve --help

Using the pre-built binaries: Go to the latest release and download the file for your operating system. Move it to any folder you want and add it to your PATH.

Usage

serve [args] [path]

When running the serve command without any arguments, it will serve the current directory on port 3000, with all extra features like upload, file operations turned off.

Here is a list of flags available, or just run serve --help

serve -p 4001      # run on port 4001
serve -i 127.0.0.1 # only run on localhost (default is all interfaces - 0.0.0.0)

serve -u           # enable uploads
serve -q           # print QR Code when starting
serve -s           # resolve symbolic links when serving files/folders
serve -r           # allow renaming files
serve -d           # allow deleting files
serve -o           # allow overwriting files during upload

# you can combine these options
serve -uqs  # enable upload & symlinks, print QR Code

# add username & password
serve -a user:pass
# file of logins formatted as user:pass separated by newlines
serve --auth-file ./mylogins.txt

Feature Plan

  • add download folder as zip or tar.gz
  • Uploads
    • upload button in breadcrumbs, popup with drop zon
    • drop zone anywhere in the window -> upload to current folder
    • drop zone on folders => upload to that folder
  • folder uploads (locked behind flag)
  • dont download symlinks, unless specified with flag
  • allow setting a password & username
    • --auth, -a, or --auth-file (maybe hashed?)
  • show error message when path was not found with a button "back to root"
  • add logging to file
  • add progress bar popup
  • add support for multiple interfaces via -i, --interface
  • support for custom headers
  • tls support via --tls-cert and --tls-key
  • context menu
    • allow creating directories
    • file/folder info popup
    • delete/rename ? (secured behind flag)
  • add right click action api & args
    • rename
    • delete
    • create folder
  • add qr code button on mobile
  • lock zip generation behind flag, add tar/tar.gz
  • show symlink symbol in UI
  • add good error logging in cli
  • automated compile pipeline with releases
  • recursive file search (streamed)
  • custom download ui & progress
  • chunked uploads & download
    • resumable uploads & downloads
  • insert prev name in rename dialog and select the text
  • allow moving files/folders using drag and drop
  • add update command
    • check install source, either use cargo or github release
    • show update notice when running

Dependencies

~31–64MB
~1M SLoC