Copy these files to set up forj for your LLM coding environment.
# Clone forj
git clone https://github.com/ATeal/forj.git
cd forj
# Interactive install - detects your platform
bb installThe installer shows a menu to choose Claude Code, OpenCode, or both.
export FORJ_PATH=$(pwd)
# Install MCP server config
mkdir -p ~/.claude
cat examples/mcp.json | sed "s|FORJ_PATH|$FORJ_PATH|g" > ~/.claude/mcp.json
# Install hooks config
cat examples/claude-settings.json | sed "s|FORJ_PATH|$FORJ_PATH|g" > ~/.claude/settings.json
# Install skill
mkdir -p ~/.claude/skills/clj-repl
cp packages/forj-skill/SKILL.md ~/.claude/skills/clj-repl/export FORJ_PATH=$(pwd)
# Install MCP + plugin config
mkdir -p ~/.config/opencode
cat examples/opencode.json | sed "s|FORJ_PATH|$FORJ_PATH|g" > ~/.config/opencode/opencode.json
# Install plugin (symlink so it can auto-detect forj root)
# OpenCode scans ~/.opencode/plugins/*.{ts,js} for local plugins
mkdir -p ~/.opencode/plugins
ln -sf "$FORJ_PATH/packages/forj-opencode/plugin.js" ~/.opencode/plugins/forj.js
# Install skills (prefer OpenCode-specific variants)
for skill in clj-repl clj-init lisa-loop; do
mkdir -p ~/.config/opencode/skills/$skill
if [ -f "packages/forj-skill/$skill/SKILL.opencode.md" ]; then
cp "packages/forj-skill/$skill/SKILL.opencode.md" ~/.config/opencode/skills/$skill/SKILL.md
elif [ -f "packages/forj-skill/$skill/SKILL.md" ]; then
cp "packages/forj-skill/$skill/SKILL.md" ~/.config/opencode/skills/$skill/
else
cp packages/forj-skill/SKILL.md ~/.config/opencode/skills/$skill/
fi
doneNote: The plugin is symlinked (not copied) so it can auto-detect the forj root via realpathSync. OpenCode auto-discovers *.{ts,js} files directly in the plugins/ directory. If you can't use symlinks, set the FORJ_HOME environment variable instead.
MCP server configuration. Copy to:
~/.claude/mcp.json(global)<project>/.mcp.json(project-specific)
Replace FORJ_PATH with the absolute path to your forj clone.
Hooks configuration. Copy to:
~/.claude/settings.json(global)<project>/.claude/settings.json(project-specific)
Replace FORJ_PATH with the absolute path to your forj clone.
Combined MCP server and plugin configuration. Copy to:
~/.config/opencode/opencode.json
Replace FORJ_PATH with the absolute path to your forj clone.
This configures:
- MCP server - REPL connectivity, code evaluation, namespace reloading
- Plugin - Session context injection, REPL-first guidance, parenthesis repair
Copy skill files to the appropriate location:
- Claude Code:
~/.claude/skills/<name>/SKILL.md - OpenCode:
~/.config/opencode/skills/<name>/SKILL.md
Available skills: /clj-repl, /clj-init, /lisa-loop
Install these before using forj:
-
Babashka - https://babashka.org/
# Linux curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install chmod +x install && ./install # macOS brew install borkdude/brew/babashka
-
clj-nrepl-eval - REPL communication CLI
# Install from source or your package manager # Must be on PATH
- Start your editor in a Clojure project
- Check MCP: forj server should appear in your tool list
- Start REPL:
bb nrepl-server localhost:1667 & - Test: Use
repl_evaltool with(+ 1 2)
MCP not loading:
- Check paths are absolute in config
- Verify babashka is installed:
bb --version - Check logs:
~/.forj/logs/
Hooks not running (Claude Code):
- Check paths are absolute in settings.json
- Verify project has
deps.edn,bb.edn, orshadow-cljs.edn
Plugin not loading (OpenCode):
- Plugin must be at
~/.opencode/plugins/forj.js(NOT~/.config/opencode/plugins/) - OpenCode only scans
~/.opencode/and.opencode/for local plugin files - File must be
.jsor.ts(not.mjs) — OpenCode glob matches*.{ts,js} - If symlinks aren't possible, set
FORJ_HOMEenv var to your forj clone path
REPL not connecting:
- Start REPL:
bb nrepl-server localhost:1667 - Discover REPLs:
clj-nrepl-eval --discover-ports