Liberty CLI
project | code | tracker | pypi
Liberty CLI is a user-facing command-line client for interacting with Librem One or another Liberty Deckplan Host (LDH).
Dive into https://liberty.one for LDH design and development.
Installation
The preferred way to install Liberty CLI is with your package
manager. The recommended package name is ldh-client. For example:
sudo apt install ldh-client # Debian-based
or
pipx install ldh-client # Python-based
Usage
The following commands are available:
# INFO
liberty show info
# TUNNEL
liberty setup tunnel
For instructions and options add --help, for example:
liberty setup tunnel --help
Prototype quickstart
To install prototype components on PureOS or another Debian-based system from scratch:
sudo apt install pipx
pipx ensurepath
pipx install ldh-client
liberty setup dependencies # triggers sudo prompt
liberty setup prototype
To update the prototype:
pipx upgrade ldh-client # or pipx upgrade-all
liberty setup dependencies # triggers sudo prompt
liberty setup prototype
To remove the prototype:
liberty remove dependencies # optional, triggers sudo prompt
liberty remove prototype
pipx uninstall ldh-client
sudo apt remove pipx # optional
Installation (from source)
If you'd prefer to run from source...
-
Install Python 3.x and pipenv. (See https://docs.pipenv.org/install/ for a tutorial.)
-
Install prerequisites:
sudo apt install gir1.2-goa-1.0 libcairo2-dev / libgirepository1.0-dev libssl-dev / network-manager-openvpn-gnome python3-dev -
Install optional prerequisites:
sudo apt install rclone yad -
Get source:
git clone https://source.puri.sm/liberty/tool/client.git ldh_client -
Install with pipenv:
cd ldh_client pipenv install --dev -e .
Usage (from source)
cd ldh_client
pipenv run liberty show info
Prototype quickstart (from source)
Ensure that ~/.local/bin is on your $PATH:
sudo apt install pipx
pipx ensurepath
# pipx is used only to set the path
# you may prefer to modify your .bashrc or some other method
Follow the from-source instructions, then create the liberty-dev
executable as follows:
cd ldh_client/liberty-dev
./bootstrap
# creates ~/.local/bin/liberty-dev and associated symlinks
# re-run this any time you move the ldh_client folder
Now install prototype components:
liberty-dev setup dependencies
liberty-dev setup prototype --dev
Note that setup prototype always overrides existing prototype
components. This means you can point to either liberty or
liberty-dev, never both.
To remove the prototype components and liberty-dev:
liberty-dev remove dependencies # optional, triggers sudo prompt
liberty-dev remove prototype
cd ldh_client/liberty-dev
./remove
Troubleshooting
When debugging, troubleshooting or asking for help please include the output of:
liberty show info
or
liberty show info --gui
# the same information in a graphical window (supports copy-and-paste)
Replace liberty with pipenv run liberty or liberty-dev as
appropriate.
Build wheel package (and optionally upload)
Follow these instructions to build Liberty CLI as a Python package:
git clone https://source.puri.sm/liberty/tool/client.git ldh_client
cd ldh_client
pipenv install --dev
pipenv shell
# optionally edit default.strict.yaml
python setup.py sdist bdist_wheel
If everything works as expected you should end up with the files:
dist/ldh_client-<version>-py3-none-any.whldist/ldh_client-<version>.tar.gz
You can now optionally upload the created Python package to PyPI using twine:
twine upload dist/*
Sharing and contributions
Liberty CLI (LDH client)
https://source.puri.sm/liberty/tool/client
Copyright 2018-2020 Purism SPC
SPDX-License-Identifier: AGPL-3.0-or-later
Shared under AGPL-3.0-or-later. We adhere to the Community Covenant 1.0 without modification, and certify origin per DCO 1.1 with a signed-off-by line. Contributions under the same terms are welcome.
For details see:
- COPYING.AGPL.md, full license text
- CODE_OF_CONDUCT.md, full conduct text
- CONTRIBUTING.DCO.md, full origin text (
git -s)
Metadata
Release files for ldh-client 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ldh_client-0.0.11.tar.gz | 33.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ldh_client-0.0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.8 kB
Release files / ldh_client-0.0.11.tar.gz
| Download URL | ldh_client-0.0.11.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
059cee86f59b59727d78e329585e3413a5f27f8be40c88c7f4443df77e47d985
|
|
BLAKE2b-256 checksum How to use checksums |
6d131adbb74ae9ef434760855b9e47cdb1ae5269b5eadfd83464058f719b09aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7
|
Release files / ldh_client-0.0.11-py3-none-any.whl
| Download URL | ldh_client-0.0.11-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42919d3b337a3e845ba21e19d0b7035c027d8f0e915b0fa5a58228bbf8d24fbe
|
|
BLAKE2b-256 checksum How to use checksums |
9b40638c45e3640da558cf76423636190baeff3428c07b3ff9f076ec6d00273c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7
|
Security for ldh-client 0.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.