bisgit 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,39 +8,39 @@ Full Tui coming soon
8
8
 
9
9
  ### Commit Tooling
10
10
 
11
- - `git sha <commit>` copies the shortend sha to clipboard (uses HEAD as default)
12
- - `git amend` commits with `--no-edit` and `--amend`. Accepts extra flags too.
13
- - `git fixup <commit>` commits staged changes as aa rebase, and starts an interactive rebase on the target commit if it would not fail.
14
- - `git savepoint` makes a WIP commit with current timestamp.
11
+ - `gi sha <commit>` copies the shortend sha to clipboard (uses HEAD as default)
12
+ - `gi amend` commits with `--no-edit` and `--amend`. Accepts extra flags too.
13
+ - `gi fixup <commit>` commits staged changes as aa rebase, and starts an interactive rebase on the target commit if it would not fail.
14
+ - `gi savepoint` makes a WIP commit with current timestamp.
15
15
 
16
16
  ### Merge Helpers
17
17
 
18
- - `git backmerge <branch>` updates a branch and then merges it into the current branch.
19
- - `git conflict <branch>` shows all conflicts that would occur in a merge.
20
- - `git abort` and `git continue` are useful in conflict resolution situations.
21
- - `git lines <branch> <ignore-file> <ignore-file> ...*` shows the number of lines changed.
18
+ - `gi backmerge <branch>` updates a branch and then merges it into the current branch.
19
+ - `gi conflict <branch>` shows all conflicts that would occur in a merge.
20
+ - `gi abort` and `gi continue` are useful in conflict resolution situations.
21
+ <!-- - `gi lines <branch> <ignore-file> <ignore-file> ...*` shows the number of lines changed. -->
22
22
 
23
23
  ### Branching
24
24
 
25
- - `git autoprune` deletes any already merged branches.
26
- - `git rebranch` If conflicts won't exist, create new branch from main and cherry-pick all commits from $
27
- - `git track <branch>` copies a remote branch to a local one and sets the origin upstream.
28
- - `git yank` is a force pull for the current branch. It commits a WIP commit and/or backup branch if commits don't exist in remote. Then it resets the local branch to match the remote. Useful way to handle a collaborator's force push.
25
+ - `gi autoprune` deletes any already merged branches.
26
+ - `gi rebranch` If conflicts won't exist, create new branch from main and cherry-pick all commits from $
27
+ - `gi track <branch>` copies a remote branch to a local one and sets the origin upstream.
28
+ - `gi yank` is a force pull for the current branch. It commits a WIP commit and/or backup branch if commits don't exist in remote. Then it resets the local branch to match the remote. Useful way to handle a collaborator's force push.
29
29
 
30
30
  ### Github
31
31
 
32
- - `git code-review <pr>` checks out a pr and creates a diff similar to github's code review diff viewer.
33
- - `git whoami` shows github username.
34
- - `git languages` prints the percentages of languages for this repo.
35
- - `git coauthor <username>` commits with a co-authorship description.
32
+ - `gi code-review <pr>` checks out a pr and creates a diff similar to github's code review diff viewer.
33
+ - `gi whoami` shows github username.
34
+ - `gi languages` prints the percentages of languages for this repo.
35
+ - `gi coauthor <username>` commits with a co-authorship description.
36
36
 
37
37
  ### Utility
38
38
 
39
- - `git pwd` shows repo root path.
40
- - `git wipe` clears all uncommitted trackable files
41
- - `git files <commit>` shows the files edited by the given commit.
42
- - `git churn` shows you the 25 most edited files.
43
- - `git exclude` and `git include` allows you to ignore files locally without modifying the .gitignore file.
44
- - `git remote-default` shows whether the remote default branch is 'main', 'master', etc.
39
+ - `gi pwd` shows repo root path.
40
+ - `gi wipe` clears all uncommitted trackable files
41
+ - `gi files <commit>` shows the files edited by the given commit.
42
+ - `gi churn` shows you the 25 most edited files.
43
+ - `gi exclude` and `gi include` allows you to ignore files locally without modifying the .gitignore file.
44
+ - `gi remote-default` shows whether the remote default branch is 'main', 'master', etc.
45
45
 
