> For the complete documentation index, see [llms.txt](https://tivet.gitbook.io/tivet-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tivet.gitbook.io/tivet-docs/getting-started/initial-setup.md).

# Initial Setup

## Initial Setup

This guide will walk you through initializing your project, deploying an actor, and setting up your client SDK.

If you get stuck at any point, you can ask a question on X/GitHub Discussion or file a bug report on GitHub Issues.

#### Install CLI

Run this command to install Tivet on your system:

macOS & Linux & WSLWindows (cmd)Windows (PowerShell)Build from source

```
curl -fsSL https://tivet.fun/tivet/latest/install.sh | sh
```

Command Line

#### Initialize project

Once you've installed the Tivet CLI, run this command in your project root to create a new project:

```
tivet init
```

Command Line

Follow the instructions to initialize your project.

#### Deploy project

After initializing your project, will deploy your actor to Tivet's servers:

```
cd my-app  # Replace "my-app" with your project name
tivet deploy
```

Command Line

*If self-hosting, this will prompt you to input a custom API address.*

Once complete, visit the Tivet Hub to see the build you uploaded:

<figure><img src="https://4149402394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fry3k7DfF3zSbNQ2BG8XB%2Fuploads%2FH96NjKOG8QlZ8dt8iFKn%2Fimage.png?alt=media&amp;token=3f6cf518-b34f-4e95-8d6b-56d5676bd727" alt=""><figcaption></figcaption></figure>

#### Create a test actor

Now that you've uploaded a build to Tivet, we need to create an actor. To test the actor can be created & connected to, run:

```
npx tsx counter_test.ts
```

Command Line

Once complete, visit the Tivet Hub to see the actor you created:

<figure><img src="https://4149402394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fry3k7DfF3zSbNQ2BG8XB%2Fuploads%2FRDs2FsqSrNWE2eT6oB8C%2Fimage.png?alt=media&amp;token=58fd54b2-30b9-4f55-91de-531e4eb0efa5" alt=""><figcaption></figcaption></figure>

#### Setup client

Now that you have an actor deployed, integrate the Tivet client SDK with your actor.

Install the Actor client package:

```
npm add @tivet-gg/actor-client
```

Once installed, we need to find the endpoint that your actors connect to. Run this command in your project:

```
tivet manager endpoint
```

Command Line

Use this code to create & connect to the actor. Replace `/* CONNECTION ADDRESS */` with the value from the previous step.

```
import { Client } from '@tivet-gg/actor-client';
const client = new Client(/* CONNECTION ADDRESS */);

const counter = await client.get({ name: 'counter' }); // Get or create a `counter` actor
const newCount = await counter.increment(5); // Call the method `increment` on the `counter` actor
console.log('New count', newCount);
```
