# Installation

> Install Infa CLI, try it without an account, and verify your environment is ready.

Source: https://infa.ai/docs/infa-cli-installation

The Infa CLI is available on all Infa plans, and you can start without an account: run it in your repo and your docs open on a local board in the browser. We at Infa built it this way so you can see what Infa does with your own files before you sign up.

## Requirements

| Requirement | Version |
| ----------- | ------- |
| Node.js | ≥ 20.0.0 |
| Claude CLI | Latest (`@anthropic-ai/claude-code`) |
| npm | ≥ 8 |
| Ollama (optional) | Latest, for [local agents](https://infa.ai/docs/infa-cli-local-agents) |

The Claude CLI is only required if you plan to use session management (starting Claude Code sessions). File preview and sync work without it. A model server such as Ollama is only needed for local agents.

## Install

```bash
npm install -g infa
```

Verify the install by running `infa` with no arguments — it will start the preview server:

```bash
infa
```

Or check available commands:

```bash
infa --help
```

## No account needed

You can use the Infa CLI without an Infa account. In your repo, run:

```bash
cd ~/my-repo
npx infa preview
```

`npx` runs the CLI without installing it first. The browser opens a **local board** at `infa.ai/local`: your repo's Markdown and MDX docs and its `.canvas` files, in the same board layout as a cloud board. Files are read and edited on your machine, and nothing is uploaded.

With a model server on your machine, you can also add a [local agent](https://infa.ai/docs/infa-cli-local-agents) and ask it about the repo from the local board: in a comment on a doc, or from **Ask AI**. It suggests edits you accept or reject and draws canvases, without an account and without the internet.

Rendering components from your repo needs no account either — their `.preview.tsx` sidecars, or `npx infa preview --static src/components/Button.tsx` (the older `infa render` still works).

### Save to Infa

When you want your docs in the cloud, use **Save to Infa** in the local board's floating toolbar. You sign up (free), the CLI is connected to a free cloud board, and your local files then appear in that board's **Local files** section. Every account includes one free cloud board with 3 cloud papers.

You can also sign in from the terminal with `infa auth` and pick or create a board with `infa board` — see [Authentication](https://infa.ai/docs/infa-cli-authentication) and [Connect a board](https://infa.ai/docs/infa-cli-connect-board).

### What needs an account

| Without an account | With an Infa account |
| ------------------ | -------------------- |
| The local board at `infa.ai/local` | Syncing docs to cloud Papers (`infa sync`) |
| Reading and editing your repo's docs and canvases | Publishing components to a board (`infa publish`) |
| Component previews from your repo | Syncing flows and publishing replays |
| Local agents, comments on local docs, the Runs view | The Infa MCP server's tools |
| | Board agents and runs |
| | Sharing and comments |

## Install Claude CLI (optional)

If you want Infa to manage Claude Code sessions, install the official Claude CLI:

```bash
npm install -g @anthropic-ai/claude-code
```

Infa looks for the Claude CLI at these paths in order:

1. `/opt/homebrew/bin/claude` (Homebrew on macOS)
2. `/usr/local/bin/claude`
3. `claude` (anywhere on your `PATH`)

## Starting the server

Run `infa preview` (or just `infa`) from the root of the folder you want to serve:

```bash
cd ~/my-docs
infa preview
```

The server starts on **port 7100** by default. To use a different port:

```bash
PORT=7101 infa preview
```

The browser opens automatically:

- **Signed out, or signed in with no board connected:** the local board at `infa.ai/local`. When you are signed in, the CLI first asks you to pick one of your boards or create a new one for this folder.
- **Board connected:** your board at `infa.ai/b/{boardId}`.

The old `infa.ai/editor` address redirects to `infa.ai/local`.

**Port already in use?** If port 7100 is taken, set a different port with PORT=7101 infa preview.

## Next steps

When you want the cloud:

- [Authenticate with your Infa account](https://infa.ai/docs/infa-cli-authentication)
- [Connect a board](https://infa.ai/docs/infa-cli-connect-board)
