
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
极简主义的 AI 终端翻译工具。
支持本地大模型 (Ollama, LM Studio) 与主流在线 API。
中文 | English
ollama list)。t <text> 即可快速翻译,或进入交互模式连续使用。npm install -g xtrans
或者使用 npx 直接运行:
npx xtrans <text>
使用别名 t (或 xtrans) 进行即时翻译。
t hello
# ┌───────────────────────────────────────────────────┐
# │ hello /həˈləʊ/ int. n. │
# │ │
# │ int. │
# │ • 你好 (用于问候、接电话或引起注意) │
# │ - Hello, Paul. I haven't seen you for ages. │
# │ │
# │ n. │
# │ • (Hello) 人名;(法)埃洛 │
# │ │
# │ Synonyms: hi, greetings │
# └───────────────────────────────────────────────────┘
不带参数运行即可进入交互式 shell。支持上下键 (↑/↓) 切换历史记录。
xtrans
# Welcome to xtrans v1.0.0
# Provider: ollama | Model: llama3 | Target: zh
# ›
你可以在交互模式内 (输入 /) 或直接从终端运行这些命令。
| 命令 | 说明 | 示例 |
|---|---|---|
/use | 切换服务商或模型 (交互式) | t /use |
/target | 设置目标语言 | t /target ja |
/status | 检查服务状态及当前模型 | t /status |
/add | 添加自定义 OpenAI 兼容服务商 | t /add |
/remove | 移除服务商 | t /remove |
/clean | 清理历史记录/缓存 | t /clean |
xtrans 为主流服务预设了配置模板:
http://localhost:11434。支持自动检测已安装模型。http://localhost:1234/v1。首次运行时,xtrans 会引导你设置首选服务商。你可以随时使用 t /use 进行切换。
如需添加自定义服务商(例如本地服务器或其他 API):
t /add
MIT
FAQs
Minimalist AI-powered terminal translator / 极简 AI 终端翻译工具
The npm package xtrans receives a total of 11 weekly downloads. As such, xtrans popularity was classified as not popular.
We found that xtrans demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.