desec-dns-cli 0.0.3
CLI for desec DNS API
Requires Python: >=3.6
Keywords: desec dns api cli

[![pipeline status](https://gitlab.com/XenGi/desec-dns-cli/badges/master/pipeline.svg)](https://gitlab.com/XenGi/desec-dns-cli/commits/master)
[![coverage report](https://gitlab.com/XenGi/desec-dns-cli/badges/master/coverage.svg)](https://gitlab.com/XenGi/desec-dns-cli/commits/master)
[![pypi](https://img.shields.io/pypi/v/desec-dns-cli)](https://pypi.org/project/desec-dns-cli/)
[![aur](https://img.shields.io/aur/version/desec-dns-cli)](https://aur.archlinux.org/packages/desec-dns-cli/)

# desec-dns-cli

CLI tool for the [desec.io][desec] DNS service.

# Installation

Arch Linux:

```
yay -S desec-dns-cli
```

Python (user install):

```
pip install --user desec-dns-cli
```

or with [pipx][pipx]:

```
pipx install desec-dns-cli
```

# Usage

## Account management

### Register account

Create an account with this command:

```
desec-dns-cli account register "myemail@example.com" "supersecure123!"
```

You can pipe the password to stdin with the `-p` option. With that you could retrieve it from a password manager like
pass: 

```
pass show -c accounts/desec.io | desec-dns-cli account register -p "myemail@example.com"
```

The command will obtain a captcha and display it in the default browser. Try to solve it and enter the solution in the
prompt.

### Login/Logout

```
desec-dns-cli account login "myemail@example.com" "supersecure123!"
```

You can pipe the password to stdin with the `-p` option.

```
echo "supersecure123!" | desec-dns-cli account login -p "myemail@example.com"
```

The command will create an `auth token` in your deSEC account. You can save it to the config file under
`~/.config/desec-dns-cli.conf` with the `--save` option.

To logout and remove the token from your account use:

```
desec-dns-cli account logout "my-token"
```

You need an active auth token in your config file for most operations to work.

### Account info

Get your account info in several formats:

```
desec-dns-cli account info -f json
```

### Reset password

Fill in the token and you'll get an email with a link to reset your password.

```
desec-dns-cli account reset-password email@example.com
```

### Change email address

_Not implemented yet_

## Token management

### Create/Delete tokens

_Not implemented yet_

### List tokens

_Not implemented yet_

### Save token to config

You can use the `desec-dns-cli account login --save` command to create a new token and save it to the config. To save an
already existing token use:

```
desec-dns-cli token save "mytoken"
```

## Domain management

### Create/Delete domains

_Not implemented yet_

### List domains

_Not implemented yet_

## Record set management

### Create/Delete RRsets

_Not implemented yet_

### Modify RRsets

_Not implemented yet_

### List/Query RRsets

_Not implemented yet_

# Other projects

- Python library: [desec-dns-api][desec-dns-api]
- Ansible modules: [ansible-desec-dns][ansible-desec-dns]

---

Made with ❤️ and ��.


[desec]: https://desec.io/
[desec-api]: https://desec.readthedocs.io/en/latest/
[pipx]: https://pipxproject.github.io/pipx/
[desec-dns-api]: https://gitlab.com/xengi/desec-dns-api
[ansible-desec-dns]: https://gitlab.com/xengi/ansible-desec-dns