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

@sathirar/duta

v0.7.0

Published

A retro-themed TUI/CLI email tool for humans and AI agents.

Downloads

838

Readme

duta

A retro-themed TUI/CLI email tool for humans and AI agents.

duta (Sanskrit for "messenger") is a Claude Code–style terminal app for sending email. It runs in two modes from the same binary:

  • Interactive TUI — launch duta with no args to compose, browse drafts, and view send history in a retro-themed terminal UI.
  • Non-interactive CLI — run duta send --to ... --subject ... --body ... --json (and similar commands) for scripts and AI agents.

Status

v0.4.0 — Beta. Interfaces may shift before v1.0; breaking changes will land behind major-version bumps per semver. See CHANGELOG.md for what's shipped and docs/roadmap.md for what's next.

Quickstart

Requires Node 20 LTS or newer.

npm install -g @sathirar/duta   # global install (recommended)
duta                            # launch TUI

Or run on demand without installing:

npx @sathirar/duta

On first launch the TUI opens the onboarding wizard. Pick a transport (SMTP, Resend, or Gmail), fill in the required fields, and press ^S to save — duta writes them to ~/.duta/.env. After that you land on the main menu: Compose, Drafts, History, Help, Settings.

Keys: ↑↓ move, Enter open, Tab next field, ^S save (onboarding), ^O save draft / ^X send (compose), Esc back, q quit. The Help screen has a full keybindings reference.

Want to hack on it instead? See Dev setup below.

For agents / scripts

Every command accepts --json and returns structured output. Exit codes (see below) are stable, so scripts can branch on them. See docs/agents.md for a deeper integration guide.

# One-shot send
duta send \
  --to [email protected] \
  --subject "Hello" \
  --body "Sent from an agent" \
  --json

# Send with attachments (-a is repeatable)
duta send --to [email protected] -s "Report" -b "see attached" \
  -a ./report.pdf -a ./notes.txt --json

# Inspect recent history
duta history list --json

# Persist a config value (same file the TUI edits)
duta config set SMTP_HOST smtp.gmail.com

Config values resolve from (in order): process env → <cwd>/.env<dataDir>/.env (default ~/.duta/.env). The TUI Settings screen and duta config set both write to <dataDir>/.env.

Features

  • Pluggable transports: SMTP, Resend, and Gmail API (OAuth refresh-token).
  • Plain-text email with To / CC / BCC, single configured profile.
  • File attachments via duta send --attach <path> (repeatable). Send-only — drafts/history don't yet persist them.
  • Local drafts and send history (SQLite at ~/.duta/duta.db).
  • Lightweight update check on TUI launch — pings npm once a day, shows ↑ vX.Y.Z available under the logo when a newer release exists. Disabled in CLI/agent mode; kill entirely with DUTA_NO_UPDATE_CHECK=1.
  • Config via environment variables / .env, editable in the TUI Settings screen.
  • Retro TUI in Ink + React; first-run onboarding wizard for new users.
  • Dual-mode binary: TUI for humans, JSON output and stable exit codes for agents.

CLI exit codes

| Code | Meaning | | ---- | ------------------------------------------------------- | | 0 | Success | | 1 | Generic error (unexpected) | | 2 | Usage error (bad args / missing required opts) | | 3 | Config error (missing / invalid env, unknown transport) | | 4 | Validation error (message failed schema) | | 5 | Transport error (SMTP / Resend send failed) | | 6 | Storage error (db open / migration failed) | | 7 | Not found (draft / history / config key) |

Dev setup

git clone https://github.com/sathirabr/duta.git
cd duta
npm install
npm run typecheck
npm run lint
npm test
npm run build

Project structure

src/
  cli/        # CLI entry (non-interactive mode + TUI launcher)
  tui/        # Ink + React components
  core/
    transport/  # Transport interface + SMTP/Resend implementations
    storage/    # SQLite drafts + history
tests/        # Vitest
docs/         # Scope, architecture notes
.github/      # Issue/PR templates + CI

Contributing

See CONTRIBUTING.md. This project uses Conventional Commits and automated releases via semantic-release.

License

MIT © sathirabr