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

@teamai/cli

v1.1.0

Published

TeamAI CLI for syncing local folders to sandbox

Downloads

418

Readme

TeamAI CLI

Sync local folders to your TeamAI sandbox in real-time.

Installation

npm install -g @teamai/cli

Quick Start

# 1. Authenticate
teamai login

# 2. Link current folder to a chat
teamai init --chat <chatId>

# 3. Start syncing
teamai sync

Commands

teamai login

Authenticate with TeamAI. Opens browser for OAuth flow.

teamai login

teamai init

Link current folder to a chat sandbox.

teamai init --chat <chatId>
teamai init --chat <chatId> --profile myproject

Options:

  • --chat <chatId> - Chat ID to sync to
  • --profile <name> - Profile name (default: "default")

teamai sync

Start syncing files. Watches for local changes and uploads to sandbox.

# Upload only (local → sandbox)
teamai sync

# Bidirectional sync (local ↔ sandbox)
teamai sync --pull

Options:

  • --pull - Enable bidirectional sync (downloads from sandbox every 30 seconds)
  • --profile <name> - Profile to use (default: "default")
  • --chat <chatId> - Override chat ID

What it does:

  • Watches local files for changes
  • Uploads only changed files
  • Respects .gitignore patterns
  • Auto-ignores: node_modules, .git, .env, .DS_Store
  • Handles deletions, conflicts, and network errors
  • Keeps you authenticated automatically

Press Ctrl+C to stop.

teamai pull

Download files from sandbox (one-time).

teamai pull
teamai pull --profile myproject

Options:

  • --profile <name> - Profile to use (default: "default")
  • --chat <chatId> - Override chat ID

teamai logout

Log out and clear credentials.

teamai logout

Features

🔒 Privacy & Security

  • Secure authentication with automatic token management
  • Isolated access - only your chat's files
  • 1-hour token expiry with auto-renewal
  • Privacy-first - cannot see other users' files

⚡ Efficient Syncing

  • Smart change detection - only syncs modified files
  • Resumable uploads for large files
  • Automatic retry on network errors
  • Fast and efficient - skips unchanged files

🛡️ Safety & Reliability

  • Conflict resolution - keeps both versions (renames local to .conflict)
  • Deletion tracking - syncs file deletions
  • First-sync safe - won't delete untracked files
  • Symlink handling - skipped, not followed

📁 File Filtering

  • .gitignore support - respects your ignore patterns
  • Hardcoded ignores - node_modules, .git, .env, .DS_Store
  • Customizable - add patterns to .gitignore

How It Works

Sync Modes

Upload-only (teamai sync):

  • Watches local files
  • Uploads changes to sandbox
  • Instant in sandbox

Bidirectional (teamai sync --pull):

  • Watches local files + polls sandbox every 30 seconds
  • Uploads local changes
  • Downloads remote changes
  • Detects conflicts (keeps both versions)

Download-only (teamai pull):

  • One-time download from sandbox
  • Useful for syncing to a new machine

Conflict Resolution

When both local and remote files are modified:

  1. Detect conflict (both changed since last sync)
  2. Rename local version to filename.conflict.ext
  3. Download remote version as filename.ext
  4. No data loss - you can manually merge

Configuration

Configuration is stored in .teamai/config-{profile}.json:

{
  "chatId": "chat-id-here",
  "workspaceId": "workspace-id-here",
  "localPath": "/path/to/folder"
}

Credentials are stored in ~/.teamai/credentials.json:

{
  "sessionToken": "your-session-token"
}

Troubleshooting

Session expired

Error: Session expired. Run `teamai login` again.

Solution: Re-authenticate with teamai login

Chat not found

Error: Chat not found or you don't have access.

Solution: Verify the chat ID and ensure you have access

Files not syncing

  1. Check if file matches .gitignore patterns
  2. Check if file is in hardcoded ignore list
  3. Stop sync (Ctrl+C) and restart

Conflicts appearing

This is normal when both local and remote are modified. The CLI keeps both versions - you can manually merge them.

Requirements

  • Node.js >= 18.0.0
  • Internet connection
  • TeamAI account with chat access

Privacy & Security

What the CLI can access:

✅ Files in your linked folder only ✅ Your chat's sandbox files only ✅ Cannot see other users' chats or files

Token security:

  • Tokens expire in 1 hour
  • Auto-renewed every 50 minutes
  • Scoped to specific chat path only
  • Secure, isolated access per chat

Data handling:

  • Encrypted file transfer
  • Credentials stored locally only
  • No access to other users' data

License

MIT

Support

For issues or questions, contact TeamAI support or file an issue in the repository.