@sailfish-ai/auto-install
v0.1.5
Published
Sailfish Veritas — npx auto-installer for Sailfish data collection libraries. Detects your project's language and framework, then uses your AI coding agent to install and wire up the correct Veritas library (sf-veritas, recorder, or Python sf-veritas) wit
Maintainers
Readme
@sailfish-ai/auto-install
npx auto-installer for Sailfish Veritas
data collection libraries. The Sailfish web app generates a one-liner
command you paste into your terminal, and this CLI hands the
installation off to whatever AI coding agent you already have.
Quick start
From the Sailfish web app, copy the generated command:
npx @sailfish-ai/auto-install --api-key=sk_xxxRun it in your project directory. The CLI will:
- Detect which AI coding agent you have installed.
- Write a hydrated
SKILL.mdinto that agent's skill directory, listing the per-language install-doc URLs at docs.sailfish.ai, substituting your API key, and adding cross-cutting guardrails (SSR guard for the frontend recorder, secret-store guidance, build-verification rules). - Tell you to open your agent and invoke the skill.
When you run the skill, your agent fetches the URL for the matching
language at runtime, follows the docs verbatim, stores the API key in
your .env, verifies the build, and reports back.
What gets installed where
The skill lists the canonical install-doc URL for every supported language. The AI agent reads your project, decides which language(s) apply, fetches the matching URL(s), and follows the docs. A single project can match more than one language (e.g. a monorepo with both a Python backend and a Next.js frontend).
| Your project | Package | Canonical install doc |
| -------------------------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| JS/TS backend (Express, NestJS, Fastify, Next.js server) | @sailfish-ai/sf-veritas | backend/javascript-typescript |
| JS/TS frontend (React, Next.js, Vite, CRA) | @sailfish-ai/recorder | frontend/javascript-typescript |
| Python (Django, Flask, FastAPI, Starlette) | sf-veritas (PyPI) | backend/python |
| C# / .NET | sf-veritas (NuGet) | backend/c-sharp |
| Go | github.com/SailfishAI/sf-veritas-go | backend/go |
| Java | ai.sailfish:sf-veritas (Maven) | backend/java |
| PHP | sailfish-ai/sf-veritas (Composer) | backend/php |
| Ruby | sf_veritas (RubyGems) | backend/ruby |
Commands
# Install (default command — can be omitted). Writes the skill to
# every detected agent on the system.
npx @sailfish-ai/auto-install --api-key=sk_xxx --domains='*.acme.com'
# Interactive mode — prompts for API key
npx @sailfish-ai/auto-install
# Only fetch the doc for one language (skips the others)
npx @sailfish-ai/auto-install --api-key=sk_xxx --domains='*' --language=python
# Only configure specific agents
npx @sailfish-ai/auto-install --api-key=sk_xxx --domains='*' --agents=claude-code,cursor
# Single-agent mode — write the skill, auto-launch the agent's CLI
npx @sailfish-ai/auto-install --api-key=sk_xxx --domains='*' --agent=claude-code
# Project-local install (commit the skill into the repo). Requires --agent.
npx @sailfish-ai/auto-install --api-key=sk_xxx --domains='*' --agent=claude-code --local
# Point at a staging docs site or a local checkout (air-gapped)
npx @sailfish-ai/auto-install --api-key=sk_xxx --domains='*' --docs-base-url=/path/to/sailfish
# Show status across detected agents
npx @sailfish-ai/auto-install status
# Remove the install-skill (does not touch code the agent already wrote)
npx @sailfish-ai/auto-install uninstallConfiguration
| Flag | Env var | Description |
| ----------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --api-key | SAILFISH_API_KEY | Required. Your Sailfish API key from the web app. |
| --domains | — | Optional. CSV wildcard allowlist baked into the SDK's domainsToPropagateHeadersTo (e.g. *.acme.com,*.internal.acme.io). Defaults to * (propagate tracing headers to every outbound host). The web app's "Copy npx command" button fills this in from your CompanyDomain table. |
| --agent | — | Target a single agent and auto-launch its CLI with the skill command pre-queued. One of: claude-code, cursor, copilot, codex, opencode, windsurf, gemini, goose, other. |
| --agents | — | Comma-separated list of agents to configure. Default: all detected agents on this system. |
| --language | — | Fetch only one language's README. One of: jsts-backend, jsts-frontend, python, csharp, golang, java, php, ruby. Default: all supported languages. |
| --local | — | Install the skill into the current project (./.<agent>/skills/ + ./.agents/skills/) instead of the user-wide default. Requires --agent=<id>. Default: user-wide install at ~/.<agent>/skills/ + ~/.agents/skills/. |
| --print | — | Don't write anything; just print the command the user would type inside their agent to invoke the skill. Used by the web app's preview flow. |
| --docs-base-url | SAILFISH_DOCS_BASE_URL | Override the docs source. Accepts an HTTPS URL, a file:// URI, or a plain local filesystem path. Default: https://docs.sailfish.ai. |
| -y, --yes | — | Skip all confirmation prompts. |
Air-gapped / self-hosted environments
Pass --docs-base-url pointing at either a self-hosted docs mirror or a
local checkout of the monorepo:
# Fetch from a local clone of the Sailfish monorepo
npx @sailfish-ai/auto-install \
--api-key=sk_xxx \
--docs-base-url=/Users/you/code/sailfish
# Fetch from a private docs mirror
npx @sailfish-ai/auto-install \
--api-key=sk_xxx \
--docs-base-url=https://docs.internal.example.com/sailfishIf any doc fetch fails, the CLI still installs the skill — the affected language section is replaced with a stub note pointing the agent at the canonical URL so the user can follow it manually.
Security
- The API key is written into the SKILL.md at
~/.agents/skills/autoinstall-sailfish-veritas/SKILL.mdwith mode0600. - The skill explicitly tells the agent to never commit the API key and
to verify
.gitignorebefore writing to.env. - Run
npx @sailfish-ai/auto-install uninstallto remove the skill file (and its on-disk copy of the key) once the install is complete.
