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

@cogito.ai/cli

v0.5.0

Published

AgentDock CLI – scaffold projects for humans and AI agents

Downloads

141

Readme

AgentDock CLI

@cogito.ai/cli — Scaffold production-ready AI coding agent projects for humans, CI pipelines, and AI agents.

npm version


Quick Start

# Interactive mode (for humans)
npx @cogito.ai/cli init

# Headless mode (for CI / AI agents)
npx @cogito.ai/cli init --name my-app --template web-nextjs --pm pnpm --json

# Start MCP Stdio server (for AI agents via Model Context Protocol)
npx @cogito.ai/cli mcp

Installation

# Run without installing (recommended)
npx @cogito.ai/cli <command>

# Global install
npm install -g @cogito.ai/cli
pnpm add -g @cogito.ai/cli

Commands

agentdock init

Scaffold a new project from a template. Auto-detects the environment:

  • TTY → interactive prompts (human mode)
  • Non-TTY / --silent / --json → headless execution (agent/CI mode)

| Flag | Type | Default | Description | | ------------ | ------- | ---------- | ------------------------------------------------ | | --name | string | required | Project name and target directory name | | --template | string | required | Template ID (e.g. web-nextjs) | | --pm | string | pnpm | Package manager: pnpm / npm / yarn / bun | | --dir | string | ./<name> | Target directory (absolute or relative to cwd) | | --json | boolean | false | Output NDJSON result to stdout | | --silent | boolean | false | Suppress all output |

JSON output (success):

{ "ok": true, "targetDir": "/path/to/my-app", "name": "my-app", "template": "web-nextjs" }

JSON output (failure):

{
  "ok": false,
  "error": "TARGET_DIR_EXISTS",
  "message": "Directory already exists: /path/to/my-app"
}

Error codes: MISSING_ARG · TEMPLATE_NOT_FOUND · TARGET_DIR_EXISTS · CLI_VERSION_OUTDATED · SCAFFOLD_FAILED


agentdock mcp

Start an MCP (Model Context Protocol) Stdio server. Exposes CLI capabilities as tools directly callable by AI agents.

agentdock mcp

Available tools:

| Tool | Description | | ------------------ | ------------------------------------------ | | list_templates | List all available project templates | | scaffold_project | Scaffold a project into a target directory |

VS Code Copilot MCP config (.vscode/mcp.json):

{
  "servers": {
    "agentdock": {
      "type": "stdio",
      "command": "npx",
      "args": ["@cogito.ai/cli", "mcp"]
    }
  }
}

Available Templates

| Template ID | Description | | ------------ | ----------------------------------------------------------------------------------------------------- | | web-nextjs | Next.js 16 + Supabase + next-intl + Tailwind CSS v4 + Vitest + Fumadocs — full-stack monorepo starter |


Architecture

The CLI uses an Adapter pattern — a single executor core serves three consumer surfaces:

agentdock init
      │
      ├── TTY detected ──→ Human Adapter  (Clack interactive UI)
      └── Non-TTY / flags ──→ Agent Adapter (structured JSON output)

agentdock mcp ──→ MCP Adapter (MCP Stdio Server)

All adapters share the same Core Executor (scaffold + registry)

Design principles:

  1. Headless-first — the executor core has no TTY dependency; the human UI is a thin shell on top.
  2. Structured output as protocol--json mode produces stable machine-parseable NDJSON, not natural language.
  3. One capability, three surfacesscaffold_project is implemented once and projected to CLI flags, JSON mode, and MCP tool automatically.

Tech stack:

| Component | Role | | ---------------------------------------------------------------------------- | --------------------------------------------------------- | | Bun | Build: single-file Node.js executable | | Citty | Command modeling: sub-commands, flag schema, lazy loading | | Clack | Human interaction: TTY prompts | | MCP TypeScript SDK | Agent protocol: MCP Stdio server | | Changesets | Release governance: semantic versioning + changelog |


Development

# Install dependencies
pnpm install

# Regenerate template registry
pnpm --filter @cogito.ai/cli generate-registry

# Run from source (no build needed)
npx tsx packages/cli/bin/agentdock.ts init

# Run tests
pnpm --filter @cogito.ai/cli test

# Build
pnpm --filter @cogito.ai/cli build

Adding a template

  1. Create templates/<id>/ with a complete project structure.
  2. Add package.json with "agentdock": { "minCliVersion": "x.y.z" }.
  3. Run pnpm --filter @cogito.ai/cli generate-registry.
  4. Publish a new CLI version — templates are bundled inside the npm package.

Publishing a new version

pnpm changeset          # describe the change
pnpm changeset version  # bump version + update CHANGELOG
pnpm --filter @cogito.ai/cli build
pnpm --filter @cogito.ai/cli publish

License

MIT


中文文档 →