Installation
Travsr ships as a single binary. Pick the method that fits your setup.
npm (recommended)
Requires Node.js ≥ 18.
npm install -g @travsr.com/travsr
Verify:
travsr --version
To update:
npm update -g @travsr.com/travsr
Release channels
Every release ships to three npm dist-tags. ^-range installs never resolve to a pre-release, so latest is what you get unless you opt in explicitly:
npm i -g @travsr.com/travsr@latest # stable (default if you omit the tag)
npm i -g @travsr.com/travsr@rc # release candidate, final gates in flight
npm i -g @travsr.com/travsr@beta # earliest builds, opt-in testing only
A beta and its later-promoted rc and latest releases are byte-identical binaries: promotion re-publishes the same signed artifact under a new tag rather than rebuilding, so what you tested on beta is exactly what ships to latest. Every tarball is cosign-signed and SLSA-attested regardless of channel.
The channels move independently, so beta can be newer than rc in content while sorting below it under semver. travsr --version reports the bare version, for example 1.4.0.
curl (install script)
Downloads, verifies, and installs the right binary for your platform in one step:
curl -fsSL https://travsr.com/install.sh | sh
By default this installs to $HOME/.local/bin. A piped script can't take flags directly, so forward them with sh -s --:
# Install to /usr/local/bin instead (escalates with sudo unless already root)
curl -fsSL https://travsr.com/install.sh | sh -s -- --system
# Install a specific release instead of latest stable
curl -fsSL https://travsr.com/install.sh | sh -s -- --version v1.4.0
# Just print the detected target triple, no network access
curl -fsSL https://travsr.com/install.sh | sh -s -- --print-target
Set TRAVSR_INSTALL_DIR to override the default install directory.
Verify:
travsr --version
Pre-built binary
Download a release from GitHub directly. Asset names carry the version, so there is no releases/latest/download/ shortcut: the commands below use v1.4.0, substitute the release you want (see Releases).
Each tarball contains the travsr binary and a travsr-lib/ directory holding the bundled TypeScript/JavaScript and Python analyzers. Install both side by side in the same directory; the binary looks for travsr-lib/ next to itself. Without it, TypeScript, JavaScript, and Python produce structural edges only and no cross-file edges.
# Pick the asset for your platform
VERSION=v1.4.0
TARGET=aarch64-apple-darwin # macOS (Apple Silicon)
# TARGET=x86_64-apple-darwin # macOS (Intel)
# TARGET=x86_64-unknown-linux-gnu # Linux (x86_64)
# TARGET=aarch64-unknown-linux-gnu # Linux (ARM64)
curl -L "https://github.com/Travsr-com/travsr/releases/download/${VERSION}/travsr-${VERSION}-${TARGET}.tar.gz" | tar xz
sudo rm -rf /usr/local/bin/travsr-lib
sudo cp -R travsr-lib /usr/local/bin/travsr-lib
sudo cp travsr /usr/local/bin/travsr
On Windows, download travsr-v1.4.0-x86_64-pc-windows-msvc.tar.gz from the same release page, extract it (tar -xzf), and keep travsr.exe and travsr-lib\ together in a directory on your PATH.
The Linux binaries are built against musl and statically linked, so they run on any Linux regardless of glibc version, despite the -gnu in the asset name. The binary itself has no runtime dependencies; the TypeScript, JavaScript, and Python analyzers in travsr-lib/ need Node.js on PATH (see Language packages).
Build from source
Requires Rust ≥ 1.88 (edition 2021).
git clone https://github.com/Travsr-com/travsr.git
cd travsr
cargo build --release --bin travsr
sudo cp target/release/travsr /usr/local/bin/
For development (faster incremental builds):
cargo install --path crates/travsr-cli
Language packages
Travsr has two analysis layers:
- Structural analysis is built into the core binary. It parses your code with Tree-sitter and gives you class, function, method, and import nodes for every supported language. It is always on and needs no extra install.
- Semantic analysis adds resolved relationships through built-in analyzers or additional language tools. Coverage varies by language and analyzer.
Rust, TypeScript, JavaScript, and Python have semantic analysis built in and run automatically, with prerequisites: TypeScript, JavaScript, and Python use the analyzers bundled in travsr-lib/ and need Node.js on PATH; Rust needs the Rust toolchain and rust-analyzer (travsr lang install rust adds it through rustup, or downloads it directly when rustup is absent). More languages install as separate packages:
# See what languages are in your repo
travsr lang detect
# Install a specific language tool
travsr lang install go
travsr lang install ruby
travsr lang install php
travsr lang install cpp
travsr lang install c
travsr lang install swift
travsr lang install objectivec # macOS only (libclang-based)
travsr lang install dart
# JVM and .NET languages need network access to fetch build dependencies.
# This access is granted automatically for local use.
travsr lang install java
travsr lang install kotlin
travsr lang install csharp
travsr lang install scala
| Language | Package | Sandbox | Underlying tool |
|---|---|---|---|
| TypeScript / JavaScript | built-in | Standard | travsr-lsif-ts (bundled, needs Node.js) |
| Rust | built-in | Standard | rust-analyzer |
| Python | built-in | Standard | travsr-lsif-py (bundled, needs Node.js) |
| Go | @travsr-plugin/go | Standard | scip-go |
| Ruby | @travsr-plugin/ruby | Standard | scip-ruby |
| PHP | @travsr-plugin/php | Standard | scip-php |
| Swift | @travsr-plugin/swift | Standard | travsr-swift-index-emitter |
| Objective-C | @travsr-plugin/objectivec | Standard (macOS only) | travsr-lang-objectivec |
| C++ | @travsr-plugin/cpp | Native IPC | scip-clang |
| C | @travsr-plugin/c | Native IPC | scip-clang |
| Dart | @travsr-plugin/dart | Native IPC | travsr-dart-index-emitter |
| Java | @travsr-plugin/java | Elevated | scip-java |
| Kotlin | @travsr-plugin/kotlin | Elevated | kotlin-language-server |
| C# | @travsr-plugin/csharp | Elevated | scip-dotnet |
| Scala | @travsr-plugin/scala | Elevated | sbt |
The Package column is historical. npm install -g @travsr-plugin/<lang> is no
longer an install path; travsr lang install is the only one, and it fetches the
analyzer into ~/.travsr/bin/.
TypeScript, JavaScript, Rust, and Python have a native Phase B compiled into the
daemon: their analyzer output is ingested in-process rather than through a
sandboxed sidecar. They still need a runtime. TypeScript, JavaScript, and Python
run the bundled travsr-lsif-ts / travsr-lsif-py from travsr-lib/, which
needs Node.js; Rust runs rust-analyzer and needs the Rust toolchain (cargo).
travsr lang list shows each language's prerequisites in its PREREQUISITES
column.
Trust model
Language tools run in a sandboxed subprocess. There are three sandbox classes:
- Standard (TypeScript, JavaScript, Rust, Python, Go, Ruby, PHP, Swift, Objective-C): no network access and no dependency downloads.
- Native IPC (C, C++, Dart): no network access either, but the analyzer's parallel workers need POSIX message queues and shared memory. macOS has no Seatbelt rule that permits those, so on macOS these run under resource limits instead of
sandbox-exec. No approval is required. - Elevated (Java, Kotlin, C#, Scala): the build tool (Maven, Gradle, NuGet, sbt) downloads dependencies at analysis time. That access is granted automatically for local use, so installing one of these needs no approval step. For Java and Kotlin repositories that build with the Android Gradle Plugin, the Android SDK is also granted, read from
ANDROID_HOME,ANDROID_SDK_ROOT, or the IDE's default install location (never from repository content such aslocal.properties). A plain Gradle or Maven build gets no SDK grant.
Earlier versions gated the elevated languages behind an approval recorded per
user: an approver's GitHub handle, a justification, and a host allowlist,
entered interactively or written by travsr lang approve. That gate and the
command are both gone. The runtime isolation policy is unchanged; only the human
approval moment was removed. On Linux the analyzer still runs under bubblewrap
filesystem confinement.
On Windows, Java and Scala cannot run inside the isolation layer at all, because
their build tools fork workers that fail in it. They are skipped there unless you
grant permission with travsr lang allow-unsandboxed. macOS and Linux are
unaffected.
Configuration and documentation are also indexed: JSON/JSONC, YAML, TOML, XML, and Markdown/MDX. These are separate from programming-language semantic analysis; Markdown uses a dedicated parser.
Supported platforms
| Platform | npm | binary |
|---|---|---|
| macOS arm64 (Apple Silicon) | ✓ | ✓ |
| macOS x86_64 (Intel) | ✓ | ✓ |
| Linux x86_64 | ✓ | ✓ |
| Linux ARM64 | ✓ | ✓ |
| Windows x86_64 | ✓ | ✓ |
VS Code extension
Install via the command palette (Ctrl+P / Cmd+P):
ext install travsr.travsr-vscode
Or from the VS Code Marketplace or Open VSX (VSCodium and compatible editors).
The extension auto-detects whether the travsr binary is present and offers to install it for you.