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

gittey

v1.14.0

Published

Git utils for enhanced worflows

Downloads

411

Readme

Gittey

Customize your Git workflow.

Gittey is a tool to help you and your team customize your Git workflow to best match your day to day needs. Gittey comes with a number of tools out of the box, including branch, and commit prefix annotations and simplified branch management tools. Everything is configurable from the command line, and saved in a JSON configuration file. This means you can change your configuration in a text editor if you prefer!

Finally, you can easily extend the Gittey command set with custom aliases. Aliases can be raw CLI commands, or you can actually script your own workflow addition and fold it in with everything else with a simple alias.

Installation

Make sure you have Node.js installed, and run the following command:

npm install -g gittey

Setup

After Gittey is installed, run the following command in a project to add a Gittey configuration:

gittey init

This will walk you though configuring branch annotations for Gittey and save a configuration file to your project. Be sure to commit the configuration so your team can use it too.

Example Configuration (Current Gittey gittey-config.json)

{
    "branchPrefix": {
        "separator": "-",
        "validator": "",
        "prefixes": {
            "Bug": "Bug Fix",
            "Fea": "New Feature",
            "Ver": "New Version"
        }
    },
    "commitPrefix": {
        "separator": " ",
        "validator": ".{1,45}",
        "prefixes": {
            "F": "Feature (<= 8 LoC)",
            "B": "Bug fix (<= 8 LoC)",
            "R": "Test-supported Procedural Refactoring",
            "t": "Test only",
            "d": "Developer documentation (non-user facing)",
            "a": "Automated formatting / code generation",
            "r": "Provable (manual) refactoring",
            "c": "Comments (add/delete)",
            "e": "Environment (non-code) changes (for development)",
            "F!!": "Feature (> 8 LoC)",
            "B!!": "Bug fix (> 8 LoC)",
            "R!!": "Non-provable refactoring",
            "***": "Does not compile -- intermediate step"
        }
    },
    "aliases": [
        {
            "name": "update-branch",
            "command": "gittey update-current-branch",
            "description": "Pull changes from remote main and merge into current branch"
        },
        {
            "name": "push-main",
            "command": "git push origin main --tags",
            "description": "Push to main and include all commit tags"
        },
        {
            "name": "push",
            "command": "gittey commit; git push",
            "description": "Commit all outstanding changes and push to remote"
        },
        {
            "name": "pull",
            "command": "gittey commit; git pull",
            "description": "Commit all outstanding changes and pull from remote"
        },
        {
            "name": "publish-patch",
            "command": "gittey commit; npm version patch; npm publish; gittey push-main",
            "description": "Commit outstanding changes, bump patch version, publish, and push"
        },
        {
            "name": "publish-minor",
            "command": "gittey commit; npm version minor; npm publish; gittey push-main",
            "description": "Commit outstanding changes, bump minor version, publish, and push"
        },
        {
            "name": "publish-major",
            "command": "gittey commit; npm version major; npm publish; gittey push-main",
            "description": "Commit outstanding changes, bump major version, publish, and push"
        }
    ],
    "collaborators": []
}

Fun Gittey Tricks

Committing

  • Commit messages do not require quotes for single line messages
  • If you put quotes around your commit message, you can enter a multiline commit message, just like working in regular old Git

Aliases

  • Adding a push alias in the config file, you can add an auto-commit action which will save you from accidentally pushing without committing your latest files. It works like this:
"aliases": [
    {
        "name": "push",
        "command": "gittey commit; git push"
    }
]

// now you can run `gittey push` and it just works
  • Adding a pull alias you can add a commit, then pull action:
"aliases": [
    {
        "name": "pull",
        "command": "gittey commit; git pull"
    }
]

// now you can run `gittey pull` and it just works

Features

Current Features

  • Git pass-through transparency
    • Git commands (and arguments) that are not handled by gittey will pass transparently through to git reducing the need to switch to git for more advanced git work; for example, history rewriting.
  • Branch annotations
    • Branch prefixing
    • Branch annotation key visualization
    • Branch name validation
  • Local branch tooling
    • Easy single-branch delete
    • Easy delete for multiple local branches (prune)
    • Fetch latest master/main branch and update current branch
    • Merge into current branch
    • Merge current branch into another
    • Merge current branch and another branch into a temp branch
  • Commit prefix annotations
    • Check if changes have not been added, offer to add them
    • Provide canned Arlo-style annotations
    • Commit message annotation key visualization
    • Custom commit annotation prefixing
  • Commit collaborators
    • Select all commit collaborators from list defined in gittey-config.json
  • Custom git aliases
    • Runnable aliases with gittey aliasName
    • Add new aliases via command line
    • Remove aliases via command line
  • Configuration
    • Check if there is a newer version on run
    • Configure branch prefix annotations
    • Configure commit prefix annotations
    • Reset Gittey configuration
    • Project init
    • user global configuration now supported
  • Remote management
    • Add and remove remote references
    • Quickly list all remotes
  • Help/Man information

CLI Options

Current options at the command line for Gittey:

  • add-alias - Add a new user-configured command alias
  • add-collaborator - Add collaborator to list of team collaborators
  • args - Arguments to supply to alias command
  • branch-prefixes - Display branch prefixes and descriptions
  • checkout - Check out a branch from list
    • gittey checkout --remote will provide remote branches available for checkout
    • gittey checkout <branchname> will check out specified branch without prompting
  • clone - Clone remote repository
  • commit - Create a new branch using defined configuration
    • Commit arguments pass through to git, e.g. gittey commit --no-verify
  • commit-prefixes - Display commit prefixes and descriptions
  • configure-branch-annotations - Create branch annotation prefixes
  • configure-commit-annotations - Create commit annotation prefixes
  • delete-alias - Delete a user-configured command alias
  • delete-branch - Delete a branch
  • help, -h - Display help info
  • init - Initialize Gittey configuration in your project
  • init-repo - Initialize git repository with custom main branch name
  • list-remotes - List remotes for local git repo
  • merge-from-branch - Merge another branch into current branch
  • merge-to-branch - Merge current branch into another branch
  • merge-to-temp - Merge current branch and another branch into a temp branch
  • new-branch - Create a new branch using defined configuration
  • prune-branches - Menued branch cleanup
  • remove-collaborators - Remove collaborators from list of team collaborators
  • remove-remote - Remove remote reference from local git repo
  • rename-branch - Rename current branch
  • reset-configuration - Reset configuration to default settings
  • revert-commits - Revert recent commits
  • set-remote-uri - Set or update remote URI
  • set-verbose-mode - Set project-level Gittey verbose mode
  • update - Update to latest version
  • update-current-branch - Update current branch with remote trunk changes
  • verbose - (Flag) Make all git commands visible when run
  • version, -v - Display current version