Skip to main content
← All guides

Share a file from the terminal, with the link you meant to send

Why qURL here

The file is never uploaded or stored anywhere else: each download streams from your computer through qURL™, under the link you chose, and every other path stays unreachable. There is no account, API key or storage bucket to set up.

See how qURL compares to S3 presigned URLs →

Two people, ten minutes, no approval

  1. Serve the file

    In its own terminal; leave it running.

    curl -fsSLO https://layerv.ai/tools/serve-one-file.py &&
    python3 serve-one-file.py 'report.pdf' 8808

    Read serve-one-file.py →

  2. Publish it

    In a second terminal. It prints the CRID.

    qurl publish http://127.0.0.1:8808 --name "report.pdf"
  3. Make one reusable ten-minute link

    Send both people the "qurl" value after the start has passed.

    read START END < <(python3 -c 'import datetime as d; s=d.datetime.now(d.timezone.utc).replace(microsecond=0)+d.timedelta(seconds=30); print(s.strftime("%Y-%m-%dT%H:%M:%SZ"), (s+d.timedelta(minutes=10)).strftime("%Y-%m-%dT%H:%M:%SZ"))')
    qurl share <CRID> --not-before "$START" --expires-at "$END" --one-time-use=false -o json

Choose the link before you publish

Choose the link before you publish
Who should get itMakeA forwarded copyOpened a second time
Anyone you send it to, until a set time, with no approvalA scheduled link with --one-time-use=falseWorks for whoever receives it, until the link endsWorks, until the link ends
Whoever opens it first, oncequrl share with --ttlWorks only if nobody opened the link before“Access link invalid”
Named people, checked by email, with no approval from youAn invitation: qurl publish <app> --access invite_only, then qurl access invite <CRID> --email <address>. qurl share makes no links for a resource published this wayLets nobody else in: the invited mailbox and passkey are the way inThe invited person gets in again until you revoke the invitation
People who ask, after you approve each oneAccess requests: qurl publish <app> --access review, then qurl access approve for each request. qurl share makes no links for a resource published this wayThe address lets anyone ask; nobody gets in until you approve themAn approved person gets in again until you revoke them

Steps

Serve just that file on 127.0.0.1 with the short Python server below, publish it with qurl publish, then make the link that matches who should get it: a reusable link for a set time, or one that opens once. Recipients need only a browser, and nothing is uploaded. Keep your computer awake and the server running until the link expires.

  1. Install the qURL CLI

    On macOS, install it with Homebrew. On Linux and Windows, download the package for your platform from the latest release; the CLI page lists each one. For commands with --name, qurl --version must print 4.0.0 or later. Update an older CLI before copying those commands. Nothing asks you to sign up.

    brew install layervai/tap/qurl
    brew upgrade qurl
    qurl --version
  2. Check which qurl your shell runs

    This recipe needs qurl 4.3.0 or later: earlier releases cannot make a link that more than one person can open, and releases before 4.0.0 have no --name flag, which the service now requires. If the version is older, update it and run the three lines again.

    command -v qurl
    qurl --version
    qurl share --help | grep -e --one-time-use

    Check: qurl --version prints 4.3.0 or later, and the last command prints the --one-time-use line of the help. If command -v prints a path you did not just install, an older qurl comes first on your PATH.

  3. Serve only that file, in its own terminal

    qurl shares an HTTP address, not a path on disk, so the file needs a server. Run these in the folder that holds the file; the first line downloads a short Python script, which you can read before you start it. It listens on 127.0.0.1 only, so nothing on your network can reach it, and answers with the file at / and /report.pdf, under its own name. Every other path is a 404, including the files beside it and dotfiles. It reads the file on every request: to send a fixed version of a file you are still editing, copy it and serve the copy. Leave it running until you stop sharing; Ctrl+C stops it.

    Read serve-one-file.py →

    curl -fsSLO https://layerv.ai/tools/serve-one-file.py &&
    python3 serve-one-file.py 'report.pdf' 8808
    Serving only report.pdf at http://127.0.0.1:8808/ (Ctrl+C stops it)
  4. Check that it serves the file and nothing beside it

    In a second terminal. The first line shows the name the download is saved under; any other path should answer 404.

    curl -sI http://127.0.0.1:8808/ | grep -i content-disposition
    curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8808/some-other-file   # 404
    Content-Disposition: attachment; filename="report.pdf"; filename*=UTF-8''report.pdf
    404
  5. Publish it

    The first publish creates this device’s identity, with no account or API key, and starts a background service that keeps serving after you close the terminal while you stay logged in. The name is what recipients see on the link page. The resource is private: its CRID opens nothing for anyone else, and you decide who gets in with the link you make next.

    qurl publish http://127.0.0.1:8808 --name "report.pdf"
    Published
    
      Target:  http://127.0.0.1:8808
      Access:  private — only you and the people you allow can open it
      Status:  serving
    
    CRID: aeysk74bipiuilmp7uyx6yfqdb4jetztapweiufw4flzjx3uoewuhozy7jfa

    Check: Access says private and Status says serving.

  6. Stop sharing

    Ctrl+C in the server’s terminal makes the file unreachable at once, even through a link that has not expired. qurl stop stops qURL serving it until qurl start; qurl delete retires the resource and every link to it, and frees one of your shares. Without an account you can keep up to 3 active resources, with links that last up to 24 hours.

    qurl stop <CRID>          # pause; qurl start <CRID> resumes
    qurl delete <CRID> --yes  # permanent

