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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rabrennie/lumbermill

v0.3.0

Published

Ezpz management of git worktrees

Downloads

2

Readme

Lumbermill

Ezpz management of git worktrees

lumbermill

Usage

$ npm install -g @rabrennie/lumbermill

$ lm clone [email protected]:Rabrennie/lumbermill.git
Creating config file as lumbermill is being run for the first time... done
Cloning into 'main'...

Cloning repo... done
Cloned [email protected]:Rabrennie/lumbermill.git to /development/lumbermill

$ lm create user/ticket-123/testing --repo lumbermill
Created worktree for user/ticket-123/testing in /development/lumbermill/user-ticket-123-testing
Creating worktree... done
...

Config Files

Main Config

After running the lm command it will create a config file in ~/.config/lumbermill/config.json. This file keeps track of the repos and aliases managed by Lumbermill using the following format:

{
  "repos": {
    "lumbermill": "/Users/rab/development/lumbermill"
  },
  "aliases": {}
}

Repo Config

After cloning a repo with lm clone REPO [DIRECTORY] it will create a .lumbermill folder in the repos directory with a config.json file

.lumbermill/config.json

{
  "repo": "[email protected]:Rabrennie/lumbermill.git",
  "directory": "/development/lumbermill",
  "defaultBranch": "main",
}

It will also create a scripts directory where we can store custom scripts

.lumbermill/scripts/my-cool-script

echo "I am running in $(pwd)"
$ lm run my-cool-script --repo lumbermill --branch main
I am running in /Users/rab/development/lumbermill/main

$ lm run my-cool-script --repo lumbermill --branch user/ticket-123/testing
I am running in /Users/rab/development/lumbermill/user-ticket-123-testing

Commands

lm alias delete ALIAS

deletes an alias

USAGE
  $ lm alias delete ALIAS

ARGUMENTS
  ALIAS  alias to delete

DESCRIPTION
  deletes an alias

EXAMPLES
  $ lm alias delete

See code: dist/commands/alias/delete.ts

lm alias list

lists all defined aliases

USAGE
  $ lm alias list

DESCRIPTION
  lists all defined aliases

EXAMPLES
  $ lm alias list

See code: dist/commands/alias/list.ts

lm alias set ALIAS EXPANSION

defines a new alias that will expand to a command

USAGE
  $ lm alias set ALIAS EXPANSION

ARGUMENTS
  ALIAS      alias to set
  EXPANSION  expansion to set

DESCRIPTION
  defines a new alias that will expand to a command

EXAMPLES
  $ lm alias set

See code: dist/commands/alias/set.ts

lm clone REPO [DIRECTORY]

Clones a repo and configures it for lumbermill

USAGE
  $ lm clone REPO [DIRECTORY]

ARGUMENTS
  REPO       repo to clone
  DIRECTORY  target directory

DESCRIPTION
  Clones a repo and configures it for lumbermill

EXAMPLES
  $ lm clone

See code: dist/commands/clone.ts

lm create BRANCH

Creates a new worktree for a lumbermill managed repo

USAGE
  $ lm create BRANCH [--repo <value>]

ARGUMENTS
  BRANCH  branch name to create

FLAGS
  --repo=<value>  repo to use, if not specified, will use repo associated with the current directory

DESCRIPTION
  Creates a new worktree for a lumbermill managed repo

EXAMPLES
  $ lm create

See code: dist/commands/create.ts

lm pull BRANCH

Pulls a remote branch into a worktree

USAGE
  $ lm pull BRANCH [--repo <value>]

ARGUMENTS
  BRANCH  branch name to pull

FLAGS
  --repo=<value>  repo to use, if not specified, will use repo associated with the current directory

DESCRIPTION
  Pulls a remote branch into a worktree

EXAMPLES
  $ lm pull

See code: dist/commands/pull.ts

lm remove BRANCH

Removes a worktree from a lumbermill managed repo

USAGE
  $ lm remove BRANCH [--repo <value>]

ARGUMENTS
  BRANCH  branch name to remove

FLAGS
  --repo=<value>  repo to use, if not specified, will use repo associated with the current directory

DESCRIPTION
  Removes a worktree from a lumbermill managed repo

ALIASES
  $ lm rm

EXAMPLES
  $ lm remove

See code: dist/commands/remove.ts

lm rm BRANCH

Removes a worktree from a lumbermill managed repo

USAGE
  $ lm rm BRANCH [--repo <value>]

ARGUMENTS
  BRANCH  branch name to remove

FLAGS
  --repo=<value>  repo to use, if not specified, will use repo associated with the current directory

DESCRIPTION
  Removes a worktree from a lumbermill managed repo

ALIASES
  $ lm rm

EXAMPLES
  $ lm rm

lm run SCRIPT

Runs a script in a worktree

USAGE
  $ lm run SCRIPT --branch <value> [--repo <value>]

ARGUMENTS
  SCRIPT  file to read

FLAGS
  --branch=<value>  (required) branch name to run script in
  --repo=<value>    repo to use, if not specified, will use repo associated with the current directory

DESCRIPTION
  Runs a script in a worktree

EXAMPLES
  $ lm run

See code: dist/commands/run.ts