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

tabby-post-connect-actions

v0.1.0

Published

Tabby plugin for per-profile working directory and post-connect script execution

Readme

tabby-post-connect-actions

A Tabby plugin that adds per-profile working directory and post-connect script execution for SSH and Local shell connections.

About

Tabby's built-in login scripts handle basic expect/send pairs for automating connection flows. This plugin builds on top of that foundation with a more flexible approach to post-connection setup: a dedicated working directory field that navigates to your project on connect, a multi-line script area for running setup commands in sequence, smart shell prompt detection so commands execute only when the terminal is ready, and configurable navigation methods depending on your workflow.

It does not replace or interfere with existing login scripts — both systems run independently, with this plugin's actions executing after the built-in scripts complete.

Installation

From Tabby's Plugin Manager

  1. Open Tabby Settings
  2. Go to the Plugins tab
  3. Search for tabby-post-connect-actions
  4. Click Install

From npm

npm install -g tabby-post-connect-actions

Configuration

Open Tabby Settings and navigate to the Post-Connect Actions tab. From there you can select any profile and configure:

| Field | Type | Default | Description | |---|---|---|---| | Working Directory | string | "" | Path to navigate to after connecting. Leave empty to skip. | | Post-Connect Script | string | "" | Multi-line script to run after navigating. Each non-empty line is sent as a separate command. | | CD Method | "send" | "command" | "send" | How to change directory. "send" types cd /path into the terminal. "command" sends cd /path && exec $SHELL to replace the shell in-place (SSH only — falls back to "send" for local shell). | | Wait for Prompt | boolean | true | Wait for a shell prompt before running commands. | | Prompt Timeout | number | 5000 | Maximum time (ms) to wait for a prompt before proceeding anyway. |

Configuration is stored in Tabby's global config under postConnectActions.profiles, keyed by profile ID.

Usage Examples

Navigate to a project directory on connect:

  • Set Working Directory to /home/deploy/my-project

Activate a Python virtualenv after connecting:

  • Set Working Directory to /home/user/my-project
  • Set Post-Connect Script to:
    source venv/bin/activate
    export DJANGO_SETTINGS_MODULE=config.production

Source environment and start services on a dev server:

  • Set Working Directory to /opt/app
  • Set Post-Connect Script to:
    source ~/.nvm/nvm.sh
    nvm use 18
    export NODE_ENV=development

How It Works

The plugin uses Tabby's TerminalDecorator API to hook into the terminal session lifecycle. When a connection is established:

  1. Prompt detection — If enabled, the plugin watches terminal output for common shell prompt characters ($, #, >, %), stripping ANSI escape codes for reliable matching. If no prompt is detected within the timeout, it proceeds anyway.
  2. Directory change — If a working directory is set, the plugin navigates to it using the configured method.
  3. Script execution — If a post-connect script is set, each non-empty line is sent to the terminal with a short delay between lines.

Actions automatically re-run if the session reconnects.

Compatibility

| Connection Type | Supported | Notes | |---|---|---| | SSH | Yes | Full support including cdMethod: "command" | | Local shell | Yes | cdMethod: "command" falls back to "send" | | Serial | No | — | | Telnet | No | — |

Development

# Install dependencies
npm install --legacy-peer-deps

# Build
npm run build

# Watch mode
npm run watch

# Run tests
npm test

# Lint
npm run lint

# Format
npm run format

AI Disclosure

This plugin was developed with the assistance of Claude by Anthropic. All commits in this repository include a Co-authored-by: Claude <[email protected]> trailer to reflect this collaboration.

License

MIT