### DeepTutor First-Time Setup Source: https://github.com/hkuds/deeptutor/blob/main/SKILL.md Installs DeepTutor and initiates an interactive guided setup process. ```bash cd DeepTutor pip install -e . deeptutor init # Interactive guided setup ``` -------------------------------- ### Install DeepTutor from Source Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/from-source.md Clone the repository, set up a Python virtual environment, install backend and frontend dependencies, and initialize and start the application. ```bash git clone https://github.com/HKUDS/DeepTutor.git cd DeepTutor # Create a venv (macOS / Linux) # Windows PowerShell: # py -3.11 -m venv .venv ; .\.venv\Scripts\Activate.ps1 python3 -m venv .venv && source .venv/bin/activate python -m pip install --upgrade pip # Install backend + frontend deps python -m pip install -e . ( cd web && npm ci --legacy-peer-deps ) deeptutor init deeptutor start ``` -------------------------------- ### Initialize deeptutor setup Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/commands.md Use `deeptutor init` for guided setup. Options allow for full setup, CLI-only setup, or specifying a custom home directory. ```bash deeptutor init # Full setup (asks ports + LLM + embedding + search) ``` ```bash deeptutor init --cli # CLI-only (skips port questions) ``` ```bash deeptutor init --home /path # Use a non-default workspace ``` -------------------------------- ### Python: Start Tour Script Source: https://github.com/hkuds/deeptutor/blob/main/assets/releases/ver1-2-4.md This Python script initiates a 7-step fresh-install tour for DeepTutor. It handles environment detection, dependency installation for both backend and frontend, and guides the user through provider configuration. ```python import scripts.start_tour scripts.start_tour.run() ``` -------------------------------- ### Install and Initialize DeepTutor Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/pypi.md Install the deeptutor package using pip, initialize its configuration, and start the application. The application requires Python 3.11+ and Node.js 20+. ```bash mkdir -p my-deeptutor && cd my-deeptutor pip install -U deeptutor deeptutor init # prompts for ports + LLM provider + optional embedding deeptutor start # starts backend + frontend; keep the terminal open ``` -------------------------------- ### Install TutorBot Python Extras Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/index.md Commands to install the TutorBot extra for a full server or CLI-only installation. Also shows installation from PyPI. ```bash # Full server + TutorBot pip install -e ".[tutorbot]" # CLI-only + TutorBot pip install -e "./packaging/deeptutor-cli[tutorbot]" # From PyPI (already includes tutorbot) pip install deeptutor ``` -------------------------------- ### Install Dependencies Source: https://github.com/hkuds/deeptutor/blob/main/site/README.md Installs all the necessary dependencies for your project. ```bash npm install ``` -------------------------------- ### New Contributors Example Source: https://github.com/hkuds/deeptutor/blob/main/assets/releases/ver0-3-0.md Example of listing new contributors and their first contributions in the release notes. ```git * @oshliaer made their first contribution in https://github.com/HKUDS/DeepTutor/pull/27 * @LouisACR made their first contribution in https://github.com/HKUDS/DeepTutor/pull/28 * @ahmedjawedaj made their first contribution in https://github.com/HKUDS/DeepTutor/pull/34 ``` -------------------------------- ### Start WhatsApp Bridge Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/whatsapp.md Commands to navigate to the bridge directory, install dependencies, and run the Node.js bridge script. ```bash cd multi-user/whatsapp-bridge npm install node bridge.js ``` -------------------------------- ### Install TutorBot SDKs Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/troubleshooting.md Install the necessary Python packages for TutorBot integration. This command installs the generic TutorBot SDK, or specific ones for platforms like Telegram, Slack, Zulip, and Matrix. ```bash # Generic pip install -e ".[tutorbot]" # Or one specific (rarely needed) pip install python-telegram-bot # Telegram pip install slack-sdk # Slack pip install zulip # Zulip pip install matrix-nio # Matrix (no E2EE) ``` -------------------------------- ### DeepTutor System and Configuration Commands Source: https://github.com/hkuds/deeptutor/blob/main/SKILL.md Commands for viewing configuration, listing plugins, getting plugin details, logging into providers, and starting the DeepTutor API server. ```bash deeptutor config show # Print current configuration deeptutor plugin list # List registered tools and capabilities deeptutor plugin info # Show tool/capability details deeptutor provider login # OAuth login (openai-codex, github-copilot) deeptutor serve [--port 8001] [--reload] # Start API server ``` -------------------------------- ### Start Local Development Server Source: https://github.com/hkuds/deeptutor/blob/main/site/README.md Starts a local development server, typically accessible at `localhost:4321`. ```bash npm run dev ``` -------------------------------- ### Installing Pre-commit Source: https://github.com/hkuds/deeptutor/blob/main/CONTRIBUTING.md Install the pre-commit tool for managing Git hooks. ```bash pip install pre-commit # Or: conda install -c conda-forge pre-commit ``` -------------------------------- ### Summarize Configuration Example Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/summarize/SKILL.md Shows an example of a local configuration file for the summarize CLI. This file can be used to set default options, such as the AI model to use. ```json { "model": "openai/gpt-5.2" } ``` -------------------------------- ### Install All DeepTutor Features Source: https://github.com/hkuds/deeptutor/blob/main/AGENTS.md Installs the complete DeepTutor application with all available features and addons. This is the most comprehensive installation option. ```bash pip install deeptutor.[all] ``` -------------------------------- ### Install Full Server Runtime Source: https://github.com/hkuds/deeptutor/blob/main/requirements.txt This command installs the complete server runtime, including the CLI, API, and TutorBot. It recursively includes dependencies from requirements/tutorbot.txt. Requires Python 3.11 or higher. ```bash -r requirements/tutorbot.txt ``` -------------------------------- ### Development Setup and Pre-commit Hooks Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/contributing.md This snippet details the steps to set up a local development environment for DeepTutor, including forking, cloning, installing dependencies, and configuring pre-commit hooks for code quality checks. Ensure you sync with the 'dev' branch before branching. ```bash git checkout dev && git pull origin dev git checkout -b feature/your-feature-name pip install -e ".[all]" pip install pre-commit pre-commit install pre-commit run --all-files ``` -------------------------------- ### Start a Bot Source: https://github.com/hkuds/deeptutor/blob/main/README.md Initiate a previously created TutorBot instance. ```bash deeptutor bot start ``` -------------------------------- ### Installing Git Hooks Source: https://github.com/hkuds/deeptutor/blob/main/CONTRIBUTING.md Install the pre-commit Git hooks into your local repository. ```bash pre-commit install ``` -------------------------------- ### Install DeepTutor CLI Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/cli-only.md Clone the repository, set up a virtual environment, and install the CLI-only package. This is the primary installation method for CLI-only usage. ```bash git clone https://github.com/HKUDS/DeepTutor.git cd DeepTutor # Create a venv (macOS / Linux) # Windows PowerShell: # py -3.11 -m venv .venv-cli ; .\.venv-cli\Scripts\Activate.ps1 python3 -m venv .venv-cli && source .venv-cli/bin/activate python -m pip install --upgrade pip python -m pip install -e ./packaging/deeptutor-cli deeptutor init --cli deeptutor chat ``` -------------------------------- ### Install DeepTutor for Development Source: https://github.com/hkuds/deeptutor/blob/main/AGENTS.md Installs the full DeepTutor application along with tools for testing and linting. This is recommended for developers contributing to the project. ```bash pip install deeptutor.[dev] ``` -------------------------------- ### Installing Project Dependencies Source: https://github.com/hkuds/deeptutor/blob/main/CONTRIBUTING.md Install the project's dependencies, including optional extras, in editable mode. ```bash pip install -e ".[all]" ``` -------------------------------- ### Start deeptutor Server Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/server-api.md Starts the deeptutor server. You can specify custom host and port, or enable hot reloading for development. ```bash deeptutor serve ``` ```bash deeptutor serve --host 127.0.0.1 --port 18001 ``` ```bash deeptutor serve --reload ``` -------------------------------- ### Install TutorBot Extras Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/cli-only.md Install the necessary extras for TutorBot functionality within the CLI-only environment. This includes channel SDKs for integrations. ```bash pip install -e "./packaging/deeptutor-cli[tutorbot]" ``` -------------------------------- ### Create and Start a New Bot Source: https://github.com/hkuds/deeptutor/blob/main/README.md Instantiate and launch a new TutorBot, with options for name, persona, and model. ```bash deeptutor bot create ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/from-source.md Install or update frontend dependencies after adding or upgrading them. Ensure to commit both package.json and package-lock.json. ```bash cd web npm install --legacy-peer-deps # commit both web/package.json and web/package-lock.json ``` -------------------------------- ### Install a Skill Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/clawhub/SKILL.md Installs a skill from ClawHub into your nanobot workspace. Replace `` with the skill's identifier obtained from search results. Always include `--workdir` to ensure skills are installed in the correct location. ```bash npx --yes clawhub@latest install --workdir ~/.nanobot/workspace ``` -------------------------------- ### Install Full DeepTutor Application Source: https://github.com/hkuds/deeptutor/blob/main/AGENTS.md Installs the complete DeepTutor application, including the CLI, Web/API, and packaged Web assets. Use this for a full-featured experience. ```bash pip install deeptutor ``` -------------------------------- ### Install All DeepTutor Features Source: https://github.com/hkuds/deeptutor/blob/main/requirements.txt Install all available features and components of DeepTutor from a source checkout. Requires Python 3.11 or higher. ```bash pip install -e ".[all]" ``` -------------------------------- ### Session JSON Output Example Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/commands.md Example of the full JSON output for a session, showing its metadata, messages, and preferences. ```json { "id": "sess_abc123", "title": "Chain rule explanation", "capability": "chat", "status": "completed", "messages": [ {"role": "user", "content": "..."}, {"role": "assistant", "content": "..."} ], "preferences": { "tools": ["rag", "reason"], "knowledge_bases": ["math"], "language": "en" }, "created_at": "2026-05-21T14:23:01Z", "updated_at": "2026-05-21T14:24:38Z" } ``` -------------------------------- ### Start DeepTutor API Server Source: https://github.com/hkuds/deeptutor/blob/main/README.md Initiate the DeepTutor API server for external access. ```bash deeptutor serve ``` -------------------------------- ### Install DeepTutor with TutorBot Agent Source: https://github.com/hkuds/deeptutor/blob/main/requirements.txt Install DeepTutor with the TutorBot agent engine from a source checkout. Requires Python 3.11 or higher. ```bash pip install -e ".[tutorbot]" ``` -------------------------------- ### Install Full DeepTutor with TutorBot Engine Source: https://github.com/hkuds/deeptutor/blob/main/AGENTS.md Installs the full DeepTutor application along with the TutorBot agent engine and channel SDKs. Use this to enable advanced agent functionalities. ```bash pip install deeptutor.[tutorbot] ``` -------------------------------- ### Install Matrix Dependencies Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/matrix.md Install the necessary Python extras for Matrix support. Use '.[matrix]' for base support or '.[matrix-e2e]' for end-to-end encryption, which also requires libolm. ```bash pip install -e ".[matrix]" ``` ```bash pip install -e ".[matrix-e2e]" ``` ```bash pip install -e ".[tutorbot]" ``` -------------------------------- ### Start DeepTutor Chat Source: https://github.com/hkuds/deeptutor/blob/main/README.md Launches the interactive chat REPL for DeepTutor. ```bash deeptutor chat ``` -------------------------------- ### Install, Configure, and Use DeepTutor CLI Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/index.md Basic commands to install, configure, and interact with the DeepTutor CLI for various tasks like chat, knowledge base management, and running bots. ```bash # Install (one of the paths from Get Started) pip install deeptutor # Configure deeptutor init # Interactive chat deeptutor chat # Single-turn, agent-style deeptutor run deep_solve "Find the derivative of sin(x²)" --tool reason --format json # Manage knowledge bases deeptutor kb create physics --doc chapter1.pdf deeptutor kb search physics "What is angular momentum?" # Run a TutorBot deeptutor bot create my-bot --persona "Socratic math tutor" # Inspect three-layer memory deeptutor memory show L3 ``` -------------------------------- ### Manage DeepTutor TutorBot Instances Source: https://github.com/hkuds/deeptutor/blob/main/SKILL.md Commands for listing, creating, starting, and stopping TutorBot instances. ```bash deeptutor bot list # List all TutorBot instances deeptutor bot create --name "My Tutor" # Create and start a new bot deeptutor bot start # Start a bot deeptutor bot stop # Stop a bot ``` -------------------------------- ### Start TutorBot Bot Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/dingtalk.md Initiate the TutorBot with a specific tutor name. This command starts the bot and connects it to configured channels, including DingTalk in stream mode. ```bash deeptutor bot start my-math-tutor ``` -------------------------------- ### Install Optional DeepTutor Extras Source: https://github.com/hkuds/deeptutor/blob/main/README.md Install additional dependency groups for specific features like testing tools (`dev`), TutorBot engine (`tutorbot`), Matrix chat integration (`matrix`, `matrix-e2e`), or math animations (`math-animator`). ```bash pip install -e ".[dev]" # tests/lint tools ``` ```bash pip install -e ".[tutorbot]" # TutorBot engine + channel SDKs ``` ```bash pip install -e ".[matrix]" # Matrix channel without E2EE/libolm ``` ```bash pip install -e ".[matrix-e2e]" # Matrix E2EE; requires libolm ``` ```bash pip install -e ".[math-animator]" # Manim addon; requires LaTeX/ffmpeg/system libs ``` -------------------------------- ### Caddy Reverse Proxy Configuration Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/multi-user.md Example Caddyfile for routing API and main traffic to DeepTutor instances. Ensure this configuration matches your deployment setup. ```caddyfile deeptutor.example.com { reverse_proxy /api/* localhost:8001 reverse_proxy localhost:3782 } ``` -------------------------------- ### Initialize and Search RAGService Source: https://github.com/hkuds/deeptutor/blob/main/assets/releases/ver0-4-0.md Demonstrates how to initialize the RAGService with a knowledge base and documents, and then perform a search query. Uses the RAG_PROVIDER environment variable for backend selection. ```python from deeptutor.services.rag import RAGService service = RAGService() # Uses RAG_PROVIDER env var (default: raganything) await service.initialize("my_kb", ["doc.pdf"]) result = await service.search("query", "my_kb") ``` -------------------------------- ### Display Main CLI Help Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/index.md Run this command to see all available top-level commands and their brief descriptions. This is useful for understanding the CLI's capabilities. ```text $ deeptutor --help Usage: deeptutor [OPTIONS] COMMAND [ARGS]... DeepTutor — agent-native, open-source personalized tutoring. ╭─ Commands ───────────────────────────────────────────────────────────────────╮ │ init Guided setup wizard. │ │ start Launch backend + frontend together. │ │ serve Backend only. │ │ chat Interactive REPL. │ │ run One-shot capability turn. │ │ kb Knowledge base management. │ │ session Session inspection. │ │ notebook Notebook records. │ │ memory Three-layer memory store. │ │ bot TutorBot lifecycle. │ │ config View runtime configuration. │ │ plugin Capability / tool registry. │ │ provider Provider auth flows. │ │ book Knowledge Books (Guided Learning). │ ╰──────────────────────────────────────────────────────────────────────────────╯ ``` -------------------------------- ### Install DeepTutor CLI Source: https://github.com/hkuds/deeptutor/blob/main/packaging/deeptutor-cli/README.md Installs the DeepTutor CLI-only distribution using a virtual environment. Ensure the repository checkout remains after installation for editable installs. ```bash python3 -m venv .venv-cli source .venv-cli/bin/activate python -m pip install --upgrade pip python -m pip install -e ./packaging/deeptutor-cli ``` -------------------------------- ### Install libolm for Matrix E2EE Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/from-source.md Install the libolm library on macOS or Debian/Ubuntu systems when encountering 'libolm not found' errors after installing the `matrix-e2e` extra. Reinstall the extra after installing the library. ```bash brew install libolm # macOS sudo apt install libolm-dev # Debian / Ubuntu pip install -e ".[matrix-e2e]" --force-reinstall ``` -------------------------------- ### Skill Structure Example Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/skill-creator/SKILL.md Illustrates the directory structure for a typical skill, including the required SKILL.md file and optional bundled resources. ```tree skill-name/ ├── SKILL.md (required) │ ├── YAML frontmatter metadata (required) │ │ ├── name: (required) │ │ └── description: (required) │ └── Markdown instructions (required) └── Bundled Resources (optional) ├── scripts/ - Executable code (Python/Bash/etc.) ├── references/ - Documentation intended to be loaded into context as needed └── assets/ - Files used in output (templates, icons, fonts, etc.) ``` -------------------------------- ### Initialize New Skill with init_skill.py Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/skill-creator/SKILL.md Use this script to generate a new template skill directory. It automatically includes necessary files and structures, streamlining the skill creation process. Specify the skill name, output path, and optionally include resource directories or example files. ```bash scripts/init_skill.py --path [--resources scripts,references,assets] [--examples] ``` ```bash scripts/init_skill.py my-skill --path ./workspace/skills ``` ```bash scripts/init_skill.py my-skill --path ./workspace/skills --resources scripts,references ``` ```bash scripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples ``` -------------------------------- ### Install DeepTutor using Conda Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/from-source.md Alternative installation using Conda for environment management. After creating and activating the Conda environment, proceed with pip and npm installations. ```bash conda create -n deeptutor python=3.11 conda activate deeptutor python -m pip install --upgrade pip # ...then continue with `pip install -e .` and `npm ci` ``` -------------------------------- ### Creating a Virtual Environment Source: https://github.com/hkuds/deeptutor/blob/main/CONTRIBUTING.md Set up a Python virtual environment to manage project dependencies. ```bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` -------------------------------- ### Create a new notebook Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/notebook/SKILL.md Create a new notebook with a specified name and an optional description. The name is a required argument. ```bash deeptutor notebook create --description "Description text" ``` -------------------------------- ### Clone DeepTutor Repository for CLI Installation Source: https://github.com/hkuds/deeptutor/blob/main/README.md Clones the DeepTutor GitHub repository to set up a local development environment for the command-line interface-only installation. This is the first step before creating a virtual environment and installing dependencies. ```bash git clone https://github.com/HKUDS/DeepTutor.git cd DeepTutor ``` -------------------------------- ### Create a New Book via CLI Source: https://github.com/hkuds/deeptutor/blob/main/assets/releases/ver1-2-0.md Initiate the creation of a new book from the command line interface. ```bash deeptutor book create ``` -------------------------------- ### Launch DeepTutor REPL Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/chat-repl.md Opens the interactive REPL. You can pre-attach KBs, enable tools, start in a specific capability, resume a prior session, or pass preferences via flags. ```bash deeptutor chat ``` ```bash deeptutor chat --kb physics --tool rag --tool reason ``` ```bash deeptutor chat --capability deep_solve ``` ```bash deeptutor chat --session sess_abc123 ``` ```bash deeptutor chat --language zh --kb papers --history-ref sess_old_xyz ``` -------------------------------- ### Verify wecom-aibot-sdk Installation Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/wecom.md Verify that the wecom-aibot-sdk package has been successfully installed by running a simple Python command. ```bash python -c "import wecom_aibot_sdk; print('ok')" ``` -------------------------------- ### Interactive Chat REPL Example Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/index.md Demonstrates entering the interactive chat REPL with a specified knowledge base. Shows the initial prompt and the format for user input. ```text $ deeptutor chat --kb physics ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ DeepTutor CLI ┃ ┃ Type a message. /quit /tool /cap /kb /history /show /refs ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ [dim]session=(new) capability=chat tools=[] kb=[physics] history=[] notebook_refs=[] language=en config={}[/] You> Explain the chain rule with a worked example ``` -------------------------------- ### Install wecom-aibot-sdk Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/wecom.md Install the necessary Python package for WeCom integration. This is a prerequisite for using TutorBot with WeCom. ```bash pip install wecom-aibot-sdk ``` -------------------------------- ### Learning Path Generation from KB Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/deep-research/SKILL.md Create a standard depth learning path for a topic using the knowledge base. Specify the knowledge base with the --kb flag. ```bash deeptutor run deep_research "Machine learning fundamentals" --format json -l zh --config-json '{"mode":"learning_path","depth":"standard","sources":["kb"]}' --kb ml-textbook ``` -------------------------------- ### Install DeepTutor CLI Source: https://github.com/hkuds/deeptutor/blob/main/README.md Commands to set up a Python virtual environment and install the DeepTutor CLI in editable mode. ```bash python3 -m venv .venv-cli && source .venv-cli/bin/activate python -m pip install --upgrade pip python -m pip install -e ./packaging/deeptutor-cli ``` -------------------------------- ### OpenCode Initialization and Prompt Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/agent-handoff.md OpenCode follows a similar integration pattern. Initialize OpenCode, link the `SKILL.md` file from DeepTutor to your project, and then prompt OpenCode to interact with DeepTutor for tasks like planning study sessions. ```bash opencode init ln -s /path/to/DeepTutor/SKILL.md ./SKILL.md opencode "Plan a study session on quantum mechanics using deeptutor" ``` -------------------------------- ### Get Specific Book via API Source: https://github.com/hkuds/deeptutor/blob/main/assets/releases/ver1-2-0.md Fetch details for a specific book by its ID using this GET request. ```http GET /{book_id} ``` -------------------------------- ### Launch deeptutor backend and frontend Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/cli/commands.md The `deeptutor start` command launches both the backend and frontend services. It blocks execution until interrupted. `deeptutor serve` can be used for backend-only launches with options for host, port, and hot reloading. ```bash # Launch both backend + frontend (blocking; Ctrl+C stops both) deeptutor start deeptutor start --home /path # Backend only deeptutor serve --host 0.0.0.0 --port 8001 deeptutor serve --reload # Hot reload on file changes (dev only) ``` -------------------------------- ### Create Knowledge Base Source: https://github.com/hkuds/deeptutor/blob/main/README.md Create a new knowledge base, optionally from documents or a directory. ```bash deeptutor kb create ``` -------------------------------- ### Python: Dependency Installation with uv pip Source: https://github.com/hkuds/deeptutor/blob/main/assets/releases/ver1-2-4.md This Python code snippet demonstrates dependency installation using `uv pip`. It ensures packages are installed into the current Python interpreter, especially when running within a virtual environment managed by the tour script. ```python # Example usage within scripts/start_tour.py # ... subprocess.run([ sys.executable, "-m", "uv", "pip", "install", "--python", sys.executable, "-e", "." ]) # ... ``` -------------------------------- ### Install libolm for E2EE Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/matrix.md Install the libolm development library on macOS or Debian/Ubuntu systems to enable end-to-end encryption for Matrix. ```bash # macOS brew install libolm # Debian / Ubuntu sudo apt install libolm-dev ``` -------------------------------- ### Create a knowledge base Source: https://github.com/hkuds/deeptutor/blob/main/deeptutor/tutorbot/skills/knowledge-base/SKILL.md Create a new knowledge base. You can add a single document using `--doc` or a directory of documents using `--docs-dir` during creation. Creation from large PDFs may take time. ```bash deeptutor kb create --doc /path/to/file.pdf ``` ```bash deeptutor kb create --docs-dir /path/to/directory/ ``` -------------------------------- ### Inline Math Rendering Example Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/tutorbot/zulip.md Demonstrates how to format inline mathematical expressions using '$' delimiters for rendering within Zulip. ```text Inline: $x^2$ ``` -------------------------------- ### L1 Trace Event Example Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/explore/memory.md An example of a single event recorded in the L1 Workspace mirror, which is an append-only trace of user interactions. ```jsonl {"id":"evt_001","timestamp":"2026-05-21T14:23:01Z","surface":"chat","kind":"turn","content":"User asked about the chain rule"} {"id":"evt_002","timestamp":"2026-05-21T14:23:18Z","surface":"chat","kind":"tool_call","content":"rag_search"} {"id":"evt_003","timestamp":"2026-05-21T14:24:38Z","surface":"chat","kind":"turn_complete","content":"Explained with worked example"} ``` -------------------------------- ### Install libolm for Matrix E2EE Source: https://github.com/hkuds/deeptutor/blob/main/site/src/content/docs/docs/get-started/troubleshooting.md Install the libolm library, which is required for Matrix End-to-End Encryption. Instructions are provided for macOS and Debian/Ubuntu systems. ```bash # macOS brew install libolm # Debian / Ubuntu sudo apt install libolm-dev # Reinstall the matrix-e2e extra pip install -e ".[matrix-e2e]" --force-reinstall ``` -------------------------------- ### Preview Production Build Source: https://github.com/hkuds/deeptutor/blob/main/site/README.md Locally previews the production build before deploying. ```bash npm run preview ```