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

@moxxy/cli

v0.51.0

Published

moxxy command-line agent: TUI, one-shot prompts, setup, services, and API-key or installed-CLI subscription providers.

Downloads

3,413

Readme


What this package is

@moxxy/cli is the published moxxy binary. It bundles the framework runtime, every built-in mode, every built-in provider, every built-in plugin, the Ink TUI channel, MCP support, the scheduler, webhooks, and the OS service installer into a single executable.

Install this if you want to use moxxy. If you want to author plugins, depend on @moxxy/sdk instead.

What you get out of the box

  • A complete agent stack with Anthropic, OpenAI, and ChatGPT (OAuth) providers.
  • Three loop modes: default (Claude-Code-style ReAct loop), goal (autonomous auto-approve loop), and research (parallel-subagent fan-out + synthesis).
  • Built-in tools: Read, Edit, Write, Bash, Grep, Glob, WebFetch, computer-control (macOS), and browser-session (Playwright, optional).
  • Multi-channel by design: TUI, Telegram, HTTP, web, cron, and webhooks. One session can drive several surfaces at once.
  • Voice input on any audio-capable channel through @moxxy/plugin-stt-whisper.
  • An encrypted vault (AES-256-GCM at rest) so secrets in config are referenced as ${vault:KEY} and never written in plaintext.
  • A long-term memory subsystem with a journal and vector recall. TF-IDF ships built-in. Swap to OpenAI embeddings via @moxxy/plugin-embeddings-openai.
  • A permission resolver that gates every tool call and learns allow-always rules per tool.
  • Opt-in capability isolation. Tools declare what they need and an isolator enforces it. inproc ships built-in. worker, subprocess, wasm, and Docker isolators drop in behind the same interface.
  • A scheduler for cron expressions and one-shot ISO timestamps.
  • A webhook listener with HMAC verification, header and JSON-path filters, and a cloudflared or ngrok tunnel helper.
  • An OS service installer for launchd (macOS) and systemd (Linux), or a single serve --background process that runs every channel together.

Installation

npm install -g @moxxy/cli

Or run it without installing:

npx @moxxy/cli init

Requirements: Node.js 20.19 or later. Use an API key for Anthropic/OpenAI, or reuse an authenticated Claude Code Pro/Max or Codex subscription as described below.

Claude Code (Pro/Max subscription, no API key)

  1. Install the official Claude CLI so claude is on PATH (or set CLAUDE_CODE_EXECUTABLE=/absolute/path/to/claude).
  2. Run claude auth login or moxxy login claude-code, then confirm with claude auth status and moxxy doctor.
  3. Select "Claude Agent" (claude-code) in moxxy init. It defaults to claude-sonnet-5-5; override per run with --model, or persist plugins.provider.items.claude-code.model.

Claude Code itself does each turn, through the Claude Agent SDK (installed into ~/.moxxy/agents/claude-agent-sdk on first use), with its own tools, skills, settings and MCP servers. Moxxy asks you before each of Claude's tools, with its permission rules applied, shows Claude's questions, and lends Claude its own tools over a local MCP server. Auto-approve shows how your Claude really runs from the moment a conversation starts (on when your Claude settings default to bypass permissions), and switches only the current conversation's Claude; once you turn it off, Claude starts asking even over that default. Claude's own settings are never edited. Claude also owns its login files—moxxy neither reads nor stores subscription credentials in its vault.

Desktop and interactive CLI setup can start sign-in. Headless runners/services generally cannot complete browser or TTY authentication: authenticate first as the same OS account that runs the service, make claude available in that account's service PATH (or set the executable path), and restart it. Recovery commands are claude auth status, claude auth login, moxxy login claude-code, and moxxy doctor.

Codex (ChatGPT sign-in, no API key)

  1. Install the Codex CLI so codex is on PATH (or set CODEX_EXECUTABLE=/absolute/path/to/codex).
  2. Run codex login or moxxy login codex-agent, then confirm with codex login status and moxxy doctor.
  3. Select "ChatGPT — Codex agent" (codex-agent) in moxxy init. A new conversation starts on gpt-6-luna by default. Choose a model per run with --model or save a default in plugins.provider.items.codex-agent.model.