46
46
  I turned many of my git aliases into commands. The original aliases are found this [gist](https://gist.github.com/alexanderdombroski/ddac491daeff48c5f1346ba2960462fa).
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{useStdout as h}from"ink";function i(){let{stdout:t}=h();return{width:t.columns,height:t.rows}}import{Box as d,Text as c}from"ink";import{jsx as r,jsxs as u}from"react/jsx-runtime";function a(t){let{title:o,footer:e,children:s,width:m}=t,{width:p}=i(),n=(m??p)-6;return u(d,{flexDirection:"column",children:[o&&r(c,{children:"\u256D\u2500\u2500\u2500\u2500"+o+"\u2500".repeat(n-o.length)+"\u256E"}),r(d,{flexDirection:"column",...t,borderStyle:"round",borderTop:!o,borderBottom:!e,paddingLeft:1,children:s}),e&&r(c,{children:"\u2570"+"\u2500".repeat(n-e.length)+e+"\u2500\u2500\u2500\u2500\u256F"})]})}export{i as a,a as b};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a as S,b as g}from"./chunk-EXTT6F3H.js";import{b as T}from"./chunk-HCUVDNFV.js";import{use as b}from"react";import{Box as a,Text as u,useInput as I}from"ink";import{useState as y}from"react";function D(t,e){let[r,l]=y(0),[m,d]=y(0),x=Math.max(0,t.length-e),p=t.length-1,h=()=>{d(w=>{let c=Math.min(w+1,p);return l(n=>c>=n+e?Math.min(n+1,x):n),c})},f=()=>{d(w=>{let c=Math.max(w-1,0);return l(n=>c<n?Math.max(n-1,0):n),c})},s=t.slice(r,r+e),i=t[m];return{scrollDown:h,scrollUp:f,outList:s,selectedIndex:m,selectedValue:i}}import{Fragment as v,jsx as o,jsxs as B}from"react/jsx-runtime";var L=(async()=>{let{stdout:t}=await T("git log --oneline -n 30");return t.trim().split(/\r?\n/).map(W)})(),M=(async()=>{let{stdout:t}=await T("git show HEAD --name-only");return t.trim()})();function A(){let{height:t,width:e}=S(),r=t-5,l=Math.floor(e/2),m=b(L),{scrollUp:d,scrollDown:x,outList:p,selectedValue:h}=D(m,r-2);I((s,i)=>{i.upArrow&&d(),i.downArrow&&x()});let f=b(M);return o(v,{children:B(a,{children:[o(g,{overflowY:"hidden",height:r,title:"Log",width:l,children:p.map(({sha:s,message:i})=>B(a,{flexDirection:"row",flexWrap:"nowrap",children:[o(a,{minWidth:2,children:s===h.sha?o(u,{children:"> "}):null}),o(a,{minWidth:8,children:o(u,{color:"yellow",children:s})}),o(a,{children:o(u,{wrap:"truncate-end",children:i})})]},s))}),o(g,{title:"Commit Details",width:l,children:o(u,{children:f})})]})})}function W(t){let e=t.indexOf(" ");return{sha:t.slice(0,e),message:t.slice(e+1)}}export{A as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{b as s}from"./chunk-EXTT6F3H.js";import{render as R}from"ink";import{createContext as m,useContext as x,useState as l}from"react";import{jsx as a}from"react/jsx-runtime";var y=m(void 0),o=({children:n})=>{let[r,i]=l({}),t=(u,f)=>{i(K=>({...K,[u]:f}))};return a(y.Provider,{value:{keybindings:r,setKeybinding:t},children:n})},p=()=>{let n=x(y);if(!n)throw new Error("useKeybindings must be used within a KeybindingsProvider");return n};import{lazy as v,Suspense as S,useEffect as k}from"react";import{Text as g,Box as P,useInput as C}from"ink";import h from"ink-spinner";import{jsx as e,jsxs as c}from"react/jsx-runtime";var T=v(()=>import("./log-HEHMTDVZ.js"));function w(){return e(s,{children:c(g,{children:[e(h,{}),"\xA0Loading"]})})}function b(){C((i,t)=>{i==="q"&&process.exit()});let{keybindings:n,setKeybinding:r}=p();return k(()=>r("q","quit"),[]),e(o,{children:c(P,{flexDirection:"column",children:[e(S,{fallback:e(w,{}),children:e(T,{})}),e(s,{flexDirection:"row",borderStyle:"round",title:"Key Shortcuts",children:Object.entries(n).map(([i,t])=>e(g,{children:`[${i}]: ${t}`},t))})]})})}import{jsx as d}from"react/jsx-runtime";function q(){return d(o,{children:d(b,{})})}var J=()=>R(d(q,{}),{patchConsole:!0});export{J as renderApp};
package/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as n}from"./chunks/chunk-5WTQIRZS.js";async function a(){let r=n();if(!r){let{renderApp:e}=await import("./chunks/demo-PL6P4QST.js");return e()}let{runCommand:o}=await import("./chunks/commands-AR5RPPHV.js");if(await o(r))return;let{runWrapper:t}=await import("./chunks/wrapper-5X5SODCK.js");await t(r)||(console.error("unknown command"),process.exit(1))}a().catch(r=>{console.error(`An error occurred: ${r.stderr??r.message}`),process.exit(1)});
2
+ import{a as n}from"./chunks/chunk-5WTQIRZS.js";async function a(){let r=n();if(!r){let{renderApp:e}=await import("./chunks/pages-G4MRQPYC.js");return e()}let{runCommand:o}=await import("./chunks/commands-AR5RPPHV.js");if(await o(r))return;let{runWrapper:t}=await import("./chunks/wrapper-5X5SODCK.js");await t(r)||(console.error("unknown command"),process.exit(1))}a().catch(r=>{console.error(`An error occurred: ${r.stderr??r.message}`),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bisgit",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Git CLI tool to simplify common advanced git workflows",
5
5
  "main": "dist/main.js",
6
6
  "bin": {
@@ -29,13 +29,13 @@
29
29
  "type": "module",
30
30
  "scripts": {
31
31
  "start": "node dist/main.js",
32
- "dev": "node esbuild.mjs && node dist/main.js",
32
+ "dev": "node --watch dist/main.js",
33
+ "gi": "npm run package && node dist/main.js",
33
34
  "build": "node esbuild.mjs --watch",
34
35
  "package": "rm -rf dist && node esbuild.mjs --production",
35
36
  "profile": "npm-run-all -p profile:*",
36
37
  "profile:size": "esbuild-visualizer --metadata ./profile/meta.json --filename ./profile/visualizer.html && open ./profile/visualizer.html",
37
38
  "profile:lazy": "esbuild-lazy-analyzer --metafile ./profile/meta.json --outmeta ./profile/lazy.json --outreport ./profile/lazy.html && open ./profile/lazy.html",
38
- "gi": "npm run package && node dist/main.js",
39
39
  "lint": "eslint src",
40
40
  "check-types": "tsc --noEmit",
41
41
  "prepare": "husky"
@@ -43,8 +43,8 @@
43
43
  "devDependencies": {
44
44
  "@types/node": "^25.0.3",
45
45
  "@types/react": "^19.2.7",
46
- "@typescript-eslint/eslint-plugin": "^8.51.0",
47
- "@typescript-eslint/parser": "^8.51.0",
46
+ "@typescript-eslint/eslint-plugin": "^8.52.0",
47
+ "@typescript-eslint/parser": "^8.52.0",
48
48
  "esbuild": "^0.27.2",
49
49
  "esbuild-lazy-analyzer": "^1.4.0",
50
50
  "esbuild-visualizer": "^0.7.0",
@@ -53,7 +53,8 @@
53
53
  "husky": "^9.1.7",
54
54
  "lint-staged": "^16.2.7",
55
55
  "npm-run-all": "^4.1.5",
56
- "prettier": "^3.7.4"
56
+ "prettier": "^3.7.4",
57
+ "react-devtools-core": "^6.1.5"
57
58
  },
58
59
  "dependencies": {
59
60
  "chalk": "^5.6.2",
@@ -61,7 +62,6 @@
61
62
  "ink": "^6.6.0",
62
63
  "ink-spinner": "^5.0.0",
63
64
  "nanoid": "^5.1.6",
64
- "react": "^19.2.3",
65
- "react-devtools-core": "^6.1.5"
65
+ "react": "^19.2.3"
66
66
  }
67
67
  }
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{useState as x}from"react";import{Text as e,Box as c,useInput as p,render as i}from"ink";import{jsx as t,jsxs as n}from"react/jsx-runtime";var f=()=>{let[o,s]=x(0);return p((r,m)=>{r==="q"&&process.exit(),r==="+"&&s(o+1),r==="-"&&s(o-1)}),n(c,{flexDirection:"column",children:[t(e,{children:"\u{1F44B} Welcome to the Demo Ink App!"}),t(e,{children:"---------------------------------"}),n(e,{children:["Count: ",o]}),t(e,{children:'Press "+" to increase, "-" to decrease'}),t(e,{children:'Press "q" to quit'})]})},d=()=>i(t(f,{}));export{d as renderApp};