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

# `state-get`

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

## Summary

Print 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     | Return 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.