Codex itself does each turn through codex app-server, with its own instructions, config, tools, skills and MCP servers. Moxxy shows Codex's approvals and questions, shows its plan in plan mode, ends goal mode when Codex's own goal is met, and lends Codex its own tools over a local MCP server. Auto-approve shows how your Codex really runs from the moment a conversation opens (Moxxy asks a short-lived codex app-server for the folder's config), gives only the current conversation's Codex full access, and stays as you set it; ~/.codex/config.toml is never edited. Your reason for declining reaches Codex, fast mode runs it on its fast tier, and Stop interrupts its turn, tools included.

OpenCode (your own OpenCode setup)

  1. Install OpenCode so opencode is on PATH (or set OPENCODE_EXECUTABLE=/absolute/path/to/opencode).
  2. Its free models work without signing in; for other providers run opencode auth login (or moxxy login opencode) in a terminal.
  3. Select "OpenCode agent" (opencode) in moxxy init. Pick any model opencode models lists with --model, or persist plugins.provider.items.opencode.model.

OpenCode itself does each turn through opencode acp, with its own instructions, config, tools, skills, permission rules and MCP servers. Moxxy shows what it does and its permission asks; auto-approve shows how OpenCode really runs from the moment a conversation opens (on with OpenCode's defaults, which ask for nothing; turning it off restarts that OpenCode once with your rules made to ask, for that process only), steers plan and goal mode through tools it lends OpenCode over a local MCP server, and never edits OpenCode's config.

Keeping the agent CLIs up to date

Moxxy checks the three CLIs when the TUI, moxxy serve or the desktop starts and every hour after: whether each is installed, signed in, and as new as the vendor's latest release on npm. A CLI older than the oldest version Moxxy was checked against (Claude Code 2.1.296, Codex 0.155.1, OpenCode 1.19.0) must be updated before its connection is used. The TUI says so in one line above the prompt, the desktop above the message box and in Settings → Providers, and moxxy doctor lists it. moxxy agents install <agent> runs the vendor's installer (Claude claude.ai/install.sh, Codex chatgpt.com/codex/install.sh, OpenCode opencode.ai/v2/install; on Windows their PowerShell installers, and npm for OpenCode); moxxy agents update <agent> runs the agent's own update command, which knows how it was installed (for an OpenCode 1 when OpenCode 2 is out, opencode upgrade --major, which replaces it with OpenCode 2 the same way). Moxxy never updates a CLI by itself, and the desktop refuses to update one while a turn runs.

Two checks keep the connections honest as the vendors ship new CLIs:

pnpm test:agents:compat              # no sign-in: each CLI's handshake and protocol (also daily on CI)
pnpm test:agents:live                # real conversations with your own sign-ins
pnpm test:agents:live --agent codex  # one agent

The live check drives moxxy serve the way the desktop does, on a throwaway Moxxy home with this repo's connection packages: a reply, a file change, a Moxxy tool, a follow-up that needs the earlier turn, Stop during a running command, and a restart that must resume the conversation. An agent that is not installed or not signed in is reported as not checked, never as passed; the report is saved under .live-reports/.

Quickstart

moxxy init      # interactive: choose provider, paste API key (stored in the vault)
moxxy           # launch the interactive TUI

One-shot from the command line:

moxxy -p "summarize the README in three bullets"

Resume a previous conversation:

moxxy resume

moxxy --help lists every command. moxxy <command> --help shows per-command details.

Commands

The CLI groups commands the same way moxxy --help does.

Setup

| Command | What it does | |---|---| | moxxy init | Interactive first-time setup. Picks a provider, captures the key, writes it into the vault. | | moxxy login <provider> | OAuth sign-in for providers that do not use API keys (for example codex-agent). | | moxxy login status | Show stored OAuth credentials. | | moxxy login logout <provider> | Remove stored OAuth credentials. | | moxxy doctor | Diagnose your install: provider readiness, vault unlock, missing optional dependencies. | | moxxy agents [status] | Where the Claude, Codex and OpenCode CLIs stand: installed version, the latest, what to do next (--json for scripts). | | moxxy agents install\|update <agent> | Install the agent's CLI with the vendor's installer, or update it with its own command (claude update, codex update, opencode upgrade). |

Run

| Command | What it does | |---|---| | moxxy | Default. Starts the Ink TUI. | | moxxy tui | Same as above, explicit. | | moxxy -p "…" (or --prompt) | One-shot prompt to stdout. | | moxxy resume [-s <id>] | Resume a persisted session. Interactive picker if no id. | | moxxy <channel> | Start a registered channel by name. | | moxxy channels | List registered channels and their subcommands. | | moxxy serve | Start every channel together with the scheduler and webhooks in one process. |

When a runner is already serving the session, moxxy tui receives the selected conversation over its socket. The terminal opens after it has received the history in order. Other connected clients can continue working during this transfer.

Manage

| Command | What it does | |---|---| | moxxy sessions list and delete | Inspect or remove persisted sessions. | | moxxy skills list, new, audit | Manage skill files across user, project, builtin, and plugin scopes. | | moxxy plugins list, reload, new | Manage the plugin host. reload picks up newly installed packages. | | moxxy mcp list, add, enable, disable, remove | Manage MCP servers in ~/.moxxy/mcp.json. | | moxxy perms list, add, remove | Inspect or edit the persisted permission rules. | | moxxy memory journal and recall | Read or query long-term memory. | | moxxy schedule add, list, remove | Time-driven prompts (cron or one-shot ISO). | | moxxy security audit, status, isolators | Inspect tool capability declarations and the active isolator. | | moxxy service install, logs, status, uninstall | Background OS services (launchd or systemd). | | moxxy self-update | Update bundled plugins, skills, and core safely. |

Flags

| Flag | What it does | |---|---| | --prompt, -p "…" | One-shot input. | | --model <id> | Override the default model for this invocation. | | --output-format <fmt> | text, json, or stream-json (one-shot output mode). | | --cwd <path> | Set the agent's working directory. | | --config <path> | Load a specific moxxy.config.ts. | | --no-color | Disable ANSI colors. | | -h, --help, -v, --version | Standard. |

Environment

| Variable | What it does | |---|---| | ANTHROPIC_API_KEY | Default Anthropic provider key. | | OPENAI_API_KEY | OpenAI provider key (also used by the openai embeddings plugin). | | MOXXY_VAULT_PASSPHRASE | Headless vault unlock when no OS keychain is available. | | MOXXY_FIXTURES | record or replay. Provider fixture mode used by tests. |

Channels

Run your agent through whichever surface fits the task.

| Channel | What it does | Command | |---|---|---| | TUI | Grok-style interactive terminal UI. | moxxy | | Telegram | Message the agent from anywhere. Voice notes get transcribed and run as turns. Pairs with a 6-digit code. | moxxy telegram | | HTTP | POST /v1/turn (JSON, SSE streaming) and POST /v1/turn/audio (raw bytes, iOS Shortcut friendly), bearer-token auth. | moxxy channels http | | Cron | Time-driven prompts. Cron expressions or one-shot ISO timestamps. | moxxy schedule add … | | Webhooks | External systems fire prompts on signed POST. HMAC plus bearer plus filter rules. | moxxy serve (auto-starts the listener) |

Services

Two ways to keep moxxy online 24/7.

Per-channel units, one process each so failures stay independent:

moxxy service install telegram     # launchd on macOS, systemd --user on Linux
moxxy service logs telegram         # tail the log

Or one process for everything, with a shared event log:

moxxy serve --background            # every channel plus the scheduler plus webhooks
moxxy serve --background --except http   # skip what you do not want
moxxy serve --status                # is it running?

Logs land in ~/.moxxy/services/<name>.log. The units survive reboots.

Configuration

moxxy.config.ts at your project root:

import { defineConfig } from '@moxxy/config';

export default defineConfig({
  provider: {
    name: 'anthropic',
    model: 'claude-sonnet-5-5',
    config: { apiKey: '${vault:ANTHROPIC_API_KEY}' },   // resolved from the vault
  },
  mode: 'default',
  plugins: {
    '@moxxy/plugin-browser': { enabled: false },        // disable a plugin (or use `moxxy plugins disable`)
  },
});

${vault:NAME} placeholders resolve on session start. The vault unlocks via OS keychain (keytar) with a passphrase fallback (MOXXY_VAULT_PASSPHRASE for headless boxes).

Docs

Full documentation lives at docs.moxxy.ai: concepts, recipes, plugin authoring, channel guides. The marketing site is at moxxy.ai.

Contributing

PRs welcome. The issue tracker and author guides live in the moxxy monorepo.

License

MIT. See the repository root for the full text.