---
name: Seeyon Report CLI Data Analysis
description: This skill should be used when the user asks to "download the Seeyon Report CLI", "set up sr CLI", "authenticate the report CLI", "use the CLI for data analysis", "analyze data with Seeyon Report from the terminal", deals with any general data analysis tasks, or mentions using `sr` for files, datasources, chats, reports, or agentic data analysis workflows.
version: 0.1.0
---

# Seeyon Report CLI Data Analysis

Use this skill to help install, authenticate, and start data analysis workflows with the Seeyon Report CLI (`sr`). Keep guidance practical and concise. Avoid documenting every subcommand; discover current usage from the executable with `--help` because CLI options may change faster than this skill.

## Core Workflow

Follow this sequence for most setup requests:

1. Identify the operating system and CPU architecture.
2. Download the matching prebuilt CLI binary from the hosted website.
3. Make the binary executable or place it on `PATH`.
4. Configure the Report API base URL when needed.
5. Authenticate with `sr login` or an API-key-oriented flow when the user already has a key.
6. Verify access with `sr whoami`.
7. Explore the data-analysis commands with `sr --help` and command-specific help.
8. Start from the user's actual data source: local files, REST datasource, existing chat, or report artifact.

## Download Locations

Use the hosted public binaries by default:

```bash
# macOS Apple Silicon / arm64
curl -L -o sr https://www.report.seeyon.chat/downloads/sr-macos-arm64

# Windows AMD64 / x64, from PowerShell
Invoke-WebRequest -Uri "https://www.report.seeyon.chat/downloads/sr-windows-amd64.exe" -OutFile "sr.exe"
```

When a download fails with 404 or stale content, ask the user to deploy or refresh the website hosting first. Do not fall back to undocumented URLs unless the user provides them.

## Local Installation

For macOS:

```bash
chmod +x ./sr
./sr --help
```

If macOS reports that `sr` is damaged and should be moved to the Trash, remove the download quarantine attribute and retry. This commonly happens for unsigned binaries downloaded from a browser:

```bash
xattr -d com.apple.quarantine ./sr
./sr --help
```

If the attribute is absent, `xattr` may print an error. Continue troubleshooting with `file ./sr`, `chmod +x ./sr`, and `./sr --help` before redownloading.

Optionally move the binary onto `PATH`. Check existing `PATH` entries first, then choose an existing user-writable directory or create one and add it to the shell profile before moving `sr` there:

```bash
printf '%s\n' "$PATH" | tr ':' '\n'
```

After selecting a directory that is already on `PATH`:

```bash
mv ./sr /path/already/on/PATH/sr
sr --help
```

For Windows PowerShell:

```powershell
.\sr.exe --help
```

Optionally place `sr.exe` in a directory already listed in `PATH`, or add the containing directory to `PATH` using normal Windows environment variable settings.

## Configuration And Auth

Start by checking the live CLI help:

```bash
sr --help
sr config --help
sr login --help
```

Set the API base URL when targeting a non-default deployment:

```bash
sr config set baseUrl https://report2.seeyon.chat
sr config list
```

Authenticate interactively when credentials are available:

```bash
sr login
sr whoami
```

For initial setup, ask user to generate an API key in the browser UI at `<base-url>/account` (e.g., `https://report2.seeyon.chat/account`), then authenticate with:

```bash
sr login --api-key <your-api-key>
```


Use API-key commands only after checking current help:

```bash
sr account --help
sr account api-key --help
sr login --help
```

Treat tokens, passwords, and API keys as secrets. Avoid pasting secrets into logs or final responses. Prefer environment variables or interactive prompts when possible.

## Starting Data Analysis

Start every analysis workflow by discovering the relevant command surface:

```bash
sr files --help
sr datasources --help
sr chat --help
sr artifacts --help
sr export --help
```

Choose the workflow based on the user's data:

| User Input | Suggested CLI Area |
| --- | --- |
| Local CSV, Excel, JSON, or document files | `sr files --help`, then `sr chat --help` |
| REST/OpenAPI endpoint | `sr datasources --help` |
| Existing analysis conversation | `sr chat --help` |
| Saved chart/report output | `sr artifacts --help` or `sr export --help` |
| Unsure starting point | `sr --help`, then inspect available top-level commands |

Keep prompts data-analysis oriented. Ask the user for the business question, dataset location, expected output format, and whether the result should be exploratory notes, charts, dashboard content, or exported files.

Use context-safe output by default. Add `--json` only when structured parsing is needed. Add `--full` only when the complete response is necessary and the output size is safe.

## Agent Guidance

Prefer running help commands directly against the installed binary instead of assuming subcommand syntax. Use this pattern:

```bash
sr <command> --help
sr <command> <subcommand> --help
```

Before executing mutating operations, explain the intended effect in one short sentence and confirm only when the operation could create, delete, overwrite, or expose sensitive data. For read-only exploration, proceed directly.

When troubleshooting:

- Run `sr config list` to inspect effective configuration.
- Run `sr whoami` to verify authentication.
- Run the relevant `--help` command to confirm syntax.
- Check network access to the configured `baseUrl` when login or API calls fail.
- Ask for the exact command and error output when the failure cannot be reproduced.