What the recipient sees

The recipient opens the link in any browser.

More

qurl.link checks it, the browser moves to a ….qurl.site address, and report.pdf downloads under that name, with no account and no install. In Chrome the download starts on its own; some browsers, such as Safari on iPhone, ask before saving it. Opened before a scheduled start, the page says “Access starts later” with the time. Opened after the link ends, or a second time for a one-time link, it says “Access link invalid” with failure code QURL-EXPIRED. If your computer is asleep or the server is stopped, the download fails.

Link expiry and session length are different

A link decides who can start a session and until when. The session is what the browser uses to download.

Link expiry and session length are different
SettingWhat it limitsWhen it ends
--expires-at, on a scheduled linkWhen anyone holding the link can start a sessionAt that time, which also ends sessions the link opened
--ttl, on a one-time linkHow long the link waits to be openedAt the first opening or at --ttl, whichever comes first
--session-duration, on a one-time linkHow long the opened session lasts1 hour by default, 24 hours at most; an expired link does not end it early

Troubleshooting

Troubleshooting
If you seeDo this
publish fails with “Name Required (HTTP 400)”, and qurl publish --help has no --nameThe qurl your shell runs is older than 4.0.0. On macOS run brew update, then brew upgrade qurl; elsewhere install the latest release. Then run command -v qurl and qurl --version again: an older copy earlier on your PATH keeps answering until you remove it.
share says “--one-time-use requires --not-before and --expires-at”A reusable link has to be a scheduled one. Use the two-line command that sets START and END.
Show 9 more fixes
More troubleshooting
If you seeDo this
share says the times need “whole-second RFC 3339 timestamps with a future start and a later end”The start had already passed when qurl checked it. Run both lines again together; the first one computes a fresh start.
share answers “Resource Not Found (HTTP 404)” right after publish workedTwo causes. If the resource was published with --access (invite_only, review or another policy), qurl share makes no links for it, even for you: use invitations or approvals, or publish the file again without --access for a link. Otherwise qurl share ran as another identity than qurl publish: another user, another HOME, or another state folder (XDG_STATE_HOME, QURL_CONNECTOR_STATE_DIR). Run qurl whoami in both places and compare the Owner line, and run share where you published. If neither applies, email support@layerv.ai with the CRID, the UTC time and qurl --version.
share says “This qURL Connector is stopped”qURL is not serving the resource. Start the file server, run qurl start <CRID>, and check that qurl status <CRID> says serving. A scheduled link can still be made while the resource is stopped, so check the status before you send one.
publish says “a native share daemon is running at another or not-yet-ready socket”Each user has one qurl background service, and this usually means another qurl install or state folder started it. Run qurl from the same install and environment as that service. On macOS, launchctl print gui/$(id -u)/ai.layerv.qurl.share-daemon shows which program runs it. In a test environment, publish with --foreground instead: the share then lasts as long as that process runs.
share fails with “Creation Failed (HTTP 500)”A scheduled link for a resource published with --access (invite_only, review or another policy) fails this way: qurl share makes no links for such a resource. Publish the file again without --access, or use invitations or approvals. Otherwise, note the UTC time, since this error prints no request ID, and retry once; if it persists, email support@layerv.ai with the CRID, that time, qurl --version and the command you ran, never a link. A healthy connector shows only that qURL can reach the file server: the handoff is done when a recipient downloads the file.
The recipient sees “Access starts later”They opened a scheduled link before its start. Opening it again after the time on the page works; the early visit used nothing up.
The recipient sees “Access link invalid”, failure code QURL-EXPIREDThe link has ended, or a one-time link was already used. Make a new link; you do not need to publish again. Fix a one-time link that was already used →
The server stops with “Address already in use”Something else listens on port 8808. Pass another port after the file name, for example python3 serve-one-file.py report.pdf 8809, and publish http://127.0.0.1:8809.
publish says this Linux session “can’t reach a systemd user manager”You are in a container or sandbox without a user service manager. Run qurl publish with --foreground; sharing lasts as long as that process runs. Container and CI setup →

