https://github.com/xarunoba/clai
⬆️ — Run package installation after checking for lockfile updates
https://github.com/xarunoba/clai
clai cli dependency-updater developer-experience git nodejs post-merge
Last synced: 4 months ago
JSON representation
⬆️ — Run package installation after checking for lockfile updates
- Host: GitHub
- URL: https://github.com/xarunoba/clai
- Owner: xarunoba
- License: mit
- Created: 2024-02-21T09:26:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T12:51:28.000Z (about 2 years ago)
- Last Synced: 2025-12-06T16:50:17.005Z (6 months ago)
- Topics: clai, cli, dependency-updater, developer-experience, git, nodejs, post-merge
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@xarunoba/clai
- Size: 79.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @xarunoba/clai ⬆️
 

**`clai`** — check lockfiles and install
Run package installation after checking for lockfile updates. Integrate with git hooks. Supports `npm`, `pnpm`, and `yarn`. Uses `git` and any of the supported package managers under the hood.
## Why
Using a bot to update dependencies is becoming widespread. Installing after pulling from your remote repository is now needed in order to synchronize your local modules. `clai` fixes this issue by checking for lockfile updates and running install.
## Installation
### npm
```bash
npm install -D @xarunoba/clai
# run locally
npx clai
```
### pnpm
```bash
pnpm install -D @xarunoba/clai
# run locally
pnpm clai
```
### yarn
```bash
yarn add --dev @xarunoba/clai
# run locally
yarn run clai
```
## Usage
### npm
```bash
npx @xarunoba/clai
```
### pnpm
```bash
pnpm dlx @xarunoba/clai
```
### yarn
```bash
yarn dlx @xarunoba/clai
```
### flags
You can add the following flags for `clai`:
- `-v, --version` — Show version number
- `-h, --help` — Show help
- `-c, --cleaninstall` — use `ci` (npm) or `--frozen-lockfile` (pnpm, yarn) when installing
- `-s, --strict` — Will immediately exit if any issues are found
- `-q, --quiet` — Will not log anything to the console
## Integrations
### With [`simple-git-hooks`](https://github.com/toplenboren/simple-git-hooks)
Integrating with [`simple-git-hooks`](https://github.com/toplenboren/simple-git-hooks) is easy as a toasted bread:
```json
// package.json
{
...
"simple-git-hooks": {
// I prefer always using the latest version of clai
// instead of installing it as a dev dependency.
// If you have installed it locally, you can use:
// "post-merge": "npx clai"
"post-merge": "npx @xarunoba/clai"
}
...
}
```