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

@hasna/tai

v0.1.7

Published

Terminal AI that keeps the terminal normal while turning natural-language requests into safe shell actions.

Downloads

1,123

Readme

tai

tai is Terminal AI for people who want their terminal to keep behaving like a terminal. It turns natural-language requests into concise shell command proposals, classifies risk, asks before sensitive actions, streams command output, and reports exit status.

It does not expose hidden reasoning or chain-of-thought. Provider outputs are parsed as command proposals, and any model-generated thinking blocks are stripped before user-facing display.

Install

bun add -g @hasna/tai

From a source checkout:

bun install
bun run build

Surfaces

  • npm package: @hasna/tai
  • CLI binary: tai
  • MCP binary: tai-mcp
  • SDK export: createTai, classifyCommand, redactSensitiveText, parseCommandProposal, planAgenticCommands

CLI

tai propose "show the largest files in this repo"
tai plan "inspect the repo status, run the relevant checks, and show me the safe next commands"
tai classify "rm -rf dist"
tai run "ls -la" --yes

tai run streams stdout/stderr directly and exits with the child command status. It preserves the current working directory and environment by default, and forwards common process signals to the child.

Provider Routing

Defaults are local-first and configurable:

  1. OpenAI-compatible local endpoint, default http://localhost:11434/v1 with TAI_LOCAL_MODEL.
  2. Groq fallback when GROQ_API_KEY and TAI_GROQ_MODEL are set.
  3. Cerebras fallback when CEREBRAS_API_KEY and TAI_CEREBRAS_MODEL are set.

Model availability changes over time. Verified on 2026-06-26:

  • Ollama documents OpenAI-compatible endpoints at https://docs.ollama.com/api/openai-compatibility.
  • Groq publishes the current hosted model catalog at https://console.groq.com/docs/models.
  • Cerebras publishes the current hosted model catalog at https://inference-docs.cerebras.ai/models/overview.
  • Candidate local/open model examples worth evaluating, if available in your runtime, include OpenThinker/OpenThoughts agent models, North Mini Code GGUF, and Devstral Small. Do not assume these IDs are installed locally; set TAI_LOCAL_MODEL.

Example:

export TAI_LOCAL_BASE_URL=http://localhost:11434/v1
export TAI_LOCAL_MODEL=devstral
export TAI_GROQ_MODEL=openai/gpt-oss-120b
export TAI_CEREBRAS_MODEL=qwen-3-coder-480b

Agentic Planning

tai plan uses AI SDK Core for native tool calling and multi-step loops. Verified against the current AI SDK docs on 2026-06-26:

  • generateText supports tool calling for agentic automation.
  • tool defines executable tools with typed input schemas.
  • stopWhen: stepCountIs(n) lets the model call tools over multiple steps.
  • @ai-sdk/openai-compatible, @ai-sdk/groq, and @ai-sdk/cerebras provide the local/open-provider routing surface.

The planner gives the model constrained tools to inspect safe terminal context, classify candidate commands, run strictly read-only inspection commands with timeout and redaction, and submit a final multi-command plan. The model never gets a write-capable shell tool. Every final command is reclassified locally before it is shown to the user or returned through MCP.

The read-only inspection tool does not invoke a shell. It uses a small execFile allowlist with a scrubbed environment, so shell substitution and interpreter side effects are refused before execution.

Safety Policy

  • Allow: clearly read-only commands such as ls, cat, git status, pwd, find, and simple inspections.
  • Confirm: writes, network calls, long-running processes, package managers, process control, and system changes.
  • Block unless explicitly overridden: destructive filesystem actions, credential exfiltration, privilege escalation, deploy/publish operations, and force pushes.

See docs/architecture.md for the PTY/shell boundary design.

MCP

Run the stdio MCP server:

tai-mcp

Initial tools:

  • tai.propose_command
  • tai.plan_commands
  • tai.classify_command
  • tai.redact

Development

bun install
bun run build
bun run typecheck
bun test

GitHub Status

Canonical public repository: https://github.com/hasna/apps. @hasna/tai is published to npm; releases are cut by maintainers.