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

@tricrepe/flowtranslator-cli

v1.0.0

Published

A powerful AI-powered translation CLI tool

Downloads

15

Readme

FlowTranslator CLI

A powerful AI-powered translation CLI tool that helps you translate text with AI assistance step by step.

Installation

Global Installation

npm install -g @tricrepe/flowtranslator-cli

Local Installation

npm install @tricrepe/flowtranslator-cli

Using Yarn

yarn global add @tricrepe/flowtranslator-cli

Usage

After installation, you can run the CLI using:

flowtranslator

Or if installed locally:

npx flowtranslator

Configuration

The CLI requires LLM configuration to function. On first run, you'll be guided through the setup process automatically.

Interactive Setup

When you first run flowtranslator, you'll be prompted to provide:

  1. Model Name: The AI model to use (e.g., gpt-4o, claude-3-5-sonnet-20241022)
  2. Base URL: The API endpoint (e.g., https://api.openai.com/v1)
  3. API Key: Your authentication key

Configuration File

The configuration is saved to:

~/.flowtranslator/config.json

Example configuration:

{
  "modelName": "gpt-4o",
  "baseURL": "https://api.openai.com/v1",
  "apiKey": "your-api-key-here"
}

Reconfiguring

To reconfigure your settings at any time:

  • Press Ctrl+Enter while the CLI is running
  • Or manually edit the configuration file at ~/.flowtranslator/config.json

Supported LLM Providers

The CLI works with any OpenAI-compatible API endpoint, including:

  • OpenAI: https://api.openai.com/v1
  • Anthropic Claude: https://api.anthropic.com/v1
  • Google Gemini: https://generativelanguage.googleapis.com/v1beta
  • 智谱AI: https://open.bigmodel.cn/api/paas/v4/
  • Local models: http://localhost:1234/v1 (Ollama, LM Studio, etc.)

Features

  • 🤖 AI-Powered Translation: Advanced AI assistance for accurate translations
  • 📝 Interactive Interface: Beautiful terminal UI with real-time feedback
  • 🎯 Context-Aware: Understands context for better translations
  • ✏️ Editing Support: Edit translations before finalizing
  • 📋 History Tracking: Keep track of your translation history
  • 🔧 Multiple Formats: Support for various file formats

Example Prompts

  • "Translate this text to Chinese: Hello, how are you today?"
  • "Help me translate this document from English to Spanish"
  • "What's the best way to translate technical terms?"
  • "Translate and preserve the formatting of this markdown file"

Requirements

  • Node.js 18 or higher
  • LLM API key and endpoint (configured during first run)

Development

Local Development

# Clone the repository
git clone https://github.com/cestcavision/flowtranslator.git
cd flowtranslator

# Install dependencies
yarn install

# Quick development workflow (recommended)
./dev.sh

# Or run in development mode
yarn dev

# Build for production
yarn build

# Start the built CLI
yarn start

Development Scripts

For quick iteration during development:

# Quick build and install (for daily development)
./dev.sh

# Complete build and install
./build-and-install.sh

# Clean all build files and reinstall
./clean.sh && ./build-and-install.sh

# Show development options
./build-and-install.sh --help

Building

# Build all dependencies
yarn build:cli

# Package for distribution
yarn package

# Release to npm
yarn release

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Troubleshooting

Configuration Issues

  • No configuration found: Run flowtranslator and follow the setup prompts
  • Invalid API key: Reconfigure with Ctrl+Enter or edit ~/.flowtranslator/config.json
  • Wrong endpoint: Ensure the base URL matches your LLM provider's API endpoint

Installation Issues

# If flowtranslator command is not found
npm unlink -g @tricrepe/flowtranslator-cli
cd packages/cli && npm link

# If permissions error
chmod +x packages/cli/dist/index.js

# For build issues
./clean.sh --deep && ./build-and-install.sh

Common Problems

  • Raw mode error: This is normal in some terminal environments and doesn't affect functionality
  • Empty configuration: All three fields (modelName, baseURL, apiKey) must be provided
  • Network issues: Check your internet connection and API endpoint accessibility

Files Created by FlowTranslator

  • Configuration: ~/.flowtranslator/config.json - LLM settings
  • Translation Memory: ./memory.json - AI-learned translation patterns
  • Translations: Currently displayed in the CLI, with export functionality planned

Support

If you encounter any issues, please file an issue on GitHub.