MCPcopy Index your code
hub / github.com/JSerZANP/shaku

github.com/JSerZANP/shaku @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
133 symbols 361 edges 70 files 2 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Shaku

(Shaku)- elucidate, explain

Shaku is a family of tools to help write technical blogs, out of my frustration while writing articles for my personal blog - jser.dev.

Packages

Core

  1. shaku-code-annotate-core - core parser of Shaku. Tokenizer not included.

for Latest Shiki(1.x.x)

Recommended implementation based on Shiki Transformer

  1. shaku-code-annotate-shiki-transformer - Shaku syntax transformer for Shiki@1.x.x

for Legacy Shiki(0.x.x)

Legacy implementation by wrapping shiki.

  1. shaku-code-annotate-shiki - Shaku syntax highlighter based on Shiki.
  2. remark-shaku-code-annotate - plugin for remark.
  3. marked-shaku-code-annotate - plugin for marked.

for Sugar High

  1. shaku-code-annotate-sugar-high - Shaku syntax highlighter based on Sugar High.

Tools

  1. Shaku Playground - a playground to try out shaku-code-annotate.
  2. Shaku Snippet - generate beautiful code snippet screenshots with annotation.

Dev tools

Also with some dev tools if you are interested

  1. Shiki Token Inspector - easily inspect the tokens generated by shiki.
  2. Sugar High Token Inspector - easily inspect the tokens generated by Sugar High.

Built with Shaku

Check out some cool stuff built with Shaku.

  • jser.dev blog is using Shaku heavily to annotate code snippets.
  • jser.pro has interactive React quizzes on top of Shaku.
  • bfe.dev supports Shaku in its posts.

Community

  1. Shaku Discord

Extension points exported contracts — how you extend this code

CodeToShakuHtmlOptions (Interface)
(no doc)
packages/shaku-code-annotate-shiki/src/codeToShakuHtml.ts
ShikiTransformerContextMeta (Interface)
(no doc)
packages/shaku-code-annotate-shiki-transformer/src/index.ts
ShakuHighlighter (Interface)
(no doc)
packages/shaku-code-annotate-shiki/src/getHighlighters.ts

Core symbols most depended-on inside this repo

fetch
called by 9
examples/web/components/Fetcher.ts
parseLine
called by 6
packages/shaku-code-annotate-core/src/parser.ts
renderComponent
called by 6
packages/shaku-code-annotate-core/src/parser.ts
getCanonicalMark
called by 6
packages/shaku-code-annotate-core/src/parser.ts
getShakuHighlighters
called by 6
packages/shaku-code-annotate-shiki/src/getHighlighters.ts
markedShakuCodeAnnotate
called by 5
packages/marked-shaku-code-annotate/src/index.ts
escapeHtml
called by 5
packages/shaku-code-annotate-shiki/src/escapeHtml.ts
escapeHtml
called by 4
packages/shaku-code-annotate-core/src/parser.ts

Shape

Function 126
Interface 3
Class 2
Method 2

Languages

TypeScript100%

Modules by API surface

packages/shaku-code-annotate-shiki-transformer/src/index.ts16 symbols
examples/web/components/bare.tsx13 symbols
packages/shaku-code-annotate-shiki/src/codeToShakuHtml.ts10 symbols
packages/shaku-code-annotate-core/src/parser.ts8 symbols
examples/web/components/ShikiTokenInspector/ShikiTokenPreview.tsx6 symbols
examples/web/components/CodeSnippetPreviewTransformer.tsx6 symbols
examples/web/app/sugar-high-token-inspector/SugarHighTokenPreview.tsx6 symbols
packages/shaku-code-annotate-shiki/src/render.ts5 symbols
packages/shaku-code-annotate-core/src/parseDataEntries.ts5 symbols
packages/marked-shaku-code-annotate/src/index.ts5 symbols
examples/web/components/Fetcher.ts4 symbols
examples/web/components/CodePreview/CodePreviewRemark.tsx4 symbols

For agents

$ claude mcp add shaku \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact