Skip to content

DeepTutor CLI

DeepTutor is built around an agent-native CLI: core runtime surfaces have terminal mirrors, turn execution can stream JSON for machine consumers, and the supported automation surface is documented in a single skill file that AI agents can read and drive autonomously. Some browser-first workflows (for example rich Co-Writer editing and Memory Workbench review) still live in the Web UI or HTTP API.

This section covers:

  • Commands — every top-level command and subcommand group with flags, schemas, and examples
  • Interactive REPL — drive a long chat session with /slash commands inline
  • Agent handoff — let Claude Code, Codex, OpenCode, or Hermes drive deeptutor for you
  • Server API — the HTTP / WebSocket surface that deeptutor serve exposes
Terminal window
# 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 Partner
deeptutor partner create my-bot --soul "Socratic math tutor"
# Inspect three-layer memory
deeptutor memory show L3

The terminal experience is the same experience an AI agent gets. When you write a turn in deeptutor chat, the underlying turn schema (TurnRequest) is identical to what Claude Code or Codex would send if you handed them SKILL.md.

This means:

  • Core learning flows can be driven from the terminal; browser-only editing and admin screens expose their state through the Web UI / API
  • deeptutor run --format json emits one JSON event per line; data-inspection commands such as kb list, kb search, session show, and notebook show also expose JSON where implemented
  • Sessions persist across turns — you can switch between Web, REPL, and one-shot run calls and resume where you left off
  • The CLI is the best automation entry point for turns, KBs, sessions, notebooks, memory, Partners, config inspection, plugins, providers, and Books
GroupWhat it doesMost-used
deeptutor initGuided setup wizarddeeptutor init --cli
deeptutor doctorCheck the workspace is ready to start a sessiondeeptutor doctor --online
deeptutor startLaunch backend + frontend togetherdeeptutor start
deeptutor serveBackend only (FastAPI on :8001)deeptutor serve --host 0.0.0.0
deeptutor chatInteractive REPLdeeptutor chat --kb physics
deeptutor runOne-shot capability turndeeptutor run deep_solve "..."
deeptutor kbKnowledge Base managementdeeptutor kb create / list / search
deeptutor skill / skillsSkill library and hub installsdeeptutor skill search / install / list
deeptutor sessionSession inspectiondeeptutor session list / show <id>
deeptutor notebookNotebook recordsdeeptutor notebook create / add-md
deeptutor memoryThree-layer memory storedeeptutor memory show L3
deeptutor partnerPartner lifecycledeeptutor partner create / start / stop (create writes config and starts it)
deeptutor configView runtime configurationdeeptutor config show
deeptutor pluginCapability / tool registrydeeptutor plugin list
deeptutor providerProvider auth flowsdeeptutor provider login openai-codex
deeptutor bookKnowledge Books (Guided Learning)deeptutor book list / health

See Commands for the full reference.

For exploratory, multi-turn work, drop into the REPL:

$ 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

Full guide: Interactive REPL.

For automation, CI, or AI-agent harnesses, use deeptutor run:

Terminal window
deeptutor run deep_solve "Find the eigenvalues of [[4,1],[2,3]]" \
--tool reason \
--format json | jq -r 'select(.type == "result") | .metadata.response // empty'

Each JSON line is one event — stage_start, content, tool_call, tool_result, thinking, done. You can pipe these into a downstream agent or extract the final answer with jq.

Full guide: Agent handoff.

Every CLI command operates against the same workspace as the Web UI. By default, runtime data lives under data/ in the directory where you launch DeepTutor. Override the workspace root with DEEPTUTOR_HOME=/path, deeptutor init --home /path, or deeptutor start --home /path.

Every command supports --help:

$ deeptutor --help
Usage: deeptutor [OPTIONS] COMMAND [ARGS]...
DeepTutor CLI – agent-first interface for capabilities, tools, and knowledge.
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ doctor Check whether DeepTutor is ready to start a session. │
│ init Create or update data/user/settings for this workspace. │
│ run Run any capability in a single turn (agent-first entry point). │
│ start Launch backend + frontend together. Source installs default to │
│ production. │
│ serve Start the DeepTutor API server. │
│ partner Manage partners (IM-connected companions). │
│ chat Interactive chat REPL. │
│ kb Manage knowledge bases. │
│ skill Manage skills and install from hubs (ClawHub, …). │
│ skills Manage skills and install from hubs (ClawHub, …). │
│ memory View and manage lightweight memory. │
│ plugin List plugins. │
│ config Inspect configuration. │
│ session Manage shared sessions. │
│ notebook Manage notebooks and imported markdown records. │
│ provider Manage provider OAuth login. │
│ book Manage interactive Books (BookEngine). │
╰──────────────────────────────────────────────────────────────────────────────╯

And every subcommand:

$ deeptutor run --help
$ deeptutor kb create --help
$ deeptutor partner start --help