https://github.com/h5law/paste-cli
A CLI tool to interact with a paste-server instance
https://github.com/h5law/paste-cli
cli go golang pastebin pastebin-client
Last synced: about 2 months ago
JSON representation
A CLI tool to interact with a paste-server instance
- Host: GitHub
- URL: https://github.com/h5law/paste-cli
- Owner: h5law
- License: bsd-3-clause
- Created: 2022-08-21T11:33:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T10:31:57.000Z (about 2 years ago)
- Last Synced: 2024-11-12T11:39:49.869Z (6 months ago)
- Topics: cli, go, golang, pastebin, pastebin-client
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - h5law/paste-cli - A CLI tool to interact with a paste-server instance (golang)
README
# paste-cli
This is a simple CLI tool written in Go to interact with a
[paste-server](https://github.com/h5law/paste-server) either a self hosted
instance or the main hosted site.[](https://asciinema.org/a/UeJw4fxNgcgHfrS5SoGYHuuRW)
## Install
To install and run this project simply clone the repo:
```
git clone https://github.com/h5law/paste-cli
```Then install the dependencies and build the binary:
```
cd paste-cli
go mod tidy
go build -o paste
```You can then run the command with `./paste` or move it into your `$PATH` and
execute it via `paste` anywhere on the computer.## Config
The paste command will look for a config file (by default `$HOME/.paste.yaml`)
which can control the url of the paste-server instance to interact with.The document should look like this:
```
url: ":"
```So for local instances on port 3000 it would look like:
```
url: "http://127.0.0.1:3000"
```You can also use the `--config` flag to use a config file elsewhere or if no
config file is found / given the paste command will default to using the main
server URL.