Logo vun Local Env Setup

Local Env Setup

CommunautéitBeléift
xuzhougeng
local-env-setup

Prepare optional local Python/R runtimes, user-configured Python MCP servers, Node/scimaster-cli, and pixi for the user’s task. Reuse detected paths, configure Wisp interpreters, and apply mirrors when needed. Use for 配置环境, missing runtime dependencies, or requested local installations. For remote SSH compute use compute-env-setup.

Iwwersiicht

Editeurxuzhougeng
Repositorywisp-science
Skill-Nummlocal-env-setup
Stären
1K
Forks
104
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum xuzhougeng op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Local Env Setup an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/xuzhougeng/wisp-science/tree/main/skills/local-env-setup
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/xuzhougeng/wisp-science.git /tmp/wisp-science
mkdir -p .claude/skills
cp -r /tmp/wisp-science/skills/local-env-setup .claude/skills/local-env-setup
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Local Env Setup an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Local Env Setup automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Local Env Setup net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Local runtime setup

Wisp starts and runs native biological tools without Python, R, uv, or Node. First-run model setup and Settings → Models show a background path check. Cmd/Ctrl+P → Quick setup (快速配置) reopens setup and refreshes the check. It never runs installers or creates a virtualenv. Detected executable paths are saved in the Local execution context without replacing existing choices. A found path does not establish version compatibility or installed packages.

TaskOptional tools
Python analysis / persistent python toolExisting Python environment; uv can help create one
R analysis / persistent r toolRscript with jsonlite
User-configured Python MCPThat server's own interpreter and dependencies
bear-* literature skillsNode >= 20, npm, sci (scimaster-cli)
Bioinformatics workflowspixi for isolated conda/pip environments

Start with the user's task and existing environment. Install only what it needs. Do not treat every missing optional tool as a broken installation. After changing PATH, use Check paths again in model settings; restart Wisp only if the GUI process needs to inherit a changed PATH. Interpreter settings can be saved directly without restarting the app.

Step 0 — Detect platform, region, and current state

Read the Environment section in the system prompt (Operating system, Working directory).

0a — Region / network (mirror or not)

Before any install or pip/npm/pixi add, decide whether the user is on mainland China and needs mirrors.

Signals (use several; do not rely on one):

SignalMainland likely
User writes in Chinese and mentions 国内 / 镜像 / 翻墙 / 清华 / 阿里yes
TZ / system timezone Asia/Shanghai, Asia/Chongqing, Asia/Urumqihint
Locale zh_CN, zh-Hans-CNhint
curl -s --connect-timeout 3 https://pypi.org/simple/ fails or >5s; tuna mirror responds in <2syes
User explicitly says they are not in China / have full international accessno

If ambiguous, ask once: "Are you on mainland China? I'll use domestic mirrors for pip/npm/conda if yes."

When mainland mirrors apply, set these before installs (user shell profile or session env):

sh
# PyPI / uv (Python environments + pixi pip deps)
export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
export PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple

# npm (scimaster-cli)
npm config set registry https://registry.npmmirror.com

Windows (PowerShell, persist for user):

powershell
[Environment]::SetEnvironmentVariable("UV_INDEX_URL", "https://pypi.tuna.tsinghua.edu.cn/simple", "User")
[Environment]::SetEnvironmentVariable("PIP_INDEX_URL", "https://pypi.tuna.tsinghua.edu.cn/simple", "User")
npm config set registry https://registry.npmmirror.com

Pixi conda channels (global or per-project pixi.toml):

toml
[project]
channels = ["https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/"]

[pypi-config]
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple"

Or global:

sh
pixi config set --global pypi-config.index-url https://pypi.tuna.tsinghua.edu.cn/simple

Alternatives if tuna is slow: Aliyun PyPI https://mirrors.aliyun.com/pypi/simple/, USTC conda mirrors.

If international access works, do not set mirrors — use defaults.

0b — Tool presence

Run with shell (PowerShell on Windows, sh -c elsewhere):

Windows:

powershell
Get-Command python,python3,Rscript,uv,node,npm,sci,pixi -ErrorAction SilentlyContinue | Select-Object Name,Source
uv --version 2>$null; node --version 2>$null; npm --version 2>$null; sci --version 2>$null; pixi --version 2>$null

