Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3c5b2e5
update toolchain
viqueen Oct 24, 2026
3004e32
update dependencies
viqueen Oct 24, 2026
9a91ea7
noissue: add composite setup action for CI toolchain and pnpm caching
viqueen Oct 24, 2026
692cc1c
remove claude scripto
viqueen Oct 24, 2026
2e02e1e
remove renovate , rely on dependabot
viqueen Oct 24, 2026
ca8c096
noissue: add dependabot config with cooldown for npm and github-actions
viqueen Oct 24, 2026
ded05b7
remove license lint plugin as it seems broken now
viqueen Oct 24, 2026
52e6092
upgrade inquirer
viqueen Oct 24, 2026
25398e8
upgrade simple-git
viqueen Oct 24, 2026
81af323
upgrade eslint
viqueen Oct 24, 2026
dc9d17e
upgrade types
viqueen Oct 24, 2026
4c6e8dd
upgrade jest
viqueen Oct 24, 2026
e105dbd
upgrade commander
viqueen Oct 24, 2026
d086beb
fix up options
viqueen Oct 24, 2026
353c1c3
chore: ignore generated lockfile in prettier, format workspace yaml
viqueen Oct 24, 2026
d095a08
setup funding
viqueen Oct 24, 2026
77d77ef
chore: remove sync-github and sync-bitbucket commands
viqueen Oct 24, 2026
3e1291f
chore: remove workspace-exec in favour of multi-gitter
viqueen Oct 24, 2026
ec306ed
update repo urls
viqueen Oct 24, 2026
84a808e
docs: reference mise and pnpm in contributing and from-source setup
viqueen Oct 24, 2026
4434edb
chore: drop prepare-commit-msg hook, use pnpm in pre-commit
viqueen Oct 24, 2026
855ddb5
chore: remove workspace-prs stub command
viqueen Oct 24, 2026
335d943
docs: remove snyk badge from readme
viqueen Oct 24, 2026
a765743
docs: point sonarcloud badge at labset_git-workspaces
viqueen Oct 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [labset]
20 changes: 20 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Setup"
description: "Install the mise toolchain, configure pnpm store caching, and install dependencies"
runs:
using: "composite"
steps:
- uses: jdx/[email protected]
- name: Resolve pnpm store path
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
# Wait before opening PRs so compromised releases can be yanked first.
cooldown:
semver-minor-days: 3
semver-patch-days: 3
# Hold major upgrades back so they land roughly once a month.
semver-major-days: 30
open-pull-requests-limit: 10
groups:
# Batch low-risk updates into a single PR.
minor-and-patch:
update-types:
- "minor"
- "patch"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
semver-minor-days: 3
semver-patch-days: 3
semver-major-days: 30
open-pull-requests-limit: 10
groups:
minor-and-patch:
update-types:
- "minor"
- "patch"
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v2
- run: pnpm install
- uses: ./.github/actions/setup
- run: pnpm format:check
- run: pnpm lint
- run: pnpm test
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v2
- run: pnpm install
- uses: ./.github/actions/setup
- run: pnpm format:check
- run: pnpm lint
- run: pnpm test
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

npm run format:check
pnpm format:check
25 changes: 0 additions & 25 deletions .husky/prepare-commit-msg

This file was deleted.

4 changes: 2 additions & 2 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
node = "24"
pnpm = "10.33.0"
node = "24.22.1"
pnpm = "12.14.0"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
dist/
node_modules/
coverage/
pnpm-lock.yaml
3 changes: 1 addition & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ This is a TypeScript CLI tool that provides Git workspace management utilities.

