> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcliq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# cliq hug commands

> cliq hug new, dev, build, list and files.

Hugs › Reference

| Command | |
| - | - |
| `cliq hug new <name>` | Scaffold a hug |
| `cliq hug dev [dir]` | Work on it in the browser |
| `cliq hug build [dir]` | Build it into `dist/` and check the bundle |
| `cliq hug list` | Every hug this machine can find |
| `cliq hug files <phase> <input> <dir>` | Save the files people sent in a Hug |

## `cliq hug new <name>`

Scaffolds a hug: its definition, page, build and a test. In a team folder it writes `hugs/<name>/`; elsewhere
`<name>/`. `team.yml` isn't touched.

| Option | |
| - | - |
| `--react` | A React page (`HugRoot`) instead of `mount_hug` and `html` |
| `--sdk <spec>` | The `@getcliqio/hug-frontend` version — an npm spec, or a `file:` path |

## `cliq hug dev [dir]`

Shows the hug on cliqd's local Hug page — no run, no Hug — rebuilding and reloading as you edit, with a panel showing
its values, problems, Submit label, summary and calls. Needs cliqd running.

| Option | |
| - | - |
| `--params <file>` | A JSON file with its params |
| `--attachments <dir>` | Files it may read (each file in the folder) |
| `--view <file>` | A JSON file with values to show in view mode, as a submitted answer |
| `--no-open` | Print the page's link instead of opening it |

## `cliq hug build [dir]`

Runs the hug's own build (`npm run build`), then checks the bundle against [the rules](https://docs.getcliq.io/hugs/reference/hug-folder.md#the-rules).

| Option | |
| - | - |
| `--check` | Build to a temporary folder and fail if `dist/` is missing or out of date — for CI; writes nothing |
| `--json` | The result as JSON |

`cliq team publish` refuses a team hug whose `dist/` is out of date; `cliq team publish --build` builds the team's
hugs first.

## `cliq hug list`

Every hug this machine can find — the team in the current folder (`hugs/<name>/`), the hugs path (`CLIQ_HUGS_PATH`
or `hugs.path`), `~/.cliqrc/hugs` — with where each comes from and its hash.

## `cliq hug files <phase> <input> <dir>`

Saves the files people sent in a phase's Hug into a folder, with `files.json` saying who sent what. See
[collecting a file in the review](https://docs.getcliq.io/hugs.md#example-2-collect-a-file-in-the-review) and [CLI](https://docs.getcliq.io/cli.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.