macOS / Linux:

sh
for c in python3 python Rscript uv node npm sci pixi; do command -v $c && $c --version 2>/dev/null; done

The optional environment panel in onboarding, model settings, and Capabilities shows detected paths. Inspect the saved Local interpreter settings before choosing another environment.

Python and R, when requested

Reuse an existing project environment when suitable. In the desktop app, set_runtime_interpreter saves a path on the execution context:

json
{"context_id":"local","language":"python","executable":"/absolute/path/to/python"}

For R, use "language":"r" and an absolute Rscript path. Users can also open Runtime interpreters and browse for either executable. Running REPLs keep their previous interpreter until restarted; the agent tool restarts the current conversation's matching REPL and clears its variables.

For Python, invoke the chosen executable to verify its version and install only needed packages. python/requirements-kernel.txt lists common analysis packages shipped as a requirements file; native biological tools require none of them. The kernel worker itself uses the Python standard library. For R, verify Rscript -e 'library(jsonlite)' using the chosen absolute path; install jsonlite in that environment if needed, then test the Wisp r tool.

The CLI uses an existing environment at <workspace>/.wisp/python/.venv if present, otherwise Python on PATH. The desktop retains these legacy fallback locations for users who already prepared them; it never creates them on launch:

OSDesktop venv path
Windows%APPDATA%\science.wisp-science\wisp-science\python\.venv
macOS~/Library/Application Support/science.wisp-science/wisp-science/python/.venv
Linux~/.local/share/science.wisp-science/wisp-science/python/.venv

Install uv

International:

powershell
# Windows
powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex"
sh
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Mainland China: prefer winget / Homebrew / distro package if the astral installer is slow or blocked; set UV_INDEX_URL (above) before uv pip install.

powershell
winget install --id astral-sh.uv -e          # Windows
sh
brew install uv                               # macOS

Default binary: ~/.local/bin/uv (Unix) or %USERPROFILE%\.local\bin\uv.exe (Windows). Ensure that dir is on PATH.

Python via uv

sh
uv python install 3.11
uv python list

Target: Python 3.11+. With mainland mirrors, export UV_INDEX_URL first.

Create a project environment when needed

Set ENV_DIR to a task-specific environment location and REQ to the bundled or repository python/requirements-kernel.txt when those analysis packages are wanted. Reuse an existing suitable environment instead of recreating it.

sh
uv venv "$ENV_DIR"
uv pip install -r "$REQ" --python "$ENV_DIR/bin/python"
"$ENV_DIR/bin/python" -c "import sys; print(sys.executable)"

Windows PowerShell: use $envDir, $req, and Scripts\python.exe:

powershell
uv venv $envDir
uv pip install -r $req --python "$envDir\Scripts\python.exe"
& "$envDir\Scripts\python.exe" -c "import sys; print(sys.executable)"

Save that absolute interpreter through set_runtime_interpreter when available, then verify a small python tool call. If the tool is unavailable in the CLI, use the CLI fallback location above or launch with the prepared environment on PATH.

User-configured Python MCP servers

Read that server's installation requirements. Prepare its own environment and configure its MCP command with the absolute executable and appropriate arguments. Do not reinstall the removed mcp-servers/bio-tools tree or add Python MCP packages merely to use Wisp's native biological tools. Test the configured connection after setup.

Layer 2 — Literature: Node + scimaster-cli

Required for bundled bear-support, bear-counter, bear-map, bear-scoop, bear-trace, bear-review, bear-onboard, bear-propose.

Install Node >= 20

International: https://nodejs.org/ LTS, or winget install OpenJS.NodeJS.LTS, or brew install node.

Mainland China:

powershell
# Windows — winget often works; or npmmirror-hosted installer
winget install OpenJS.NodeJS.LTS
sh
# macOS — brew or fnm with npmmirror
brew install node
# fnm alternative:
# export FNM_NODE_DIST_MIRROR=https://npmmirror.com/mirrors/node
# fnm install 20 && fnm use 20

After install, open a new terminal; verify node --version (v20+).

scimaster-cli

Set npm registry first if mainland (see 0a), then:

sh
npm install -g scimaster-cli
sci init        # paste SciMaster API Key
sci --version
sci usage

