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

prompsit-cli

v26.428.1656

Published

CLI for the Prompsit Translation API

Downloads

1,724

Readme

Prompsit CLI

CI npm version license node

One CLI for the entire Prompsit Translation API. Translate text and documents, evaluate translation quality, score parallel corpora with Bicleaner-AI, and annotate monolingual data with Monotextor — from your terminal or an interactive REPL.

Quick Start

npm install -g prompsit-cli

prompsit login -a "EMAIL" -s "SECRET"
prompsit translate "Hello world" -s "en" -t "es"
prompsit translate @"report.docx" -s "en" -t "es"
prompsit                                            # Interactive REPL

[!TIP] Run prompsit with no arguments to enter the interactive REPL with tab completion, command history, and bundled example files in ~/.prompsit/examples/.

Update: npm install -g prompsit-cli@latest Uninstall: npm uninstall -g prompsit-cli


Features

| Feature | Description | Example | |---------|-------------|---------| | Translate text | Translate one or more segments with optional quality estimation | translate "Hello" -s "en" -t "es" --qe | | Translate files | Translate documents with SSE progress tracking | translate @"report.pdf" -s "en" -t "es" | | Evaluate | Measure translation quality (BLEU, chrF, MetricX, COMET) | eval -s "Hello" -h "Hola" -r "Hola" | | Score | Score parallel corpora with Bicleaner-AI | score @"corpus.tmx" | | Annotate | Add metadata to monolingual data (LID, PII, dedup, etc.) | annotate @"data.jsonl" -l "en" | | Engines | List available translation engines by language pair | engines -s "en" -t "es" |

Supports XLIFF, CSV, PDF, DOCX, TMX, TSV, TXT, JSONL, and more. Run prompsit translate --formats for the full list.


Commands

[!IMPORTANT] Quoting rule: all values must be quoted. Commands, subcommands, and flags stay unquoted. Run prompsit <command> --help for the full flag reference.

Authentication

prompsit login -a "EMAIL" -s "SECRET"    # Authenticate
prompsit login                           # Open contact page (no credentials)
prompsit logout                          # Clear stored credentials
prompsit status                          # Show auth state and token expiry

Translation

# Text mode
prompsit translate "Hello world" -s "en" -t "es"
prompsit translate "Hello" "Good morning" -s "en" -t "es" --qe

# File mode (@ prefix)
prompsit translate @"report.pdf" -s "en" -t "es" --output-format "docx"
prompsit translate @"file1.csv" @"file2.csv" -s "en" -t "es" --out "./translated/"

# Discovery
prompsit translate --languages -s "en"
prompsit translate --formats

Evaluation

prompsit eval -s "Hello" -h "Hola" -r "Hola"                    # Inline
prompsit eval -s "Hello" -h "Hola" -r "Hola" -m "bleu,metricx"  # Custom metrics
prompsit eval "segments.tsv" -m "bleu,chrf"                      # Batch from TSV
prompsit eval @"report.txt" -s "en" -t "es"                      # File scoring

Data Processing

prompsit score @"corpus.tmx"                                                    # Bicleaner-AI scoring
prompsit score "corpus.tsv" --output-format "tsv" --out "results/"

prompsit annotate @"data.jsonl" -l "en" --metadata "lid,docscorer"              # Monotextor annotation
prompsit annotate @"data.jsonl" -l "en" --out "results/"
prompsit annotate --metadata                                                    # List available metadata

Configuration

prompsit config                          # Open interactive TUI settings screen
prompsit config show                     # Show current configuration
prompsit config "api-base-url"           # Get a value
prompsit config "api-base-url" "URL"     # Set a value
prompsit config api-url "test"           # Switch API endpoint preset
prompsit language "es"                   # Set interface language

System

| Command | Description | |---------|-------------| | health | API health check | | usage | Show plan usage and quotas | | help | Show all commands (also: ?) | | clear | Clear screen | | exit | Quit REPL (also: quit, q) |


FAQ

Run prompsit login without arguments to open the contact page. You'll receive an account email and API secret from Prompsit.

REPL (prompsit with no args) — for interactive exploration. Tab completion, persistent command history, bundled examples in ~/.prompsit/examples/, and a settings TUI (config).

CLI (prompsit <command>) — for scripts, pipelines, and one-off commands. Same commands, same flags.

XLIFF, CSV, PDF, DOCX, TMX, TSV, TXT, JSONL, and others. Run prompsit translate --formats for the complete list. Use --output-format to convert between formats (e.g., PDF to DOCX).

Three-level precedence: environment variables (PROMPSIT_API__BASE_URL) > config file (~/.prompsit/config.toml) > defaults. Use config show to see active values. See runbook for details.

prompsit language "es"     # CLI
> language "es"            # REPL

Translations are fetched from the API on first use and cached in ~/.prompsit/translations/.

# Check global npm bin is on PATH
echo "$PATH" | tr ':' '\n' | grep '.npm-global/bin'
command -v prompsit
  1. prompsit health — verify API connectivity
  2. prompsit status — check authentication state
  3. prompsit config show — review active configuration
  4. See the runbook for common errors and fixes

Project Structure

src/
├── index.ts              # Entry point
├── program.ts            # Commander.js program definition
├── commands/             # CLI command handlers
├── api/                  # HTTP client (got) + Zod models + SSE
├── config/               # Settings (Zod + smol-toml + env vars)
├── repl/                 # Interactive REPL (pi-tui)
├── tui/                  # TUI settings screen
├── output/               # Terminal formatting (chalk + cli-table3)
├── i18n/                 # Internationalization
├── errors/               # Error contracts
├── cli/                  # Global options, exit codes
├── runtime/              # Platform abstractions
└── logging/              # Telemetry transport

[!TIP] For AI agents: entry point is src/index.ts -> src/program.ts. Commands in src/commands/, REPL in src/repl/, config in src/config/. TypeScript strict, ESM-only, layered architecture (Presentation -> Application -> Domain -> Infrastructure). Full docs: architecture.md, CLAUDE.md.


Links

| | | |---|---| | Documentation | docs/README.md | | Architecture | docs/project/architecture.md | | Runbook | docs/project/runbook.md | | Contributing | CONTRIBUTING.md | | Issues | GitHub Issues | | npm | prompsit-cli |

License

Apache-2.0 — Prompsit Language Engineering, S.L.