Install from source
Build any Viewport package from its repository, for a package that is not on its registry yet or to work on the code.
A package on npm or PyPI installs with one command; the quickstart lists them. This page builds a package from its repository instead. The steps take a few minutes and use the same tarballs and folders the packages are published from.
What you need
- Git, and the repositories side by side in one folder.
- TypeScript: Node 22.18 or later to build from source, and pnpm through corepack (
corepack enable). The build needs it (tsup 9 requires ^22.18.0, and older corepack ships stale npm keys). What each package needs at runtime is on its own page. - Python: Python 3.11 or newer. The steps use uv; plain
pipon Python 3.11+ works too.
Evals, HITL and Context depend on Core, so you build Core first and install it alongside them.
TypeScript: pack, then install the tarballs
Build and pack Core and the package you want. This example uses Evals; swap in hitl the same way. Context has no
build script yet, so build it with corepack pnpm exec tsup instead of corepack pnpm build.
git clone https://github.com/viewportai/core
git clone https://github.com/viewportai/evals
mkdir dist
(cd core/ts && corepack pnpm install && corepack pnpm build && corepack pnpm pack --pack-destination ../../dist)
(cd evals/ts && corepack pnpm install && corepack pnpm build && corepack pnpm pack --pack-destination ../../dist)Then, in your project, install both tarballs in one command so npm resolves Core from the local copy:
npm install ../dist/viewportai-core-0.1.0.tgz ../dist/viewportai-evals-0.1.0.tgzFrom here, imports work as the docs show: import { trace } from "@viewportai/evals". Evals also ships its CLI in that
tarball, so npx @viewportai/evals run uses the local copy.
Two things that trip people up:
- Running a
.tsfile. Node 22.18 and later run TypeScript directly:node main.ts. In a CommonJS project, runnpm pkg set type=modulefirst, or usenpx tsx main.ts. - Provider SDKs. Quickstarts that fake a model through a provider's client need that client installed too, for
example
npm install @anthropic-ai/sdkoruv pip install anthropic. Each quickstart names what it uses.
Python: install the local packages
Install Core and the package together from their folders, so the resolver finds Core locally:
uv venv --python 3.12
uv pip install ./core/python ./evals/python
source .venv/bin/activateWith pip, on Python 3.11 or newer: pip install ./core/python ./evals/python. Imports work as the docs show:
from viewportai.evals import trace.
Console
Console is a web app and server that builds against its sibling repositories (Core, HITL, the daemon and the Evals viewer). Its repository's README lists the exact checkouts and build order; follow that to run it from source.
Check it worked
node -e "import('@viewportai/evals').then((m) => console.log(typeof m.trace))" # function
python -c "import viewportai.evals as e; print(callable(e.trace))" # True, inside the venvThen go to the quickstart of the package you installed: Core, Evals, HITL, Context.
Quickstart
Install what you need, run a command under the daemon in a minute, and find the quickstart for each library.
Showcase
Real use cases for every Viewport package. Each one is a tested example in its repository, and each link goes to the page that shows its code, in TypeScript and Python where the package ships both.