Skip to content

Quickstart

This guide runs LineTrail on one host with Docker Compose, sets up capture on a developer machine, syncs a first repository and opens the dashboard. It follows the documented steps only; where a step isn’t documented for customers yet, it says contact us.

Server host

  • Docker Engine with the Compose v2 plugin (docker compose), on linux/amd64 or linux/arm64.
  • git 2.22 or later, openssl and curl.
  • A Rust toolchain (rustup and a C compiler) to build the linetrail CLI.
  • An OpenID Connect provider if people will sign in to the dashboard. Without one, browser sign-in stays disabled and only service tokens work. See Sign in and open the dashboard below.

Developer machines (where code is written)

  • macOS or Linux. WSL runs the Linux build; native Windows is coming soon.
  • The linetrail CLI, set up with linetrail setup (step 3).

You’ll need the LineTrail release, which is available during early access, and a laptop or server with a terminal: this isn’t a phone task.

From the LineTrail release directory (contact us for access):

  1. Configure secrets. The .env file stays on the host.

    Terminal window
    cp .env.example .env
    sed -i.bak \
    -e "s/change-me-postgres-password/$(openssl rand -hex 24)/" \
    -e "s/change-me-ingest-token-0123456789/$(openssl rand -hex 24)/" \
    .env && rm .env.bak
  2. Start PostgreSQL, the API and the web app. The API applies database migrations when it starts. Ports bind to 127.0.0.1 only.

    Terminal window
    export LINETRAIL_BUILD_COMMIT="$(git rev-parse HEAD)" # build identity, reported by /healthz
    docker compose up -d --build
  3. Check that the API is ready.

    Terminal window
    curl -s http://127.0.0.1:8080/readyz

    It answers "status":"ready" once the database is reachable and migrations are current.

Default ports are 8080 for the API and 3000 for the dashboard. To change them, set LINETRAIL_API_PORT and LINETRAIL_WEB_PORT in .env, and use the same web port in LINETRAIL_WEB_PUBLIC_URL (and LINETRAIL_OIDC_REDIRECT_URL).

  1. Build the CLI and put it on your PATH.

    Terminal window
    cargo build --release --locked -p linetrail-cli
    export PATH="$PWD/target/release:$PATH"
  2. Create an organization service token with the ingest scope. It is shown once.

    Terminal window
    export LINETRAIL_INGEST_TOKEN="$(docker compose exec -T api \
    linetrail-api admin create-token --org default --name my-laptop --scopes ingest)"

    New data lives in the bootstrap organization default.

On each machine where code is written:

Terminal window
linetrail setup --repo /path/to/repo

linetrail setup checks git and the capture hooks against the tested release. If they’re missing or out of date, it prints a plan and acts only after you answer y (or pass --yes; --dry-run only prints the plan). It installs for the current user without sudo, verifies the pinned download’s SHA-256 checksum and refuses a mismatch, installs the hooks, and finishes with the doctor checks and one next step per problem.

A repository appears in LineTrail on its first sync. Commits written before capture was set up show as unknown; new work shows its attribution. Its identity is the normalized remote URL (credentials removed), or a local identity when there is no remote. The CLI only reads the repository.

Terminal window
linetrail doctor --repo /path/to/repo --api-url http://127.0.0.1:8080 # checks capture, notes and the API
linetrail inspect --repo /path/to/repo --ref main # computes attribution locally, uploads nothing
linetrail sync --repo /path/to/repo --ref main --api-url http://127.0.0.1:8080

sync uploads in batches and is idempotent: running it again reports commits as unchanged, inserted or updated. If a sync is incomplete, run the same command again.

Optional, pull-request attribution for a local comparison:

Terminal window
linetrail pr sync --repo /path/to/repo --base main --head feature/x --api-url http://127.0.0.1:8080

To keep the dashboard current without running the CLI by hand, add one of the CI templates.

Browser sign-in uses OpenID Connect. Configure it as described in your provider’s documentation and the OIDC settings in .env (issuer, client ID, client secret, redirect URL <dashboard URL>/auth/callback). Start the identity provider before the API: the API won’t start if it can’t discover the issuer.

Signing in grants nothing by itself. After your first sign-in, grant yourself admin. Your issuer and subject are shown on Settings → Profile.

Terminal window
docker compose exec api linetrail-api admin grant \
--org default --issuer <issuer> --subject <your subject> --role admin

Then open the dashboard at http://127.0.0.1:3000.

These steps aren’t documented for customers yet. Contact us for:

  • Getting the LineTrail release and prebuilt editor extensions.
  • TLS and reverse-proxy setup for shared deployments (use https; the dashboard then sets secure cookies).
  • Creating organizations other than default.