- **src/bin/** - CLI entry points for all git commands (git-recent, git-merged, git-workspace, etc.)
- **src/lib/** - Core library functions and utilities shared across commands
- **src/streams/** - Stream implementations for GitHub and Bitbucket Cloud APIs
- **src/tasks/** - Task implementations for workspace operations (clone, sync, exec)
- **src/tasks/** - Task implementations for workspace operations (clone, sync)
- **dist/** - Compiled JavaScript output (generated by TypeScript compiler)

### Key Components
Expand Down
23 changes: 9 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
## environment

I use **[nvm](https://github.com/nvm-sh/nvm)** to manage my node versions.
I use **[mise](https://mise.jdx.dev/)** to manage the toolchain. The pinned
`node` and `pnpm` versions live in [`.mise.toml`](.mise.toml).

```bash
brew install nvm
brew install mise
```

## development setup

- create a fork of the repo, clone it, and install the dependencies
- create a fork of the repo, clone it, and install the toolchain and dependencies

```bash
cd git-workspace
nvm install
npm ci
cd git-workspaces
mise install
pnpm install
```

- setup git hooks

```bash
npx husky install
```

- invite claude

```bash
npm run claude
git config core.hooksPath .husky
```

- build it in watch mode

```bash
yarn build --watch
pnpm build:watch
```

- you can now use the cli
Expand Down
38 changes: 10 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## git-workspaces

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=viqueen_git-devbox&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=viqueen_git-devbox)
[![Known Vulnerabilities](https://snyk.io/test/github/viqueen/git-devbox/badge.svg?targetFile=package.json)](https://snyk.io/test/github/viqueen/git-devbox?targetFile=package.json)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=labset_git-workspaces&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=labset_git-workspaces)

### install it

Expand All @@ -24,9 +23,11 @@ npm install @labset/git-workspaces -g

```bash
git clone https://github.com/viqueen/git-workspaces.git
cd git-workspace
npm install
npm link
cd git-workspaces
mise install
pnpm install
pnpm build
pnpm link --global
```

### use it
Expand Down Expand Up @@ -76,8 +77,6 @@ it will add the following git global config entries
```text
git.workspaces.root # where you want all your workspaces to be
git.workspaces.default # your default workspace, i.e open-source vs work
git.workspaces.github.username # your github username
git.workspaces.github.personal.token # your github personal access token
```

- add a repo to your workspace
Expand All @@ -101,24 +100,7 @@ git workspace-clone
git workspace-clone -w <name>
```

- sync workspace with GitHub, it requires GitHub username and token to be set when working with private repos

```bash
git sync-github # logged in user repos
git sync-github --user <namespace>
git sync-github --org <namespace>
git sync-github --org <namespace> --archived # include archived
git sync-github --user <namespace> --forked # include forked
```

- sync workspace with Bitbucket Cloud, it requires Bitbucket username and token to be configured

```bash
git sync-bitbucket --namespace <namespace>
```

- execute a script across your git workspace

```bash
git workspace-exec <script-file> [args...]
```
> [!NOTE]
> To run scripts or make changes across many repos, use
> [multi-gitter](https://github.com/lindell/multi-gitter) against your cloned
> workspace. The built-in `workspace-exec` command has been removed in its favour.
8 changes: 0 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ export default tseslint.config(
},
},
rules: {
"@labset-eslint/license-notice": [
"error",
{
license: "Apache-2.0",
copyRightYear: "2025",
copyRightName: "Hasnae Rehioui",
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
Expand Down
39 changes: 17 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@
"git-recent": "dist/bin/git-recent.js",
"git-squashed": "dist/bin/git-squashed.js",
"git-stale": "dist/bin/git-stale.js",
"git-sync-bitbucket": "dist/bin/git-sync-bitbucket.js",
"git-sync-github": "dist/bin/git-sync-github.js",
"git-tidy": "dist/bin/git-tidy.js",
"git-workspace": "dist/bin/git-workspace.js",
"git-workspace-add": "dist/bin/git-workspace-add.js",
"git-workspace-clone": "dist/bin/git-workspace-clone.js",
"git-workspace-config": "dist/bin/git-workspace-config.js",
"git-workspace-exec": "dist/bin/git-workspace-exec.js",
"git-workspace-prs": "dist/bin/git-workspace-prs.js",
"git-workspace-remove": "dist/bin/git-workspace-remove.js",
"git-workspace-sync": "dist/bin/git-workspace-sync.js"
},
"scripts": {
"claude": "claude",
"build": "tsc",
"build:watch": "tsc --watch",
"test": "jest",
Expand All @@ -33,7 +28,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/viqueen/git-workspaces.git"
"url": "git+https://github.com/labset/git-workspaces.git"
},
"files": [
"dist"
Expand All @@ -46,33 +41,33 @@
"author": "Hasnae R.",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/viqueen/git-workspaces/issues"
"url": "https://github.com/labset/git-workspaces/issues"
},
"homepage": "https://github.com/viqueen/git-workspaces#readme",
"homepage": "https://github.com/labset/git-workspaces#readme",
"devDependencies": {
"@eslint/js": "^9.39.4",
"@eslint/js": "^10.0.1",
"@labset-eslint/eslint-plugin": "^1.3.0",
"@types/cli-progress": "^3.11.6",
"@types/inquirer": "^8.2.12",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.24",
"@types/node": "^22.19.17",
"eslint": "^9.39.4",
"eslint-import-resolver-typescript": "^4.4.4",
"@types/inquirer": "^9.0.10",
"@types/jest": "^30.0.0",
"@types/lodash": "^4.17.27",
"@types/node": "^24.19.2",
"eslint": "^10.13.0",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import": "^2.32.0",
"jest": "^29.7.0",
"prettier": "^3.8.3",
"ts-jest": "^29.4.9",
"jest": "^30.5.2",
"prettier": "^3.9.10",
"ts-jest": "^29.4.15",
"ts-node": "^10.9.2",
"typescript": "5.8.3",
"typescript-eslint": "^8.58.2"
"typescript-eslint": "^8.72.0"
},
"dependencies": {
"@labset/leveldb-registry": "^1.3.0",
"@labset/task-pool-executor": "^2.3.0",
"commander": "^13.1.0",
"inquirer": "^8.2.7",
"commander": "^14.0.3",
"inquirer": "^14.2.4",
"lodash": "^4.18.1",
"simple-git": "^3.36.0"
"simple-git": "^4.0.2"
}
}
Loading
Loading