open-index/open-npm huggingface dataset:
npm package: @keepgoingdev/cli
Description: Terminal CLI for KeepGoing. Resume side projects without the mental friction.
Latest version: 1.6.1

# @keepgoingdev/cli

Terminal CLI for [KeepGoing](https://keepgoing.dev) — resume side projects without the mental friction.

## Install

```bash
# Run without installing
npx @keepgoingdev/cli status

# Install globally
npm install -g @keepgoingdev/cli

# Or add to a project
npm install --save-dev @keepgoingdev/cli
```

## Commands

### `keepgoing status`

Show the last checkpoint for the current project.

```
KeepGoing · 12 days ago

  Summary:   Refactored auth middleware to support JWT rotation
  Next step: Implement verifyRefreshToken helper in auth.ts
  Branch:    feature/auth-refactor
  Files:     auth.ts, middleware.ts, routes/token.ts (+2 more)
```

Flags:

- `--cwd <path>` — override the working directory
- `--json` — output raw JSON of the last checkpoint (for scripting)
- `--quiet` — output a single summary line (used by the shell hook)

### `keepgoing save`

Save a new checkpoint. By default, auto-generates the summary and next step from recent git activity (commits and touched files). No interactive prompts.

Git branch and touched files are auto-detected from the workspace.

Flags:

- `-m, --message <text>` — use a custom summary instead of auto-generating
- `-n, --next <text>` — use a custom next step instead of auto-generating
- `--force` — save even if a recent checkpoint exists or there are no detected changes
- `--json` — output raw JSON
- `--quiet` — suppress output
- `--cwd <path>` — override the working directory

Examples:

```bash
keepgoing save                         # auto-generate from git
keepgoing save -m "Finished auth flow" # custom summary
keepgoing save --force                 # save even if no changes
```

### `keepgoing hook install`

Install a shell hook that runs `keepgoing status --quiet` automatically whenever you `cd` into a directory that contains `.keepgoing/`.

Supports **zsh**, **bash**, and **fish**. Detected from `$SHELL`.

```bash
keepgoing hook install
# → Reload your shell:
source ~/.zshrc                    # zsh
source ~/.bashrc                   # bash
source ~/.config/fish/config.fish  # fish
```

### `keepgoing hook uninstall`

Remove the shell hook from your shell config file.

```bash
keepgoing hook uninstall
```

## Shell Hook Setup

The shell hook gives you zero-friction project context when you enter a project directory.

After running `keepgoing hook install` and reloading your shell, entering any directory with a `.keepgoing/` folder will automatically print:

```
KeepGoing · 3 days ago · Refactored auth middleware to support JWT rotation
```

## Data Format

Reads and writes the same `.keepgoing/` schema used by the VS Code extension:

- `.keepgoing/sessions.json` — all checkpoints
- `.keepgoing/state.json` — last session state
- `.keepgoing/meta.json` — project metadata

## Development

From the monorepo root:

```bash
npm run build --workspace=apps/cli
```