Skip to content
/

knowhub

knowhub · yujiosaka/knowhub · ★ 40 · last commit 2025-07-24

Primitive shape
No installable primitives
00

Summary

knowhub — Summary

knowhub is a TypeScript CLI tool that synchronizes AI coding-agent knowledge files (rules, templates, guidelines) across a project by fetching resources from local paths or remote HTTP(S) URLs and distributing them to one or more output locations via copy or symlink. It is framework-agnostic: a single .knowhubrc configuration file declares which rule files (Cursor Rules, Copilot instructions, Windsurf settings, Claude MD, etc.) go where, and npx knowhub distributes them in one command. Key features include explicit overwrite control, symlink support (with Windows fallback to copy), directory tree distribution, dry-run mode, and a plugin architecture for extensible resource types (local, http, and custom). It solves the multi-agent-tool synchronization problem — keeping .cursorrules, .github/copilot-instructions.md, .windsurf/rules, and other tool-specific files consistently updated from a single source of truth. Compared to seeds, it is closest to agent-os in purpose (distributing standards/instructions across a project) but operates at the file-distribution layer rather than the prompting layer.

differs_from_seeds: Unlike any of the 11 seeds, knowhub is not a prompt library or agent behavioral framework — it is a file distribution system for agent knowledge files. The closest seed is agent-os (which also manages instruction files), but agent-os ships the content; knowhub manages the distribution of content from any source. The symlink-based sync mechanism and multi-destination plugin architecture have no parallel in the seed corpus.

01

Overview

knowhub — Overview

Origin

Created by Yuji Isobe (yujiosaka) and published as an npm package (knowhub). Version 1.1.0 (npm), 40 stars, 2 forks. TypeScript codebase, MIT license. Actively maintained as of July 2025.

Philosophy

The core problem: organizations using multiple AI coding tools (Cursor, Copilot, Windsurf, Claude Code) must maintain separate rule files for each tool. These files tend to drift apart. knowhub treats AI agent rule files as "knowledge assets" that should be centrally managed and automatically distributed, similar to how a monorepo might distribute shared configuration.

Key design decisions:

  • Single command sync: npx knowhub handles everything; no subcommands for normal usage
  • Explicit over implicit: Every resource declares its overwrite behavior and destination paths
  • Plugin architecture: local, http, and custom plugins — extensible without forking
  • Symlink-first: Symlinking is preferred over copying to ensure changes propagate automatically
  • No opinions on content: knowhub distributes whatever files you point it at; it has no view on what those files should contain

What It Does NOT Do

  • Ship any actual prompt or rule content
  • Enforce any AI workflow or methodology
  • Provide any hooks, commands, or skills for the AI agent itself
02

Architecture

knowhub — Architecture

Distribution

  • Type: npm-package (CLI tool)
  • Binary: knowhub (via npm install --save-dev knowhub or npx knowhub)
  • Version: 1.1.0
  • License: MIT
  • Language: TypeScript (compiled to Node.js ESM)

Install

npm install --save-dev knowhub
# or
yarn add --dev knowhub
# or
bun add --dev knowhub

Then run: npx knowhub

Init command: npx knowhub init (generates initial config)

Config File Search Order

  1. .knowhubrc
  2. .knowhubrc.json
  3. .knowhubrc.yaml / .knowhubrc.yml
  4. .knowhubrc.js
  5. .knowhubrc.ts
  6. package.json"knowhub" field

Directory Structure

bin/
  knowhub.js           # CLI entry point
src/
  knowhub.ts           # Core sync logic
  plugins/             # local, http, and custom plugin adapters
templates/             # (unknown contents)
tests/                 # Test suite
examples/              # Example configurations
docs/                  # Documentation
.knowhubrc.ts          # Self-describing config (the repo uses itself)

Required Runtime

  • node >= 18 (inferred from package)
  • bun (used by the project itself for development)

Target AI Tools (as consumers of distributed files)

  • Cursor
  • GitHub Copilot
  • Windsurf
  • Claude Code
  • Any tool with a file-based configuration convention
03

Components

knowhub — Components

CLI Commands