Frequently Asked Questions

Who else can get the file while it’s shared?

Whoever holds a link, as the table above says: a reusable link works for anyone it reaches until it ends, a one-time link for the first opener only. The session a link starts belongs to the browser that opened it: another browser, even on the same public IP, cannot use that session and must open the link itself, which works only if the link still allows it. Nobody reaches the files beside it: the server answers 404 for every other path.

What has to stay running, and what if my laptop sleeps?

The computer, the file server and qurl’s background service. The service reconnects after sleep, but nobody can download while the computer sleeps, and the link’s time keeps running. Closing the terminal that ran qurl publish is fine; closing the server’s terminal stops the file.

Do later downloads get the file as it was, or as it is now?

As it is now: the server reads the file on every request. Do not edit the served file during a download; that can interrupt or corrupt the copy. To send a fixed version of a file you are still editing, copy it, for example cp report.pdf report-v1.pdf, and serve the copy.

Can I share a dotfile, such as .env.example?

Yes: pass its path to the server, which keeps the name, and the files beside it, .env included, stay at 404. Anyone holding the link can read the file, so never share a real secrets file this way.

Can a CI job or script fetch the file without a browser?

Yes, with its own qurl. On that machine, qurl whoami -o json prints device_public_key_b64; on yours, qurl grants <CRID> --add with that key. The other machine then runs qurl get <CRID> --file report.pdf -o json and compares the SHA-256. A link from qurl share opens only in a browser. The publishing machine must keep serving until the fetch finishes: with --foreground, the share ends when that process exits.

Can I give three reviewers separate links and take one back?

Run qurl share once per reviewer: each link is separate, and a one-time link works for one opening. Taking back one link before it ends needs an account and the API. To revoke one person from the CLI, invite each reviewer by email instead and revoke that invitation; the other two keep theirs.

Only a named client should get it, and I’ll be offline. Does that work?

Yes, with an invitation: A named recipient. Only the invited address can get in: the person proves they control that mailbox and saves a passkey. Strangers cannot ask for access. A verified mailbox is not proof of legal identity. You approve nothing, so you can be away, but your computer and the file server must stay on.

Share a file with one person now

Serve the file on 127.0.0.1, publish it, and make a link that opens once. Use the scheduled-link option above when several people need access. No account, no upload.

Or use the CLI →

Book a pilot

Tell us what to hide. We’ll scope a pilot.

Enterprise starts with a paid pilot on one application, typically 60 to 90 days, credited in full toward year one if you convert within 60 days. After that, an annual package sized to what you protect, not per seat.