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

@teamday/cli

v0.1.0

Published

TeamDay CLI - Manage AI agents, spaces, and tasks from the command line

Readme

TeamDay CLI

Command-line interface for managing AI agents, spaces, offices, and tasks.

The CLI is the proof that offices work. If you can't teamday scan "ai agents" and see real data, the office isn't done.

Installation

# Install dependencies
bun install

# Run CLI locally
bun run bin/teamday.ts [command]

# Or link globally
bun link
teamday [command]

No build step needed — Bun runs TypeScript directly.

Quick Start

# 1. Authenticate
teamday auth login                              # OAuth (opens browser)

# 2. Check connection
teamday auth status

# 3. Try an office command
teamday scan "ai agents, mcp servers" --time week

# 4. Or manage resources
teamday agents list
teamday spaces list

Commands

Authentication

teamday auth login                  # OAuth login (opens browser)
teamday auth logout                 # Clear credentials
teamday auth status                 # Show auth status + org
teamday auth set-key <token>        # Set PAT token (td_ prefix)
teamday auth refresh                # Refresh access token

Agents

teamday agents list [options]       # List agents (--status, --visibility, --tag)
teamday agents get <id>             # Get agent details
teamday agents create [options]     # Create agent (--name, --role, --system-prompt)
teamday agents update <id> [opts]   # Update agent
teamday agents delete <id>          # Archive agent
teamday agents exec <id> <msg>      # Execute agent (--space, --session)
teamday agents chat <id>            # Interactive chat session

Spaces

teamday spaces list [options]       # List spaces
teamday spaces get <id>             # Get space details
teamday spaces create [options]     # Create space
teamday spaces delete <id>          # Delete space
teamday spaces ls <id> [path]       # List files in space
teamday spaces git <id> <args...>   # Run git command in space

Tasks

teamday tasks list [options]        # List tasks
teamday tasks get <id>              # Get task details
teamday tasks create [options]      # Create task
teamday tasks update <id> [opts]    # Update task
teamday tasks complete <id>         # Mark complete
teamday tasks cancel <id>           # Cancel task

Executions

teamday executions list [options]   # List executions
teamday executions get <id>         # Get execution details
teamday executions cancel <id>      # Cancel execution
teamday executions tree <id>        # Show delegation tree
teamday executions logs <id>        # View execution logs

Characters

teamday characters list             # List all characters
teamday characters get <id>         # Get character details

Skills

teamday skills list                 # List installed skills
teamday skills get <id>             # Get skill details

MCP Servers

teamday mcps list                   # List MCP server connections
teamday mcps get <id>               # Get MCP details

API Keys

teamday keys list                   # List API keys
teamday keys create [options]       # Create new key
teamday keys revoke <id>            # Revoke a key

Chat (Default Command)

teamday chat <agent-id>             # Start interactive chat
teamday                             # Auto-detect agent and start chatting
teamday chat --list [spaceId]       # List recent chats (optionally by space)
teamday chat --read <chatId>        # Read a chat's message history
teamday chat --list-missions        # List mission-spawned chats with run info

Office Commands

Office-specific commands expose key office actions for testing and automation.

# Social Media Office — scan Reddit + HN for opportunities
teamday scan <topics> [options]
teamday scan "ai agents, mcp" --time week --limit 5
teamday scan "claude, anthropic" --platforms reddit --format json

Options:

  • --time <range> — Time range: day, week, month, year (default: week)
  • --limit <n> — Results per platform per topic (default: 10)
  • --platforms <list> — Platforms: reddit,hackernews (default: both)
  • --format <format> — Output: table or json

Config

teamday config list                 # Show all config
teamday config get <key>            # Get value
teamday config set <key> <value>    # Set value
teamday config unset <key>          # Reset to default
teamday config reset                # Reset all

Configuration

Config file: ~/.teamday/config.json

{
  "api_url": "https://cc.teamday.ai",
  "format": "table",
  "no_color": false,
  "timeout": 300000,
  "verbose": false
}

Switching Environments

# Local development
teamday config set api_url http://localhost:3000
teamday auth login

# Production
teamday config set api_url https://cc.teamday.ai
teamday auth login

Output Formats

All list commands support --format:

teamday agents list                         # Table (default)
teamday agents list --format json           # JSON (for piping)
teamday agents list --format yaml           # YAML
teamday scan "ai agents" --format json      # JSON scan results

Adding a New Office Command

Every office should expose its key action as a CLI command. See docs/office-patterns/cli-command.md for the full template.

Quick steps:

  1. Create src/commands/{office}.ts exporting create{Office}Commands(apiClient, config)
  2. Import + register in src/index.ts
  3. Use ora for spinners, chalk for colors, apiClient.get() for API calls
  4. Support --format json for machine-readable output
  5. Test: teamday {command} --help

Reference: src/commands/scan.ts (Social Media scan command).

Architecture

packages/cli/
├── bin/teamday.ts              # Entry point (#!/usr/bin/env bun)
├── src/
│   ├── index.ts                # Registers all commands via Commander.js
│   ├── commands/               # Command implementations
│   │   ├── auth.ts             # Auth: login, logout, status, set-key
│   │   ├── agents.ts           # Agent CRUD + exec + chat
│   │   ├── spaces.ts           # Space CRUD + ls + git
│   │   ├── tasks.ts            # Task CRUD + complete + cancel
│   │   ├── executions.ts       # Execution tracking + tree + logs
│   │   ├── characters.ts       # Character list + get
│   │   ├── skills.ts           # Skill list + get
│   │   ├── mcps.ts             # MCP server list + get
│   │   ├── keys.ts             # API key management
│   │   ├── chat.ts             # Interactive chat + default action
│   │   ├── scan.ts             # Social Media scan (office command)
│   │   └── config.ts           # Config management
│   ├── lib/                    # Core libraries
│   │   ├── api-client.ts       # HTTP client (GET/POST/PATCH/DELETE + SSE)
│   │   ├── auth-manager.ts     # OAuth flow + PAT token management
│   │   ├── config-manager.ts   # ~/.teamday/config.json persistence
│   │   ├── formatters.ts       # Table, JSON, YAML output formatting
│   │   └── interactive.ts      # Interactive chat mode (readline + SSE)
│   └── types/                  # TypeScript definitions
└── tests/                      # Unit + integration tests

Technology Stack

  • Runtime: Bun (no build step — runs TS directly)
  • CLI Framework: Commander.js
  • HTTP Client: Native fetch API
  • Streaming: Server-Sent Events (SSE) via eventsource-parser
  • Auth: OAuth 2.0 flow + PAT tokens (keytar for secure storage)
  • Output: cli-table3, js-yaml, chalk, ora
  • Interactive: Inquirer.js

Troubleshooting

# Auth issues
teamday auth status                          # Check what's connected
teamday auth logout && teamday auth login    # Re-authenticate

# Connection issues
teamday config get api_url                   # Check target URL
teamday config set api_url http://localhost:3000  # Switch to local

# Verbose output for debugging
teamday --verbose agents list

Testing

# Unit tests
bun run test:unit

# Integration tests (local)
bun run test:integration:local

# Integration tests (production)
bun run test:integration:cc

# Character tests
bun run test:characters