#paste #hastebin #tool #cli

app spacebin-cli

text sharing for astronauts

10 releases

0.2.2 Jun 15, 2020
0.2.1 Jun 15, 2020
0.1.9 Jun 13, 2020

#1454 in Development tools

BSD-3-Clause-Clear and LGPL-3.0

22KB
308 lines

🔭 Spacebin Client

Crates.io Crates.io (recent) GitHub GitHub release (latest by date)

Fast and stable CLI client for Spacebin
  • Built for speed and efficiency using Rust. 🦀
  • Simple and easy to use. 🔭
  • Stable and well maintained as of 2020. 🌆

Installation

Spacebin can be installed via the Rust package manager, cargo.

(If you don't have cargo installed, visit the Rust installation page here)

To install Spacebin, simply type:

$ cargo install spacebin-cli

After installing spacebin will be available in your shell (providing everything went correctly) under the command space.

Usage

space comes with a lot of handy features. The easiest way of uploading is just piping input from another command, like this:

piping

If you'd like a quick link to an entire file, try using the --upload flag.

upload flag

For a more detailed list of options, try space --help in your terminal.

Configuration

You can configure space's defaults through the use of environment variables. Here's what they all do:

  • SPACEBIN_INSTANCE changes the API instance that it's uploading to. Default: api.spaceb.in
  • SPACEBIN_RESULT_URL changes the URL that's generated after upload. Default: spaceb.in
  • SPACEBIN_PORT changes the TCP port that space communicates through when uploading. Default: 443
  • SPACEBIN_USE_SPINNERS changes if the command will display those fancy uploading progress bars. Default: true

Custom Instances

Since spacebin-org/spacebin is free and open source, it means you can host an instance, or copy of it on your own server.

A few fun ways to use this could be:

  • Have custom links, for example, https://lets-go-to.space
  • Keep an airtight seal on who accesses your pastes.
  • Customize spacebin's databases and themes.

In order to setup your instance of spacebin, follow the wiki's Getting Started section.

Next, configure space in your terminal to your liking.

In my .zshenv (or .bashrc), I would add

export SPACEBIN_INSTANCE=api.lets-go-to.space
export SPACEBIN_RESULT_URL=lets-go-to.space

Next time you run space, it'll pull from your shell's environment variables and use your settings.

Contributors

License

This project is licensed under the 3-Clause "Clear" BSD license, the same license as all other spacebin core team projects. A copy of this license can be found in LICENSE.md

Dependencies

~13–26MB
~391K SLoC