# Personal Experience: Managing JabRef via JabKit + Claude Code

**URL:** <https://discourse.jabref.org/t/personal-experience-managing-jabref-via-jabkit-claude-code/9089>\
**Category:** Features\
**Created:** [May 3, 2026, 3:36am UTC](https://discourse.jabref.org/t/personal-experience-managing-jabref-via-jabkit-claude-code/9089 "2026-05-03T03:36:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![hasibagen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/hasibagen/32/2565_2.png) [@hasibagen](https://discourse.jabref.org/u/hasibagen)\
**Post date:** [May 3, 2026, 3:36am UTC](https://discourse.jabref.org/t/personal-experience-managing-jabref-via-jabkit-claude-code/9089/1 "2026-05-03T03:36:09Z")

</div>

JabKit + Claude Code

* * *

Please vote if you support this proposal:

_Poll ([view on site](https://discourse.jabref.org/t/personal-experience-managing-jabref-via-jabkit-claude-code/9089/1))_

> **TL;DR** — I wrapped JabKit (JabRef’s CLI toolkit) as a Claude Code skill and now manage my entire `.bib` library through natural language. This post documents what worked, what didn’t, and how to reproduce the setup.

* * *

## Background

I’m a cognitive neuroscience researcher (RSA / fNIRS / EEG), using JabRef to manage a growing bibliography.

My typical pain points:

- Importing PDFs from scattered Zotero-style directories

- Cleaning metadata and deduplication

- Searching and maintaining `.bib` files

- Repetitive manual workflows

After discovering **JabKit** , I decided to experiment with a different approach:

👉 Wrap it as a Claude Code skill (`/jabkit`)  
👉 Drive the entire bibliography workflow via natural language

* * *

## A Quick Disclaimer

I’m **not a professional developer** —this setup is a personal experiment built out of curiosity.

- I’m very interested in seeing **official improvements to JabKit and JabRef workflows**

- I’d love to see **more people explore this direction together**

- Tools like **OpenCode / OpenClaw** seem to follow a similar philosophy, so there’s clearly a broader pattern here

This is just one possible implementation, not a “best practice”.

👉 I’m especially looking forward to **more capabilities being added to JabKit in the future**

* * *

## System Environment

```auto
OS: Ubuntu 24.04.4 LTS
Java: OpenJDK 21 (apt)
JabRef GUI: 5.15
JabKit: 6.0-alpha.341
Node.js: installed (for npx testing)
Shell: bash

```

* * *

## Installation: What Worked vs What Didn’t

### ✅ Step 1: Install JBang

```auto
curl -Ls https://sh.jbang.dev | bash -s - app setup

```

Key points:

- Installs **Temurin JDK 17 automatically**

- JDKs are cached in:

After setup, I had:

- System JDK 21

- JBang JDK 17

- JabKit-required JDK 25

They coexist without issues.

* * *

### ⚠ Step 1.5: PATH Configuration (Important)

Add to `~/.bashrc`:

```auto
export PATH="$HOME/.jbang/bin:$HOME/.jbang/currentjdk/bin:$PATH"
export JAVA_HOME=$HOME/.jbang/currentjdk
alias j!=jbang

```

Otherwise:

👉 Claude Code’s non-interactive shell won’t find `jbang`

* * *

### ✅ Step 2: Install JabKit (Reliable Method)

```auto
jbang app install --java 25 jabkit@jabref

```

What happens:

- Downloads **JDK 25** (required by JabKit)

- Installs CLI at:

Wrapper:

```auto
exec jbang run --java 25 jabkit@jabref "$@"

```

* * *

### ❌ Step 3: What Didn’t Work — `npx`

I tried:

```auto
npx @jbangdev/jbang jabkit@jabref

```

Result: **failed**

Likely reasons:

- Java version requirement not properly forwarded

- JDK resolution conflict

👉 Conclusion:  
**Use JBang directly, not npx**

* * *

### 🔄 Step 4: Updating JabKit

Since it’s a SNAPSHOT build:

```auto
jbang --fresh jabkit@jabref --help

```

Or:

```auto
jbang app install --fresh --force jabkit@jabref

```

* * *

## Claude Code Skill Setup

Location:

```auto
~/.claude/skills/jabkit/SKILL.md

```

* * *

### Skill Metadata

```auto
Environment:
- JBang: ~/.jbang/bin/jbang
- JabKit: ~/.jbang/bin/jabkit
- PATH must include ~/.jbang/bin

```

* * *

### Commands Covered

| Category | Commands |
| --- | --- |
| Literature collection | doi-to-bibtex, convert, fetch |
| Library management | search, citationkeys generate |
| PDF management | pdf update |
| Quality checks | check-integrity, check-consistency |
| Citation network | get-citing-works, get-cited-works |
| Preferences | preferences |

* * *

## Core Workflows

### 1. Add via DOI

```auto
jabkit doi-to-bibtex <DOI> >> library.bib

```

* * *

### 2. Add via PDF

```auto
jabkit convert \
  --input=<pdf> \
  --input-format=pdfMerged \
  --output=/tmp/entry.bib \
  --output-format=bibtex

```

* * *

### 3. Batch Import Example

```auto
import subprocess

for pdf in find_pdfs(pdf_dir):
    subprocess.run([
        "jabkit", "convert",
        "--input", pdf,
        "--input-format", "pdfMerged",
        "--output", out_file,
        "--output-format", "bibtex"
    ])

```

Results:

- ✅ 5 papers added

- ⚠ 3 skipped (duplicate DOI)

- ❌ 0 failures

* * *

### 4. Quality Checks

```auto
jabkit check-integrity
jabkit check-consistency

```

* * *

### 5. Citation Tracing

```auto
jabkit get-citing-works
jabkit get-cited-works

```

* * *

## What Changed (Before vs After)

### Before

- Manual DOI lookup → copy → paste

- Painful batch workflows

- No structured quality checks

- Limited citation tracing

* * *

### After

I can just say:

- “Add this PDF to my library”

- “Find all papers by Zhai”

- “Check my library quality”

- “What cites this paper?”

👉 Everything runs through natural language + the skill

* * *

## Insights from JabRef Source Code

While building this, I checked `jabref-main`:

- All 12 commands live in:

- External changes are detected via `DatabaseChangeMonitor`

- There is currently **no option to auto-accept external changes**

* * *

## Known Issues

### ⚠ External Change Notifications

When JabKit modifies `.bib` while JabRef is open:

> “The library has been modified by another program”

Current state:

- ❌ Cannot disable

- ❌ No auto-accept option

**Workaround:**

👉 Close the library before running batch operations

* * *

### ⚠ File Path Handling

After importing:

- `file` fields contain absolute paths

- “Copy linked files”:

👉 I’ve opened a separate Discourse issue for this

* * *

## Practical Tips

1. Use **JBang, not npx**

2. Always specify **`--java 25`**

3. Ensure PATH is set in `.bashrc`

4. Use `--fresh` regularly

5. Close JabRef GUI before batch operations

* * *

## References

- JabKit Documentation

- JBang Documentation

- JabRef GitHub

- JabKit Source Code

* * *

## Final Thoughts

This workflow significantly reduces friction in managing a `.bib` library, especially for batch operations and metadata handling.

That said, this is still an **early-stage, experimental setup**.

- There’s clear potential for tighter integration

- Many rough edges remain (especially around GUI sync and file handling)

- A more official workflow could make this much more accessible

If others are experimenting with similar setups (Claude Code, OpenCode, OpenClaw, etc.), I’d be very interested to hear how you approached it.

---

_[View the full topic](https://discourse.jabref.org/t/personal-experience-managing-jabref-via-jabkit-claude-code/9089)._
