Home

Awesome

paperless-cli

license Build Status

badge Stargazers over time

Table of Contents

Description

A CLI tool written in Go to interface with a Paperless instance.

Installation and usage

Prerequisites

You should have a working Go environment and have $GOPATH/bin in your $PATH.

Precompiled binary

You can get a precompiled binary from the releases page (soon).

Self-compiled binary

To download source, compile, and install, run:

$ go get -u github.com/stgarf/paperless-cli
$ $GOPATH/src/github.com/stgarf/paperless-cli/build.sh

The source code will be located in $GOPATH/src/github.com/stgarf/paperless-cli.

A newly compiled binary will be in $GOPATH/src/github.com/stgarf/paperless-cli/bin/

You can place the binary in you $PATH for easy usage. e.g.

$ cp $GOPATH/src/github.com/stgarf/paperless-cli/bin/paperless-cli $GOPATH/bin

$ which paperless-cli should return the path to the newly installed binary.

Usage

Check paperless-cli version

$ paperless-cli version
paperless-cli v0.6.0 built on 2019-03-10T16:28:33Z from git:c8dd2e7-clean (master) by user@chrx

Setting up a config

You can set up a basic YAML-based configuration to be read by placing it in $HOME/.paperless-cli.yaml.

A base config can be autogenerated with paperless-cli config create.

Here's an example configuration:

# A basic paperless-cli configuration file.

# The hostname of the Paperless instance.
hostname: localhost
# Connect via HTTP or HTTPS.
use_https: false
# Port the Paperless instance is listening on.
port: 8000
# Path to the API root.
root: /api
# Username to auth to Paperless instance.
username: myUsername
# Username to auth to Paperless instance.
password: mYpa$$w0rd.is.h0p3fully.s3cur3!!1

Development

Prerequisites

You should have a working Go environment and have $GOPATH/bin in your $PATH.

Get the code

To download the source code, run:

$ go get -du github.com/stgarf/paperless-cli

The source code will be located in $GOPATH/src/github.com/stgarf/paperless-cli.

Running the tests

$ go test

Really though, there are none and need to be written.

Built With

Contributing

Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests to the project.

Versioning

We use SemVer for versioning, roughly. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Acknowledgments