API Key: SciMaster settings → API Key. Do not proceed with bear-* skills if sci --version fails.

In the wisp-science desktop app, you can also save the SciMaster key in Settings -> Credentials -> SCIMaster. Wisp will sync that key into ~/.scimaster/config.json for scimaster-cli.

Layer 3 — Bioinformatics: pixi

pixi manages isolated per-project environments (conda + pip) — use for scanpy/single-cell, variant calling stacks, etc. The Wisp python tool uses the selected context interpreter. The same environment can run standalone commands through pixi run python … or pixi run …, or supply the interpreter for persistent python/r analysis. Choose process lifetime according to state reuse, script requirements, and task lifecycle; installing an environment does not select an execution method. Scripts consuming existing runtime objects can use script_path and required_objects.

Workflow engines

For multi-step analysis pipelines (many rules, parallel execution, resume after failure), pair pixi with a dedicated workflow engine — pixi manages the environments, the engine schedules the steps. Run engines from shell in the project directory.

EngineWhat it isWhen to choose
snakemakePython-defined rules, mature conda/mamba integrationEstablished rules; Python-centric teams
nextflowGroovy DSL, container-firstnf-core ecosystem; HPC/cloud portability
oxo-flowRust-native, TOML-defined DAG engine; CLI + web UILightweight single-binary install; rule-level conda/mamba/pixi/docker/singularity backends; checkpoint/resume

Install pixi

International:

sh
curl -fsSL https://pixi.sh/install.sh | bash
powershell
powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"

Mainland China: if install script is slow, try brew install pixi (macOS) or download release from GitHub mirror; then configure mirrors (0a).

Typical project workflow

In the user's analysis directory:

sh
pixi init
pixi add scanpy anndata          # example; adjust to task
pixi run python analysis.py

Multiple envs: use [environments] / features in pixi.toml, or separate project dirs — see pixi docs.

With mainland mirrors, set [pypi-config] and channels in pixi.toml (0a) before large pixi add.

Verify pixi

sh
pixi --version
pixi info    # shows config paths and channels

Workarounds

IssueFix
uv/node installed but app still says missingRestart wisp-science; confirm tools on PATH for the GUI user (macOS: relaunch from Dock after shell profile update).
Cannot modify PATHSet UV_PATH / PIXI_PATH to full binary paths before launching wisp-science.
Mainland: timeouts on pypi.org / registry.npmjs.orgApply Step 0a mirrors; retry.
Corporate proxy / TLSHTTPS_PROXY, trust store; still use mirrors if direct egress to US is blocked.
Broken Python environmentDiagnose or create a replacement environment, install needed packages, then save its interpreter. Restarting Wisp does not repair or recreate environments.
bear-* skill stops at CLI checkInstall Node + scimaster-cli + sci init; do not fake citations.

Agent workflow

  1. Load this skill for requested setup or a task blocked by a missing dependency.
  2. Detect OS and existing paths; reuse the user's selected environment.
  3. Before downloading, choose appropriate network mirrors (Step 0a).
  4. Install only the Python/R, custom MCP, literature, or bioinformatics components needed.
  5. Save interpreter paths to the chosen execution context and verify actual task/tool execution.
  6. Report installed components, selected paths, and any task-specific dependencies still missing.

Not in scope

  • Remote GPU or direct SSH → compute-env-setup; managed cloud backends are unavailable until Wisp implements a matching execution-context backend
  • Replacing pixi with conda/micromamba when pixi suffices locally
  • SciMaster API billing / key provisioning beyond pointing to sci init

Heefeg gestallte Froen

Wat mécht de KI-Skill Local Env Setup?

Prepare optional local Python/R runtimes, user-configured Python MCP servers, Node/scimaster-cli, and pixi for the user’s task. Reuse detected paths, configure Wisp interpreters, and apply mirrors when needed. Use for 配置环境, missing runtime dependencies, or requested local installations. For remote SSH compute use compute-env-setup.

Firwat Local Env Setup op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Local Env Setup besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Local Env Setup an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/xuzhougeng/wisp-science/tree/main/skills/local-env-setup an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Local Env Setup benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Local Env Setup benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Local Env Setup domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Local Env Setup gratis?

Jo. De Skill gëtt vum xuzhougeng ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