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

save-my-process

v1.0.1

Published

Export/import your shell history, pip/npm package lists, and project files so you don't lose your session when the browser or sandbox closes.

Readme

save-my-process

npm version license: MIT node >=18

Save your shell history, installed pip/npm packages, and project files to a single archive before your session (browser tab, sandbox, container) closes — and restore them later.

Works on Windows, macOS, Linux. No native dependencies.

Install

# as a CLI globally
npm install -g save-my-process

# or as a library in your project
npm install save-my-process

CLI Usage

Export current session

save-my-process
# name?  my-session
# zip? (yes/no) yes
# split? (yes/no) no
# → creates .my-session-export/my-session.zip

Options asked interactively:

  • name — base name for output files (default smp_<timestamp>)
  • zip — pack export.json into a .zip (recommended)
  • split — split output into ≤100MB parts (_part_1_of_N) for environments with upload/download limits

Supports piped input (CI / scripting):

printf "my-session\nyes\nno\n" | save-my-process

Import / Restore

save-my-process import my-session.zip
# or
save-my-process import export.json

What restore does:

  • appends saved bash history to ~/.bash_history
  • writes requirements.txt next to the export and runs pip install -r
  • decodes and writes every captured project file back to disk

Split parts (.part) must be reassembled first:

cat my-session_part_*.zip.part > my-session.zip
save-my-process import my-session.zip

Other

save-my-process --version

Library Usage

Use it programmatically in Node.js (ESM):

import { gatherExportData, packageExportData, importExportData } from 'save-my-process';

// 1. Gather
const exportData = gatherExportData({
  cwd: '/path/to/project',
  onProgress: (msg) => console.log(msg),
});
// exportData = { history, pipList, npmList, files: [{ path, content: base64 }] }

// 2. Package to disk
const files = await packageExportData({
  exportData,
  outDir: './my-backup',
  baseName: 'my-session',
  zip: true,      // true → .zip, false → .json
  split: false,   // true → split into ≤100MB chunks
  onProgress: console.log,
});
// files = [{ name, path }]

// 3. Restore later
importExportData({
  jsonPath: './my-backup/export.json', // or extracted from zip
  targetDir: '/where/to/restore',
  onProgress: console.log,
});

API

gatherExportData({ cwd?, onProgress? })

Scans ~/.bash_history, pip freeze, npm list, and all project files (skips node_modules, .git, venv, .next, dist). Returns { history, pipList, npmList, files }.

packageExportData({ exportData, outDir, baseName?, zip?, split?, onProgress? })

Writes export.json and optionally zips/splits it. Returns Promise<{ name, path }[]>.

importExportData({ jsonPath, targetDir?, onProgress? })

Restores history, pip packages, and files from an export.json.

Requirements

  • Node.js >=18
  • Optional: pip/pip3 and npm on PATH (gracefully skipped if missing)

Publishing (for maintainers)

npm login
npm view save-my-process   # confirm name is available (currently free)
npm publish                # or: npm publish --access public

If the name is taken, publish under a scope:

{ "name": "@your-scope/save-my-process" }

Then:

npm publish --access public

License

MIT — see LICENSE