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

# Bring an existing CLI

> Give Intermesh a local repository, Git source, npm package, or tarball.

# Bring an existing CLI

Intermesh evaluates a frozen CLI artifact. The agent selects exactly one source.

## Local repository

Use this when the CLI lives in the current repository:

```bash theme={null}
inter --json eval setup \
  --evaluation default \
  --package-dir <cli-package-directory> \
  --package-manager pnpm \
  --build-script build
```

Use `npm` instead of `pnpm` when that is the package manager. The build script must exist in the selected package's `package.json`.

If the repository contains only one supported CLI package, the agent can omit the package options and let Intermesh discover it:

```bash theme={null}
inter --json eval setup --evaluation default
```

## Remote Git repository

Pin the revision and select the package explicitly when discovery is ambiguous:

```bash theme={null}
inter --json eval setup \
  --evaluation default \
  --git https://github.com/example/cli.git \
  --revision <commit-or-tag> \
  --package-dir <cli-package-directory> \
  --package-manager pnpm \
  --build-script build
```

Never put credentials in the Git URL.

## Published npm package

```bash theme={null}
inter --json eval setup \
  --evaluation default \
  --npm <package@version>
```

## Existing tarball

```bash theme={null}
inter --json eval setup \
  --evaluation default \
  --archive /absolute/path/to/cli.tgz
```

## Resolve ambiguity

When setup cannot choose one package or build action, it returns an error with structured choices and a next action. The agent must use those returned values; it must not guess.
