MCPcopy Index your code
hub / github.com/anonimitoraf/skerrick

github.com/anonimitoraf/skerrick @main

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

Skerrick

noun: skerrick
the smallest bit.
"there's not a skerrick of food in the house"

REPL-driven development for NodeJS * Programming in tiny increments - Apply patches to your running program without having to restart it * Tell me more!

Inspired by (check them out!): * SLIME: The Superior Lisp Interaction Mode for Emacs * CIDER: The Clojure(Script) Interactive Development Environment that Rocks! * Calva: integrated REPL powered environment for enjoyable and productive Clojure and ClojureScript development in Visual Studio Code

:warning: DISCLAIMERS :warning:

  • THIS PROJECT IS IN ALPHA STATE! I WOULD APPRECIATE IT IF YOU REPORT ANY BUGS/ISSUES YOU FIND. MAYBE EVEN CONTRIBUTE PATCHES/FIXES IF YOU HAVE THE TIME ;)
  • The code is currently very messy and not well-written. I just wanted to get a working prototype out of the door as quickly as I could. I will be improving the implementation over time. Feel free to give me suggestions if you have any!

VSCode

:sparkles: Documentation :sparkles:

Emacs

MELPA

Demos

Basic

Basic usage

Module support

Module support

Requirements

  • node/npm installed and accessible by Emacs

Installation

skerrick is in MELPA

Or, if you're using Quelpa:

(quelpa '(skerrick :repo "anonimitoraf/skerrick" :fetcher github))

;; Needs to be run on the very first install of skerrick. Or when you want to upgrade.
(unless (equal (shell-command-to-string "type skerrick") "skerrick not found\n")
  (skerrick-install-or-upgrade-server-binary))

;; Should be run in a JS buffer; it is buffer specific.
;; (skerrick-start-server)

;; Now main function, entry point is:
;; M-x skerrick-eval-region

It may also be helpful to provide a quick keyboard shortcut. E.g., C-x C-e evaluates ELisp, so let's mimic that for JS buffers:

;; Evaluate a region, if any is selected; otherwise evaluate the current line.
(bind-key
 "C-x C-e"  (lambda ()
              (interactive)
              (if (use-region-p)
                  (skerrick-eval-region)
                (beginning-of-line)
                (set-mark-command nil)
                (end-of-line)
                (skerrick-eval-region)
                (pop-mark)))
 'js-mode-map)

Configuration

Configuration Desc Default
skerrick-server-port Port to run the skerrick server on 4321
skerrick-result-overlay-face Face used to display evaluation results
skerrick-result-overlay-char-count-trunc Results with char count longer than this are truncated 120
skerrick-pop-result-buffer-for-stdout Show result buffer if stdout is non-empty t
skerrick-pop-result-buffer-for-stderr Show result buffer if stderr is non-empty t

Usage

Command Desc
skerrick-install-or-upgrade-server-binary Needs to be run on the very first install of skerrick. Or when you want to upgrade.
skerrick-start-server Starts the server. Note that your current buffer will be evaluated, so you probably want to run this command while being on your program's entry point file.
skerrick-stop-server Stops the server.
skerrick-eval-region Evaluates the selected region. Shows the eval result as an overlay. Stdout/stderr get written to the buffer *skerrick-stdout-stderr*.

Write a plug-in for your editor/IDE!

NPM

  • npm install -g skerrick - this installs the bin skerrick

Invoked like so: skerrick PORT ENTRYPOINT_FULL_FILE_PATH

  • The REST protocol is as simple as it can be:
  • POST to /eval payloads of shape: json { "modulePath": "/full/path/to/file/of/code/to/eval", "code": "const x = 42; console.log(x); x + x;" }
  • Response shape: json { "result": "84", "stdout": "42", "stderr": "" }

  • :rocket: Tell me about your plug-in so I can add it to this README! :rocket:

Extension points exported contracts — how you extend this code

EvalResult (Interface)
(no doc)
vscode/src/extension.ts
CompilationResult (Interface)
(no doc)
server/src/compile-typescript.ts
Export (Interface)
(no doc)
server/src/engine.ts
Import (Interface)
(no doc)
server/src/engine.ts
NamespaceImport (Interface)
(no doc)
server/src/engine.ts

Core symbols most depended-on inside this repo

registerValue
called by 22
server/src/engine.ts
registerValueExport
called by 18
server/src/engine.ts
f
called by 7
server/test/evaluate/exports-and-imports/input-1.js
evaluate
called by 6
server/src/engine.ts
extractFileName
called by 5
server/src/engine.ts
normalizeImportPath
called by 4
server/src/engine.ts
stopServer
called by 3
vscode/src/extension.ts
bar
called by 3
server/test/evaluate/default-exports-and-imports/input-3.js

Shape

Function 45
Class 12
Method 6
Interface 5

Languages

TypeScript100%

Modules by API surface

server/src/engine.ts26 symbols
vscode/src/extension.ts9 symbols
server/test/evaluate/exports-and-imports/input-1.js3 symbols
server/test/evaluate/default-exports-and-imports/output-5.js3 symbols
server/test/evaluate/default-exports-and-imports/input-5.js3 symbols
server/test/evaluate/default-exports-and-imports/input-4.js3 symbols
server/test/evaluate/default-exports-and-imports/input-3.js3 symbols
server/test/evaluate/commonjs/output-5.js3 symbols
server/test/evaluate/commonjs/input-5.js3 symbols
server/src/index.ts2 symbols
server/src/compile-typescript.ts2 symbols
vscode/src/test/suite/index.ts1 symbols

For agents

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

⬇ download graph artifact