Name Purpose
npx knowhub Main sync command: load config, fetch resources, distribute to outputs
npx knowhub init Generate initial .knowhubrc configuration
npx knowhub --dry-run Preview actions without writing to disk

Built-in Plugins

local plugin

Handles local filesystem resources (files and directories):

  • path: local filesystem path
  • symlink: create symlinks (default: false)

http plugin

Fetches from HTTP(S) URLs:

  • url: HTTP(S) URL
  • headers: custom headers (for auth, etc.)
  • timeout: milliseconds (default: 30000)
  • method: HTTP method (default: GET)
  • body: request body for POST/PUT

Resource Schema (the core abstraction)

type Resource = {
  plugin: string;           // "local", "http", or custom
  pluginConfig: unknown;    // plugin-specific config
  overwrite?: boolean;      // default: true
  outputs: string | string[]; // destination paths
};

Skills / Agents / Hooks

None — knowhub is a build-time/sync-time tool, not an agent framework. It provides no Claude Code skills, hooks, or slash commands.

Templates

The repo ships templates (path: templates/) but contents were not enumerated in available data.

Scripts

None beyond the CLI binary itself. No shell scripts, no install scripts.

05

Prompts

knowhub — Prompt Excerpts

knowhub is not a prompt library. It ships no prompt or skill files. The following are configuration examples from the README that represent the "language" users write.

# .knowhubrc.yaml
resources:
  - plugin: "local"
    pluginConfig:
      path: "./shared-rules/common-style.md"
      symlink: true
    overwrite: true
    outputs:
      - ".cursor/rules/common-style.md"
      - ".github/copilot-instructions.md"
      - ".windsurf/rules/common-style.md"

Analysis: Declarative resource-to-destinations mapping. Single source file distributed to three AI tool locations via symlink. Not a prompt — this is a configuration DSL for file distribution.


Excerpt 2: HTTP plugin (remote rule file distribution)

- plugin: "http"
  pluginConfig:
    url: "https://raw.githubusercontent.com/org/standards/main/CLAUDE.md"
    headers:
      Authorization: "Bearer YOUR_API_TOKEN_HERE"
    timeout: 30000
  overwrite: true
  outputs:
    - "CLAUDE.md"
    - ".cursor/rules/claude-base.md"

Analysis: Fetches a remote rule file from GitHub (or any HTTP source) and distributes it locally. Enables a central standards repository pattern — one team publishes rules, all downstream projects pull them. Note: environment variable expansion is not supported in YAML (only in .knowhubrc.ts).


Note on Prompt Content

knowhub is content-agnostic. It distributes whatever files you configure. The actual prompt content lives in the source files — CLAUDE.md, .cursorrules, etc. — which are authored externally and managed by the user.

09

Uniqueness

knowhub — Uniqueness & Positioning

differs_from_seeds

Unique in the corpus — no seed framework is a file-distribution tool. The closest comparison is agent-os (manages instruction files for AI agents), but agent-os ships the content and installs it once via bash scripts. knowhub manages ongoing synchronization of content from any source (local or HTTP) to multiple destinations, with symlink or copy semantics, and is designed to run repeatedly as a sync operation. The ccmemory seed also manages external state for agents, but via a Neo4j database, not filesystem distribution. No seed or batch-27 peer implements the central-standards-repo pattern (one team publishes rules, downstream projects pull via HTTP plugin) that knowhub enables.

Positioning

  • Infrastructure, not methodology
  • Central standards repository enabler
  • Multi-tool synchronization
  • Build-time/CI integration

Observable Failure Modes

  1. No drift detection: knowhub can't tell you if a destination file has drifted from the source; it only fixes it when you run the sync
  2. No content awareness: Distributes files blindly — if the source CLAUDE.md has errors, they propagate everywhere
  3. Symlink limitations on Windows: Symlinks require elevated privileges on Windows; knowhub falls back to copy, which breaks the "single source" property
  4. No agent-side hooks: Once files are distributed, there's no mechanism to notify running agents that rules have changed

Distinctive Value

The HTTP plugin enabling remote-hosted rule distribution is the most distinctive feature. An organization can publish a CLAUDE.md or .cursorrules file to a GitHub repo and have all downstream projects pull it automatically. This is a central-standards-as-code pattern with no equivalent in the seed corpus.

04

Workflow

knowhub — Workflow

Workflow Pattern

knowhub is a sync tool, not a workflow orchestrator. Its "workflow" is:

1. Author centralize rule files (CLAUDE.md, .cursorrules, copilot-instructions, etc.)
2. Define .knowhubrc pointing to those files + destination paths
3. Run: npx knowhub  (or add to CI/pre-commit/postinstall)
4. Files are distributed (copied or symlinked) to all destinations
5. When rule files change, re-run knowhub to propagate updates

Phases + Artifacts

Phase Artifact
Init .knowhubrc config file generated
Configure Resource + output path declarations in config
Sync Rule files placed at all output destinations
(Optional) Dry-run List of would-be actions printed, no writes

Approval Gates

None — knowhub is non-interactive by default. The overwrite: false setting on individual resources acts as a soft protection (won't overwrite existing files), but there is no interactive approval gate.

Integration Points

  • Can be run as a postinstall npm script
  • Can be run in CI (e.g., on main push) to verify all outputs are in sync
  • Can be run as a pre-commit hook
  • --dry-run makes it safe to preview in any context
06

Memory Context

knowhub — Memory & Context

State Storage

None — knowhub is stateless. Each run reads the config, fetches resources, and writes outputs. No database, no journal, no state file.

Persistence

The distributed files (CLAUDE.md, .cursorrules, etc.) are persistent on disk, but knowhub does not manage or track them after distribution. It has no "sync state" to detect drift — it simply overwrites (or skips, if overwrite: false) on each run.

Memory Type

None from the framework's perspective. The distributed files themselves become the agent's memory/context, but that is the content layer, not knowhub's concern.

Context Relevance

knowhub solves the meta-problem: ensuring that the context files the agent reads (CLAUDE.md, .cursorrules, etc.) are consistently up to date across all the places the agent looks for them. It is infrastructure for context management, not a context manager itself.

07

Orchestration

knowhub — Orchestration

Multi-Agent

No — knowhub has no agent concept at all.

Orchestration Pattern

None — knowhub is a one-shot sync tool.

Isolation Mechanism

None.

Multi-Model

No.

Execution Mode

One-shot (run manually or as CI/pre-commit hook).

Cross-Tool Portability

High — tool-agnostic. Works with any AI tool that reads files from disk (Cursor, Copilot, Windsurf, Claude Code, any other). The tool is not Claude-Code-specific in any way.

08

Ui Cli Surface

knowhub — UI & CLI Surface

CLI Binary

  • Exists: yes
  • Name: knowhub
  • Entry: ./bin/knowhub.js
  • Install: npm install --save-dev knowhub
  • Is thin wrapper: no (it is the full runtime)
  • Subcommands: knowhub (sync), knowhub init (generate config), knowhub --dry-run

Local UI / Dashboard

None.

IDE Integration

None — knowhub is run from the terminal or CI, not from inside an IDE.

Observability

Dry-run mode (--dry-run) prints what would happen without executing. No structured logging, no audit trail beyond console output.

Related frameworks

same archetype · same primary tool · same memory type

Context-Engineering Handbook ★ 9.0k

Provides a first-principles, research-grounded vocabulary and learning path for context engineering — the discipline of designing…

walkinglabs/learn-harness-engineering ★ 6.6k

Teach harness engineering from first principles (12 lectures + 6 projects) and provide a scaffolding skill (harness-creator) that…

Awesome Harness Engineering (walkinglabs) ★ 2.7k

Curate the authoritative reference list of articles, benchmarks, and tools for harness engineering — the practice of shaping the…

cline-memory-bank (nickbaumann98) ★ 581

Custom instructions + 6-file hierarchical Markdown memory bank so Cline maintains full project context across sessions, with a…

FPF (First Principles Framework) ★ 372

Provides a formal pattern language for making reasoning explicit, traceable, and publishable in mixed human/AI engineering work —…

nexu-io/harness-engineering-guide ★ 134

Provide a practical, code-first reference guide to harness engineering — from first principles to production patterns —…