Skip to content

Your lightweight open-source personal agent.

docs: add core agent line count script and update README with real-time stats

Re-bin77d4892b0d6c
diff --git a/README.md b/README.md
index 36cb65b59..300fedbff 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,9 @@
🐈 **nanobot** is an **ultra-lightweight** personal AI assistant inspired by [Clawdbot](https://github.com/openclaw/openclaw)
-⚑️ Delivers core agent functionality in just **~4,000** lines of code β€” **99% smaller** than Clawdbot's 430k+ lines.
+⚑️ Delivers core agent functionality in just **~3,400** lines of code β€” **99% smaller** than Clawdbot's 430k+ lines.
+
+πŸ“ Real-time line count: **3,359 lines** (run `bash core_agent_lines.sh` to verify anytime)
## πŸ“’ News
@@ -25,7 +27,7 @@
## Key Features of nanobot:
-πŸͺΆ **Ultra-Lightweight**: Just ~4,000 lines of code β€” 99% smaller than Clawdbot - core functionality.
+πŸͺΆ **Ultra-Lightweight**: Just ~3,400 lines of core agent code β€” 99% smaller than Clawdbot.
πŸ”¬ **Research-Ready**: Clean, readable code that's easy to understand, modify, and extend for research.
diff --git a/core_agent_lines.sh b/core_agent_lines.sh
new file mode 100755
index 000000000..3f5301a95
--- /dev/null
+++ b/core_agent_lines.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Count core agent lines (excluding channels/, cli/, providers/ adapters)
+cd "$(dirname "$0")" || exit 1
+
+echo "nanobot core agent line count"
+echo "================================"
+echo ""
+
+for dir in agent agent/tools bus config cron heartbeat session utils; do
+ count=$(find "nanobot/$dir" -maxdepth 1 -name "*.py" -exec cat {} + | wc -l)
+ printf " %-16s %5s lines\n" "$dir/" "$count"
+done
+
+root=$(cat nanobot/__init__.py nanobot/__main__.py | wc -l)
+printf " %-16s %5s lines\n" "(root)" "$root"
+
+echo ""
+total=$(find nanobot -name "*.py" ! -path "*/channels/*" ! -path "*/cli/*" ! -path "*/providers/*" | xargs cat | wc -l)
+echo " Core total: $total lines"
+echo ""
+echo " (excludes: channels/, cli/, providers/)"
diff --git a/pyproject.toml b/pyproject.toml
index 0c59f6671..2a952a16c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,12 +29,10 @@ dependencies = [
"rich>=13.0.0",
"croniter>=2.0.0",
"python-telegram-bot>=21.0",
+ "lark-oapi>=1.0.0",
]
[project.optional-dependencies]
-feishu = [
- "lark-oapi>=1.0.0",
-]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
diff --git a/test_docker.sh b/tests/test_docker.sh
old mode 100755
new mode 100644
similarity index 97%
rename from test_docker.sh
rename to tests/test_docker.sh
index a90e08096..1e5513383
--- a/test_docker.sh
+++ b/tests/test_docker.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
+cd "$(dirname "$0")/.." || exit 1
IMAGE_NAME="nanobot-test"