# remote-data-ssh-sync (`scripts/remote-data-ssh-sync.sh`) Pulls **deployed environment data** over SSH into a **local mirror** (not versioned in Git), then optionally ingests that mirror into **AnythingLLM**. ## Configuration source (per project) `projects//conf.json`: - `smart_ide.remote_data_access.environments..ssh_host_alias` - `smart_ide.remote_data_access.environments..remote_data_directories[]` - `smart_ide.anythingllm_workspace_slug[env]` (optional; required for ingestion) ## Mirror location Default: - `/.data/remote-data////` This directory is ignored by Git (see `.gitignore`). Override: - `SMART_IDE_REMOTE_DATA_MIRROR_ROOT=/abs/path` ## AnythingLLM ingestion By default, the script attempts ingestion and skips explicitly if config is missing. Inputs: - `~/.config/4nk/anythingllm-sync.env` (optional): provides `ANYTHINGLLM_BASE_URL` + `ANYTHINGLLM_API_KEY` - `projects//conf.json`: provides the workspace slug for the selected env Implementation: - calls `scripts/anythingllm-pull-sync/sync.mjs` with `--upload-all` on each mirrored role directory ## Usage ```bash ./scripts/remote-data-ssh-sync.sh --project enso --env test ``` Fetch only (no ingestion): ```bash ./scripts/remote-data-ssh-sync.sh --project enso --env test --no-anythingllm ``` Ingest only specific roles: ```bash ./scripts/remote-data-ssh-sync.sh --project enso --env test --roles docv_dp_git_data ``` Dry-run (prints rsync command lines): ```bash ./scripts/remote-data-ssh-sync.sh --project enso --env test --dry-run ```