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.308.1627

Published

CLI for the Prompsit Translation API

Readme

Prompsit CLI

npm version license node

CLI for the Prompsit Translation API. Translate text and documents, evaluate quality, score parallel corpora, and annotate monolingual data.

Requirements

Node.js 22+

node -v   # Should print v22.x or higher

Install

npm install -g prompsit-cli

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

# Check global npm bin is on PATH
echo "$PATH" | tr ':' '\n' | grep '.npm-global/bin'
command -v prompsit

Usage

Run prompsit to enter interactive REPL with tab completion.

prompsit                                    # Enter interactive REPL
prompsit translate "Hello" -s "en" -t "es"  # Run single command

Quoting rule: All values must be quoted. Commands, subcommands, and flags stay unquoted.

Commands

Authentication

login --account "EMAIL" --secret "SECRET"

Authenticate with the Prompsit API.

  • -a, --account "EMAIL" Account email
  • -s, --secret "SECRET" API secret
$ prompsit login                               # Open contact page
$ prompsit login -a "EMAIL" -s "SECRET"        # Login with credentials

logout

Clear stored credentials (~/.prompsit/credentials.json).

status

Show auth state, plan type, and token expiry.


Configuration

config [subcommand|key] [value]

Interactive TUI settings screen, or manage config via subcommands.

Subcommands:

  • config show Show current configuration
  • config "key" Get a config value
  • config "key" "value" Set a config value
  • config api-url ["preset_or_url"] Switch API endpoint
  • config reset [--force] Reset to defaults
  • config path Show config file path
> config show
> config "api-base-url"
> config "api-base-url" "https://my-server.com"
> config api-url "test"

language [code]

Set interface language.

> language "es"
$ prompsit language "en"
$ prompsit config language

Translation

translate "text" --source "lang" --target "lang" [--qe]

Translate text. Aliases: t

  • -s, --source "lang" Source language code
  • -t, --target "lang" Target language code
  • --qe Enable quality estimation score
> "Hello world" -s "en" -t "es"
> "Hello" "Good morning" "Thank you" -s "en" -t "es"
> t "Hello" -s "en" -t "es" --qe
$ prompsit translate "Hello world" -s "en" -t "es"
$ prompsit translate "Hello" "Good morning" "Thank you" -s "en" -t "es"

translate @"file..." --source "lang" --target "lang" [--out "dir"] [--output-format "fmt"]

Translate files (XLIFF, CSV, PDF, DOCX, etc.). Use @ prefix for file mode. Alias: t

  • -s, --source "lang" Source language code
  • -t, --target "lang" Target language code
  • --out "dir" Output directory (default: beside input file)
  • --output-format "fmt" Output format (e.g. docx)
> t @"~/.prompsit/examples/translate/sample.xliff" -s "en" -t "es"
> t @"~/.prompsit/examples/translate/sample.txt" @"~/.prompsit/examples/translate/sample.csv" -s "en" -t "es"
> t @"~/.prompsit/examples/translate/sample.csv" -s "en" -t "es" --out "./translated/"
> t @"report.pdf" -s "en" -t "es" --output-format "docx"
$ prompsit translate @"~/.prompsit/examples/translate/sample.xliff" -s "en" -t "es"
$ prompsit translate @"~/.prompsit/examples/translate/sample.csv" -s "en" -t "es" --out "./translated/"
$ prompsit translate @"report.pdf" -s "en" -t "es" --output-format "docx"
$ prompsit translate @"manual.md" @"notes.md" -s "en" -t "es" --output-format "docx"

Engines

engines [--source "lang"] [--target "lang"]

List available translation engines.

  • -s, --source "lang" Filter by source language
  • -t, --target "lang" Filter by target language
> engines
> engines -s "en" -t "es"
$ prompsit engines
$ prompsit engines -s "en" -t "es"

Quality Evaluation

eval --source "src" --hypothesis "hyp" --reference "ref" [--metrics "metrics"]

Evaluate translation quality with automatic metrics (inline mode). Alias: e

  • -s, --source "src" Source text
  • -h, --hypothesis "hyp" Machine translation (hypothesis)
  • -r, --reference "ref" Reference translation
  • -m, --metrics "metrics" Comma-separated: bleu,chrf,metricx (default: bleu,chrf)

eval "file" [--metrics "metrics"]

Batch evaluation from TSV file.

eval @"file" [options]

File scoring mode. Use @ prefix.

> eval -s "Hello" -h "Hola" -r "Hola"
> eval -s "Hello" -h "Hola" -r "Hola" -m "bleu,chrf,metricx"
> eval "segments.tsv" -m "bleu,chrf"
> eval @"report.txt" -s "en" -t "es"
$ prompsit eval -s "Hello" -h "Hola" -r "Hola"
$ prompsit eval -s "Hello" -h "Hola" -r "Hola" -m "bleu,chrf,metricx"

Data Processing

score "file" [options]

Compute translation likelihood scores with Bicleaner-AI.

> score "~/.prompsit/examples/score/sample.tmx"
> score "corpus.tsv" --output-format "tsv" --out "results/"
$ prompsit score "corpus.tmx" --out "results/"

annotate "file" --lang "code" [--metadata "options"] [--out "dir"]

Annotate monolingual documents with metadata using Monotextor.

  • -l, --lang "code" Language code (e.g. en, es, zh-Hans)
  • --metadata "options" Metadata to add (comma-separated: lid, dedup, pii, adult_filter, monofixer, docscorer)
  • --out "dir" Output directory (default: beside input file)
> annotate @"data.jsonl" -l "en" --metadata "lid,docscorer"
> annotate @"data.jsonl" -l "en" --out "results/"
> annotate --metadata
$ prompsit annotate @"data.jsonl" -l "en" --metadata "lid,docscorer" --out "results/"
$ prompsit annotate --metadata

Reference

formats

List supported file formats. Alias: f

> formats
$ prompsit formats

System

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


Configuration Reference

Config file: ~/.prompsit/config.toml | Env override: PROMPSIT_<SECTION>__<KEY>

| Key | CLI Command | Default | Description | |-----|-------------|---------|-------------| | api.base_url | config api-url | https://edge.prompsit.com | API endpoint | | api.timeout | - | 30 | HTTP read timeout (sec) | | cli.language | language "code" | en | Interface language | | cli.log_level | config set log-level "val" | INFO | Log level |

Data Directory: ~/.prompsit/

| Path | Purpose | |------|---------| | config.toml | User configuration (TOML) | | credentials.json | OAuth2 tokens | | history | REPL command history | | translations/{lang}.json | Interface translation cache | | examples/translate/ | Translation examples (txt, csv, xliff) | | examples/evaluate/ | Evaluation examples (tmx) | | examples/score/ | Scoring examples (tmx) | | examples/annotate/ | Annotation examples (jsonl) |

Troubleshooting

See docs/project/runbook.md for setup issues, common errors, and fixes.

License

MIT