academic-ref-inserter
Command-line tool that reformats, reorders, and validates citations in Microsoft Word documents across six academic styles including IEEE, APA 7th, and the Chinese GB/T 7714-2015 standard, with DOI lookup and BibTeX import/export.
Academic Reference Inserter is a Python command-line tool that fixes, reformats, and cross-references citations in Microsoft Word documents. It targets researchers and students working with academic papers who need their references formatted consistently.
The tool supports six citation styles: GB/T 7714-2015 (the Chinese national standard used by engineering and automation journals), IEEE (common in engineering and computer science), APA 7th edition (social sciences and business), Chicago 17th edition (humanities), MLA 9th edition (literature and arts), and Harvard (UK and Australia, social sciences). It can auto-detect which style is already in use in a document.
From a single command, the tool can analyze the existing references, reformat them to a target style, reorder the bibliography to match the order citations appear in the text, turn all numbered citations into clickable hyperlinks that jump to their bibliography entry in Word, and validate the result. Validation checks confirm that every in-text citation has a matching bibliography entry, that sequential numbers have no gaps, that at least 15 references are present, and that more than half are from the past five years.
Additional features include fetching a formatted reference from a DOI via the CrossRef API, and importing or exporting references from BibTeX files. The tool makes an automatic backup of the original document before modifying anything.
Installation requires Python 3.8 or later and the python-docx library, which reads and writes Word documents. The project includes a test suite and configuration files for a wide range of AI coding assistants including Cursor, Claude Code, GitHub Copilot, and Windsurf, allowing those tools to assist with development. The project is licensed under MIT.
Where it fits
- Automatically reformat all citations in a Word document from APA to IEEE style before submitting to an engineering journal.
- Convert a bibliography from BibTeX format into a Word document formatted to the Chinese GB/T 7714-2015 standard.
- Validate that every in-text citation has a matching bibliography entry, sequential numbers have no gaps, and at least half of your references are recent.
- Fetch a properly formatted citation for a DOI from CrossRef and insert it directly into your Word document's bibliography.