Install by2kb
Install by2kb as an independent CLI package, then install its adapter into the active
Agent. Do not clone or inspect the by2kb source repository as an installation method.
Before changing the system
- Confirm the target machine is controlled by the user.
- Check for Python 3.12+,
pipx, ffmpeg, ffprobe, by2kb, and the Agent host.
- If by2kb already has configuration, do not replace it. Run
by2kb doctor --json, explain any failures, and preserve the current ASR and
knowledge-base choices unless the user asks to change them.
Default: local Agent installation
Use this path unless the user explicitly requests cloud ASR:
- Install from PyPI with
pipx install "by2kb[asr-whisper,youtube]".
- Create a cloud-free Agent configuration with
by2kb init --preset agent-local. This selects local faster-whisper, Bilibili and
YouTube sources, Agent-hosted summarization, and a local Markdown library.
- Before downloading a Whisper model, tell the user its name and that the download
can be large. Continue only after the user agrees, then run
by2kb models install.
- For Hermes, run
by2kb agent install hermes, followed by
by2kb doctor --json.
- Restarting a running Agent can interrupt the current conversation. Ask before
restarting it, then verify the gateway and ask the user to send one test video URL.
If pipx reports that by2kb is already installed, try pipx upgrade by2kb. If an old
direct-URL installation remains pinned or its virtual environment is broken, explain
the problem and ask before uninstalling and reinstalling it. Never delete a pipx
environment manually without explicit user approval.
Upgrade without losing personalization
Treat $BY2KB_HOME (normally ~/.by2kb) and the configured knowledge-base folder as
user-owned state. An upgrade must preserve config.toml, .env, by2kb.db, downloaded
models, custom Skills, and every knowledge artifact.
- Inspect
by2kb version, pipx list, and by2kb doctor --json first.
- Run
pipx upgrade by2kb. Do not run by2kb init, by2kb init --force, or rewrite
configuration during an ordinary upgrade.
- Refresh only the managed Hermes adapter with
by2kb agent install hermes --force.
- Run
by2kb doctor --json again and report any migration or restart requirement.
The Hermes adapter directory is program-owned. Put a personalized runtime Skill at
$BY2KB_HOME/skills/video-to-knowledge/SKILL.md, or set BY2KB_HERMES_SKILL to an
explicit file; both take precedence over the packaged Skill and survive adapter
replacement. Other enrichment Skills belong under $BY2KB_HOME/skills and already
take precedence over packaged defaults.
Optional: cloud ASR
Use this path only when the user chooses Doubao ASR or cannot run Whisper locally:
- Install
pipx install "by2kb[asr-doubao,youtube]".
- Run
by2kb init in a trusted local terminal and select doubao when prompted.
- Do not ask the user to paste TOS or ASR credentials into an IM conversation. The
initializer stores secrets in the local by2kb
.env file.
- Install the Agent adapter and run
by2kb doctor --json as above.
Stop and report the exact failed check when a required runtime, credential, permission,
model download, or Agent restart needs user action. Do not weaken permissions or switch
providers merely to make diagnostics pass.
1---2name: install-by2kb3description: Install, configure, update, or diagnose by2kb for an Agent user. Defaults to local faster-whisper and local Markdown; use a cloud ASR provider only when the user explicitly chooses one.4---56# Install by2kb78Install by2kb as an independent CLI package, then install its adapter into the active9Agent. Do not clone or inspect the by2kb source repository as an installation method.1011## Before changing the system12131. Confirm the target machine is controlled by the user.142. Check for Python 3.12+, `pipx`, `ffmpeg`, `ffprobe`, `by2kb`, and the Agent host.153. If by2kb already has configuration, do not replace it. Run16 `by2kb doctor --json`, explain any failures, and preserve the current ASR and17 knowledge-base choices unless the user asks to change them.1819## Default: local Agent installation2021Use this path unless the user explicitly requests cloud ASR:22231. Install from PyPI with24 `pipx install "by2kb[asr-whisper,youtube]"`.252. Create a cloud-free Agent configuration with26 `by2kb init --preset agent-local`. This selects local faster-whisper, Bilibili and27 YouTube sources, Agent-hosted summarization, and a local Markdown library.283. Before downloading a Whisper model, tell the user its name and that the download29 can be large. Continue only after the user agrees, then run30 `by2kb models install`.314. For Hermes, run `by2kb agent install hermes`, followed by32 `by2kb doctor --json`.335. Restarting a running Agent can interrupt the current conversation. Ask before34 restarting it, then verify the gateway and ask the user to send one test video URL.3536If pipx reports that by2kb is already installed, try `pipx upgrade by2kb`. If an old37direct-URL installation remains pinned or its virtual environment is broken, explain38the problem and ask before uninstalling and reinstalling it. Never delete a pipx39environment manually without explicit user approval.4041## Upgrade without losing personalization4243Treat `$BY2KB_HOME` (normally `~/.by2kb`) and the configured knowledge-base folder as44user-owned state. An upgrade must preserve `config.toml`, `.env`, `by2kb.db`, downloaded45models, custom Skills, and every knowledge artifact.46471. Inspect `by2kb version`, `pipx list`, and `by2kb doctor --json` first.482. Run `pipx upgrade by2kb`. Do not run `by2kb init`, `by2kb init --force`, or rewrite49 configuration during an ordinary upgrade.503. Refresh only the managed Hermes adapter with51 `by2kb agent install hermes --force`.524. Run `by2kb doctor --json` again and report any migration or restart requirement.5354The Hermes adapter directory is program-owned. Put a personalized runtime Skill at55`$BY2KB_HOME/skills/video-to-knowledge/SKILL.md`, or set `BY2KB_HERMES_SKILL` to an56explicit file; both take precedence over the packaged Skill and survive adapter57replacement. Other enrichment Skills belong under `$BY2KB_HOME/skills` and already58take precedence over packaged defaults.5960## Optional: cloud ASR6162Use this path only when the user chooses Doubao ASR or cannot run Whisper locally:63641. Install `pipx install "by2kb[asr-doubao,youtube]"`.652. Run `by2kb init` in a trusted local terminal and select `doubao` when prompted.663. Do not ask the user to paste TOS or ASR credentials into an IM conversation. The67 initializer stores secrets in the local by2kb `.env` file.684. Install the Agent adapter and run `by2kb doctor --json` as above.6970Stop and report the exact failed check when a required runtime, credential, permission,71model download, or Agent restart needs user action. Do not weaken permissions or switch72providers merely to make diagnostics pass.