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

# CLI quickstart

> Create and verify your first customer journey from the terminal.

Use this guide when you want to go from a terminal prompt to a verified journey your team can review in Custory.

## Prerequisites

You need:

* Node.js `22.12` or newer
* a Custory account
* a public website or a short private product brief

Check Node.js first:

```bash theme={null}
node --version
```

If the version is older than `22.12`, install a newer Node.js release before continuing.

## Command

Run the interactive setup:

```bash theme={null}
npx @custory/cli@latest init
```

If you installed the package globally, you can use:

```bash theme={null}
custory init
```

## What to expect

The CLI will guide you through a short setup flow.

### 1. Browser sign-in

If you are not already signed in, the CLI opens your browser.

You will see terminal output similar to:

```text theme={null}
Opening your browser to sign in…
Visit: https://...
Code: XXXX-XXXX
```

Complete the browser flow with the Custory account you want to use.

If the browser does not open automatically, copy the `Visit` URL into your browser.

### 2. Workspace selection

The CLI asks where to create the journey.

Choose an existing workspace when the journey belongs to an existing team. Create a new workspace only when this is a new product, product area, or operating team.

Avoid creating duplicate workspaces for the same team.

### 3. Product context

Choose how Custory should learn about the product:

* use a public website when the website explains the product clearly
* use a custom description when the best context is private or not public

A good private description explains the product, target customer, activation path, important touchpoints, and known friction. It should not include secrets, credentials, source code, private customer data, or internal tokens.

### 4. Source review

Custory summarizes what it understood.

You will see:

```text theme={null}
Understood: ...
Use this product interpretation? [Y/n]
```

Accept it if the summary is directionally correct. If it is wrong, reject it, improve the source context, and run setup again.

### 5. Persona review

Custory suggests personas to link to the journey.

You can choose:

* all suggested personas
* only the primary persona
* no provisional personas

Use provisional personas as a starting point. Review them later with your team.

### 6. Verified journey

When the run completes, the CLI prints the journey name, counts, and URL.

Example:

```text theme={null}
✓ Journey ready
Product activation
5 stages · 12 steps · 2 personas · 10 starting items
https://app.usecustory.com/acme/journey/product-activation
```

The CLI verifies important writes by reading the saved journey back from Custory before showing the final URL.

## First useful edits in Custory

Open the journey and make these checks first:

* rename stages so they match how your customers actually move
* remove steps that do not apply to your product
* add missing touchpoints such as signup, onboarding email, invite flow, support chat, or billing page
* mark assumptions as assumptions until your team has customer evidence
* add the first real items your team already knows about

## Recovery

If setup was interrupted, run:

```bash theme={null}
custory init --resume
```

If the CLI says no unfinished setup exists, start again:

```bash theme={null}
custory init
```

## Next step

Read [Create a first journey](/cli/create-first-journey) when you want to choose context sources and confirmation behavior more deliberately.
