<a id="hook-command-state-get"></a>

# `state-get`

> See also: [state-delete](https://documentation.ubuntu.com/juju/3.6/reference/hook-command/list-of-hook-commands/state-delete.md), [state-set](https://documentation.ubuntu.com/juju/3.6/reference/hook-command/list-of-hook-commands/state-set.md)

## Summary

Prints server-side-state value.

## Usage

` state-get [options] [<key>]`

### Options

| Flag             | Default   | Usage                                                 |
|------------------|-----------|-------------------------------------------------------|
| `--format`       | smart     | Specify output format (json|smart|yaml)               |
| `-o`, `--output` |           | Specify an output file                                |
| `--strict`       | false     | Returns an error if the requested key does not exist. |

## Details

`state-get` prints the value of the server side state specified by key.
If no key is given, or if the key is `"-"`, all keys and values will be printed.
