Updates README

pull/7/head
Kushal Das 6 months ago
parent 4d92a08eab
commit 093511b597
Signed by: kushaldas
GPG Key ID: C65FF007C75766ED

@ -3,11 +3,15 @@
This is a commandline tool for knotapi: https://gitlab.nic.cz/knot/knot-dns-rest
## Build and install
To install using pip, run the following command:
To install using pip, run the following command in a virtual envrionment.
```
pip3 install git+https://code.smolnet.org/micke/knotctl
python -m pip install "knotctl @ git+https://code.smolnet.org/micke/knotctl
```
To build and install as a deb-package
```
sudo apt install python3-stdeb
git clone https://code.smolnet.org/micke/knotctl
@ -18,25 +22,34 @@ sudo dpkg -i deb_dist/knotctl_*_all.deb
A prebuilt deb-package is also available from the release page: https://code.smolnet.org/micke/knotctl/releases/
## Shell completion
For bash: add this to .bashrc
```
source <(knotctl completion)
```
For fish, run:
```
knotctl completion --shell fish > ~/.config/fish/completions/knotctl.fish
```
For tcsh: add this to .cshrc
```
complete "knotctl" 'p@*@`python-argcomplete-tcsh "knotctl"`@' ;
```
For zsh: add this to .zshrc
```
autoload -U bashcompinit
bashcompinit
source <(knotctl completion)
```
## Usage
```
usage: knotctl [-h] [--json | --no-json]
{add,completion,config,delete,list,update} ...
@ -48,7 +61,9 @@ options:
-h, --help show this help message and exit
--json, --no-json
```
### ADD
```
usage: knotctl add [-h] -d DATA -n NAME -r RTYPE [-t TTL] -z ZONE
@ -60,7 +75,9 @@ options:
-t TTL, --ttl TTL
-z ZONE, --zone ZONE
```
### COMPLETION
```
usage: knotctl completion [-h] [-s SHELL]
@ -68,7 +85,9 @@ options:
-h, --help show this help message and exit
-s SHELL, --shell SHELL
```
### CONFIG
```
usage: knotctl config [-h] [-c CONTEXT] [-b BASEURL] [-p PASSWORD] [-u USERNAME]
@ -79,7 +98,9 @@ options:
-p PASSWORD, --password PASSWORD
-u USERNAME, --username USERNAME
```
### DELETE
```
usage: knotctl delete [-h] [-d DATA] [-n NAME] [-r RTYPE] -z ZONE
@ -90,7 +111,9 @@ options:
-r RTYPE, --rtype RTYPE
-z ZONE, --zone ZONE
```
### LIST
```
usage: knotctl list [-h] [-d DATA] [-n NAME] [-r RTYPE] [-z ZONE]
@ -101,7 +124,9 @@ options:
-r RTYPE, --rtype RTYPE
-z ZONE, --zone ZONE
```
### UPDATE
```
usage: knotctl update [-h] -a [ARGUMENT ...] -d DATA -n NAME -r RTYPE [-t TTL]
-z ZONE

Loading…
Cancel
Save