PHPackages                             nexus/refmanager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nexus/refmanager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nexus/refmanager
================

Reference manager with Zotero, EndNote, and Mendeley import/export for Laravel

10PHPCI passing

Since May 31Pushed 1w agoCompare

[ Source](https://github.com/nexus-scholar/refmanager)[ Packagist](https://packagist.org/packages/nexus/refmanager)[ RSS](/packages/nexus-refmanager/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Nexus RefManager
================

[](#nexus-refmanager)

[![Tests](https://github.com/nexus-scholar/refmanager/workflows/Tests/badge.svg)](https://github.com/nexus-scholar/refmanager/actions)[![PHP Version](https://camo.githubusercontent.com/ec66e96fddced836cb9111445266035c61cc74ddd03bcc643c9a353bd290f411/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e657875732f7265666d616e616765722e737667)](https://packagist.org/packages/nexus/refmanager)[![License](https://camo.githubusercontent.com/e859a8dbf164d3f9b86309d629ab7799629fc76d8877f9186953c6947e1bc9cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c6963656e73652f6e657875732f7265666d616e616765722e737667)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/75388b1cd9f75f21a02f7fcfc5b43311aa304ecd4de9fd3146c830e928ad585a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e657875732f7265666d616e616765722e737667)](https://packagist.org/packages/nexus/refmanager)

Nexus RefManager is a Laravel package for importing, normalizing, deduplicating, organizing, and exporting bibliographic references. It supports RIS, BibTeX, CSL-JSON, and EndNote XML, with command-line and service APIs designed for systematic-review and research-workflow applications.

Role In Nexus Scholar
---------------------

[](#role-in-nexus-scholar)

`refmanager` is a focused package in the Nexus Scholar ecosystem. It handles reference-library boundaries around import/export and citation metadata, while `nexus-scholar/core` owns review workflow behavior such as search, corpus locking, screening, full-text retrieval, citation graphs, and export auditing.

Use this package when a Laravel app needs dependable bibliographic file handling without pulling in the full Nexus Scholar workflow engine.

Features
--------

[](#features)

- Multi-format import and export for RIS, BibTeX, CSL-JSON, and EndNote XML.
- DOI-first and title/year fallback deduplication.
- Collection management with notes and tagging.
- Event hooks for logging and post-processing.
- Streaming exports for large collections.
- Artisan commands for import, export, dry runs, and format discovery.
- Optional project-scoped deduplication through a configurable callback.

Status
------

[](#status)

ComponentStatusRIS parser/exporterStableBibTeX parser/exporterStableCSL-JSON parser/exporterStableEndNote XML parser/exporterStableDeduplicationStableEvents and loggingStableStreaming exportsStableFacade helpersExperimentalRequirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11, 12, or 13
- SQLite for the default test setup

Installation
------------

[](#installation)

```
composer require nexus/refmanager
php artisan vendor:publish --tag=refmanager-config
php artisan migrate
```

Add the export trait to the model that represents a bibliographic document in your application:

```
use Nexus\RefManager\Concerns\HasBibliographicExport;

class Document extends Model
{
    use HasBibliographicExport;
}
```

Quick Start
-----------

[](#quick-start)

Import references from a file:

```
use Nexus\RefManager\ReferenceImporter;

$result = app(ReferenceImporter::class)
    ->withOptions(['deduplicate' => true, 'save' => true])
    ->fromFile('library.ris');
```

Import from a raw string with an explicit format:

```
$result = app(ReferenceImporter::class)
    ->fromString($risContent, 'ris');
```

Export references as a string or streaming download:

```
use Nexus\RefManager\ReferenceExporter;

$ris = app(ReferenceExporter::class)->toString($documents, 'ris');

return app(ReferenceExporter::class)
    ->toResponse($documents, 'bibtex', 'library.bib');
```

Artisan Commands
----------------

[](#artisan-commands)

```
php artisan refmanager:import library.ris --project=1
php artisan refmanager:import library.ris --dry-run
php artisan refmanager:export --project=1 --format=ris --output=library.ris
php artisan refmanager:formats
```

Supported Formats
-----------------

[](#supported-formats)

FormatExtensionImportExportRIS`.ris`YesYesBibTeX`.bib`YesYesCSL-JSON`.json`YesYesEndNote XML`.xml`YesYesImport Options
--------------

[](#import-options)

```
$result = $importer->withOptions([
    'deduplicate' => true,
    'save' => false,
    'project_id' => 7,
    'collection_id' => 42,
])->fromFile('/path/to/library.bib');
```

The import result exposes parsed documents, imported records, duplicates, failed records, and the import log:

```
$result->documents;
$result->imported;
$result->duplicates;
$result->failed;
$result->log;
$result->total();
$result->count();
$result->wasSuccessful();
```

Project-Scoped Deduplication
----------------------------

[](#project-scoped-deduplication)

By default, `project_id` is passed through the importer and API, but no project filter is applied unless you configure one. This keeps the package schema-agnostic for apps that do not store project ownership on the document table.

After publishing config, set `refmanager.deduplication.project_scope` to a callable:

```
'deduplication' => [
    'project_scope' => static function ($query, int $projectId): void {
        $query->where('project_id', $projectId);
    },
],
```

The callback receives the Eloquent query builder and incoming `project_id`; it is applied to DOI, PubMed, and title/year deduplication tiers. If `project_scope` is `null`, deduplication remains global.

Experimental Facade Helpers
---------------------------

[](#experimental-facade-helpers)

```
use Nexus\RefManager\Support\ExporterBuilder;

$ris = ExporterBuilder::documents($documents)->asRis();
$bibtex = ExporterBuilder::project(7)->asBibtex();
$json = ExporterBuilder::collection($collection)->asCslJson();

return ExporterBuilder::documents($documents)->download('ris', 'library.ris');
```

Testing
-------

[](#testing)

```
composer install
composer test
./vendor/bin/phpunit --testdox
./vendor/bin/phpunit tests/Unit/Formats/RisFormatTest.php
./vendor/bin/phpunit --filter=testItParsesASingleRisRecord
```

License
-------

[](#license)

Nexus RefManager is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance64

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d86d4859cd0f7e935dc056ca1155f5842ac8c590ebe8481d3051feb339885d7?d=identicon)[nexus-scholar](/maintainers/nexus-scholar)

---

Top Contributors

[![nexus-scholar](https://avatars.githubusercontent.com/u/233639653?v=4)](https://github.com/nexus-scholar "nexus-scholar (24 commits)")

### Embed Badge

![Health badge](/badges/nexus-refmanager/health.svg)

```
[![Health](https://phpackages.com/badges/nexus-refmanager/health.svg)](https://phpackages.com/packages/nexus-refmanager)
```

###  Alternatives

[boxblinkracer/shopware-ai-demodata

AI Demo Data

291.5k](/packages/boxblinkracer-shopware-ai-demodata)[websemantics/pyrocms-theme

PyroCMS Plus Admin Theme

151.3k7](/packages/websemantics-pyrocms-theme)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
