Skip to content

aldur/clipshare

Repository files navigation

Clipshare

Simple REST clipboard service and web/CLI clients.

The clipboard contents automatically clear after 60s.

Security and access control

Clipshare does not provide any authentication mechanism. Deploy it behind Tailscale (or similar) and delegate access control to it.

Quick start

Nix

Run the server:

nix run github:aldur/clipshare#server
# clipshare-server starting on http://localhost:8080

# Set the HOST and PORT environment variables to customize where 
# the server binds.

Now, from another terminal:

nix shell github:aldur/clipshare

echo "hello world" | clipshare set

And from another terminal:

nix run github:aldur/clipshare -- get
# "hello world"

If you wait 60s, the clipboard will automatically clear.

Client usage

Command line

See the CLI for help:

clipshare -h

Set CLIPSHARE_URL or use the -u/--url flag to point the client to your clipshare-server instance.

Web

Navigate to your clipshare-server instance (http://localhost:8080 by default) to find a simple HTTP client.

REST API specs

See openapi.yaml.

Deployment

The included Nix flake provides:

  1. A NixOS module for the server.
  2. A Docker image for the server.
  3. A home-manager module for the client.
  4. Packages for both the server and the client.

Being go code, you can also just build the server/client and copy them where you need them.

Development

Nix

You can use nix to get a development shell (nix develop), build the project nix build and test it nix flake check.

About

Simple REST clipboard service and web/CLI clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors