Skip to content

farskid/canopy

Repository files navigation

Canopy

Platform to learn for people who live in the docs.

Local-first AI workspace: branching chat for thinking out loud, plus a Google Docs–style editor with comments and a doc-scoped companion that can research, edit, and take notes.

What’s in here

  • Branching chat — message tree (not a flat transcript). Branch from any reply or a text selection; merge side threads back as summaries.
  • Docs — TipTap editor with tables, comments, and AI-assisted threads on selected text.
  • Companion — per-doc AI sidebar: research, auto-apply safe edits (with undo), notes, jump-to-change chips.
  • Local data — SQLite on disk (data/canopy.db). No auth, no cloud sync in v1.

Setup

git clone https://github.com/farskid/canopy.git
cd canopy
cp .env.example .env
# set MODEL_PROVIDER + MODEL_API_KEY (+ MODEL_ID)

npm install
npm run db:push
npm run dev

Open http://localhost:3000. Docs UI: /doc.

Environment

Variable Required Description
MODEL_PROVIDER No google (default), openai, anthropic, or openai-compatible
MODEL_API_KEY Yes* API key for the chosen provider (*optional for some local compatible servers)
MODEL_ID No Model id (default gemini-3.6-flash)
MODEL_BASE_URL For compatible Base URL, e.g. https://api.deepseek.com/v1
MODEL_PROVIDER_NAME No Label for openai-compatible (e.g. deepseek, kimi)
TAVILY_API_KEY No Better web_search. Without it, a DuckDuckGo fallback is used

Bring-your-own LLM: set MODEL_PROVIDER + MODEL_API_KEY + MODEL_ID. For DeepSeek, Kimi, Ollama, OpenRouter, etc. use openai-compatible + MODEL_BASE_URL. See .env.example for copy-paste presets. Companion needs a model that supports tool calling.

Scripts

Command What it does
npm run dev Dev server
npm run build / start Production
npm run db:push Apply Drizzle schema → SQLite
npm run lint ESLint

Stack

Next.js (App Router) · TipTap · Drizzle + better-sqlite3 · Vercel AI SDK (BYOK) · Tailwind

License

Source is available under the PolyForm Noncommercial License 1.0.0.

  • Allowed: personal use, tinkering, research, hobby projects, and other non-commercial purposes (see the license text).
  • Not allowed under this license: using Canopy as any product or service — including a SaaS or internal tool with zero users / zero revenue — or any other commercial purpose. If you’re building or operating something for a company, customers, or anticipated commercial use, you need a commercial deal.

For commercial use, open a GitHub issue or contact Farzad to agree on a deal.

This is source-available, not OSI “open source.”

About

Local-first AI workspace for people who live in the docs — branching chat, doc editor, companion AI.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages