Skip to main content

Cross-platform command-line client for dShare — type-to-share files and text between devices.

Project description

dshare-cli

A cross-platform command-line client for dShare — the same 10-second "public share" flow as typing divya / moti on the web UI, from a terminal on Linux, macOS, or Windows.

It talks to your dShare server's existing public endpoints (/upload/, /download/, /api/share/clear/) — no server changes required, and it doesn't touch private/login-based sharing.

Install

Requires Python 3.9+ (any OS). pipx is recommended since it keeps the CLI's dependencies isolated:

pipx install dshare-cli

Or with plain pip:

pip install dshare-cli

Until the first release is published, install straight from GitHub instead:

pipx install "git+https://github.com/motiedivya/dshare.git#subdirectory=cli"

For local development (from a clone of this repo):

cd cli
pip install -e .

All of these work identically on Windows (PowerShell/cmd), macOS, and Linux — the CLI has no shell scripts and no OS-specific setup steps.

Releasing (maintainers)

Publishing to PyPI is fully automated via GitHub Actions + PyPI Trusted Publishing (OIDC) — no API tokens stored anywhere. The version number is derived from the git tag itself (via hatch-vcs), so there's nothing to bump by hand. To ship a release:

git tag cli-v0.1.0
git push origin cli-v0.1.0

That triggers .github/workflows/publish-cli.yml, which builds the package and publishes dshare-cli==0.1.0 to PyPI. See that workflow's comments / the main repo README for the one-time PyPI Trusted Publisher setup this depends on.

Setup

Point the CLI at your dShare server once:

dshare config https://your-dshare-host.example.com

This is saved to a per-OS config file (~/.config/dshare/config.json on Linux, ~/Library/Application Support/dshare/config.json on macOS, %APPDATA%\dshare\config.json on Windows). You can override it per-command with --server, or via the DSHARE_SERVER environment variable — handy for CI or scripting.

Usage

Upload a file (same as typing divya and picking a file):

dshare send report.pdf

Upload text (same as /paste):

dshare send --text "some text to move between devices"
echo "some text" | dshare send      # piping works too

Download the latest shared file or text (same as typing moti):

dshare receive
  • If the slot holds a file, it's saved to the current directory (or -o/--output).
  • If the slot holds text, it's printed to stdout — so dshare receive > out.txt or dshare receive | pbcopy / | clip works.
  • If stdout isn't a terminal, file bytes stream straight to stdout too (like curl).

Clear the slot (same as /clear):

dshare clear

Check what server you're pointed at and whether it's reachable:

dshare status

divya and moti also work as aliases for send/receive, matching the web UI's keywords:

dshare divya report.pdf
dshare moti

Notes

  • This CLI only uses the public lane (the same one anonymous visitors to the web UI get) — it does not log in or touch private per-user slots.
  • Self-signed/local server? Pass --insecure to skip TLS verification.
  • Exit codes: 0 success, 1 error, 2 the slot was empty on receive.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dshare_cli-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dshare_cli-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file dshare_cli-0.1.0.tar.gz.

File metadata

  • Download URL: dshare_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dshare_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dba8d1b674f9459a2b2893338f454dd55145d86b0f0d8f944eb8ccc3b7c4ac6a
MD5 59cc69c907f0fb7efdd0d5b886e4fe30
BLAKE2b-256 97c9d22d260271bfdbfe7d1ff05021d2f625951d655000d54560580fbc01c883

See more details on using hashes here.

Provenance

The following attestation bundles were made for dshare_cli-0.1.0.tar.gz:

Publisher: publish-cli.yml on motiedivya/dshare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dshare_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dshare_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dshare_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13d2b8ddcdf95089b13c0cc3c8a732f79efb1e3fd97e9bf5e90a70ef039926f0
MD5 e736322d19b2209d1de24b009bf7d07e
BLAKE2b-256 cad792cf3f423a4b55121e1844144ecba7b430d5b40e897cf821a6748417e7e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dshare_cli-0.1.0-py3-none-any.whl:

Publisher: publish-cli.yml on motiedivya/dshare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page