npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ethical-cli

v1.0.3

Published

Ethical CLI — Analyze academic papers for citation accuracy, methodology, and clarity from the command line

Readme

Ethical Literature Review CLI

A command-line tool for analyzing academic papers (PDF & DOCX) using the Ethical Literature Review API. Get citation annotations, methodology feedback, and quality suggestions — all from your terminal.

Quick Start

# Install globally
npm install -g @ethical/literature-review-cli

# Configure
cp .env.example .env
# Edit .env with your API URL and API key

# Analyze a paper
ethical analyze paper.pdf

# Interactive file picker
ethical analyze

Installation

npm install -g @ethical/literature-review-cli

Or use directly with npx:

npx @ethical/literature-review-cli analyze paper.pdf

Configuration

Create a .env file in your working directory:

# Required: Your Ethical API server URL
ETHICAL_API_URL=https://your-api-gateway-url.amazonaws.com/dev

# Authentication (provide one):
ETHICAL_API_KEY=elr_your_api_key_here
# OR
ETHICAL_SESSION_TOKEN=ses_your_session_token_here

You can get an API key from the Ethical web app under Settings → API Keys, or use ethical login to get a session token.

Commands

ethical analyze [file]

Analyze a PDF or DOCX paper for citation accuracy, methodology, clarity, and more.

# Analyze a specific file
ethical analyze paper.pdf

# Interactive file picker (scans current directory)
ethical analyze

# Output raw JSON
ethical analyze paper.pdf --json

# Save results to a file
ethical analyze paper.pdf --output results.json

# Also upload the paper to your account
ethical analyze paper.pdf --upload

Output includes:

  • Annotations — specific issues found with quotes and comments, categorized as: citation, accuracy, clarity, methodology, missing-citation, strength
  • Suggestions — general improvement recommendations
  • Token usage — API tokens consumed

ethical review <topic>

Run an AI-powered literature review on any research topic.

ethical review "machine learning in healthcare diagnostics"
ethical review "quantum computing error correction" --json
ethical review "CRISPR gene therapy" --output review.json

ethical login

Authenticate and get a session token.

ethical login
ethical login --email [email protected] --password mypassword

ethical whoami

Check your current authentication status.

ethical whoami

ethical papers

List your uploaded papers.

ethical papers
ethical papers --json

ethical analyses

List your past paper analyses.

ethical analyses
ethical analyses --json

ethical usage

Show your API token usage statistics.

ethical usage
ethical usage --json

JSON Output

Use the --json flag on any command to get machine-readable output. Example analysis output:

{
  "annotations": [
    {
      "quote": "studies show that 90% of patients...",
      "comment": "This claim lacks a specific citation. Consider adding a reference.",
      "type": "missing-citation"
    },
    {
      "quote": "the methodology follows standard practice",
      "comment": "The methodology section is well-structured and clearly described.",
      "type": "strength"
    }
  ],
  "suggestions": [
    "Add a limitations section discussing potential biases in the dataset.",
    "Consider including more recent references from 2024-2025."
  ],
  "paperFilename": "paper.pdf",
  "tokenUsage": {
    "inputTokens": 12500,
    "outputTokens": 800,
    "totalTokens": 13300
  }
}

Programmatic Usage

The CLI can also be imported as a library:

import { EthicalApiClient, loadConfig, extractText } from "@ethical/literature-review-cli";

const config = loadConfig();
const client = new EthicalApiClient(config);

// Extract text from a local file
const { text } = await extractText("./paper.pdf");

// Analyze
const result = await client.analyzeCitations(text);
console.log(result.annotations);

Supported File Types

| Format | Extension | Notes | |--------|-----------|-------| | PDF | .pdf | Text-based PDFs. Scanned PDFs may have limited text extraction. | | DOCX | .docx | Microsoft Word (2007+) format. |

Requirements

  • Node.js 18 or later
  • An Ethical Literature Review API account and API key

License

MIT