# `WardrikDaemon.CLIToken`

Issues the token the `wardrik` command acts with.

Each time the daemon starts, it revokes the last token and makes a new one: an owner token on
every resource, good for a year. It's written to `cli_token` in the data home, readable only by
you, as JSON with the token's `id`, its `secret`, and the `url` the HTTP API listens at.

# `issue`

```elixir
@spec issue(atom(), Path.t(), String.t()) :: :ok
```

Revokes the token at `path`, makes a new one on `wardrik`, and writes it to `path` with `url`.

# `read`

```elixir
@spec read(Path.t()) :: {:ok, %{url: String.t(), secret: String.t()}} | :error
```

Returns the `url` and `secret` of the token at `path`, or `:error` if there's none.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
