🔭 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](https://www.rust-lang.org/tools/install))_ To install Spacebin, simply type: ```sh $ 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](https://raw.githubusercontent.com/spacebin-org/assets/master/animated/cli/piping.gif) If you'd like a quick link to an entire file, try using the `--upload` flag. ![upload flag](https://raw.githubusercontent.com/spacebin-org/assets/master/animated/cli/from-file.gif) 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](api.spaceb.in)** * `SPACEBIN_RESULT_URL` changes the URL that's generated after upload. **Default: [spaceb.in](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`](https://github.com/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](https://github.com/spacebin-org/spacebin/wiki). Next, configure `space` in your terminal to your liking. In my `.zshenv` (or `.bashrc`), I would add ```sh 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 - [Jack Dorland ](https://github.com/heyitspuggo) - Primary developer and maintainer. ## 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`](LICENSE.md)