Skip to content

johanlabs/johankit-cli

Repository files navigation

JohanKit

JohanKit is a developer-friendly CLI designed to supercharge your vibe-coding flow. It helps you capture, restore, and manipulate snapshots of your codebase, making it effortless to experiment, refactor, and collaborate—without locking you into a specific framework or workflow.

Think of it as your personal code snapshot toolkit: lightweight, fast, and platform-agnostic.


Features

📸 copy

Take a snapshot of files in a directory and copy it to your clipboard as a JSON array.

johankit copy <dir> [exts]
  • dir: Directory to scan (default: current)
  • exts: Comma-separated list of extensions (e.g., ts,js)

📋 paste

Restore files or apply patches from a JSON snapshot stored in your clipboard.

johankit paste [dir] [--run] [--diff] [--dry-run]
  • --run: Execute console commands included in the patch.
  • --diff: Interactive mode. Shows a line-by-line diff and asks for confirmation before applying changes to each file.
  • --dry-run: Preview changes without modifying any files.
  • -y: Auto-accept all prompts.

🤖 prompt

Generate a ready-to-use AI prompt containing your codebase snapshot and your instructions.

johankit prompt <dir> "<user request>"
  • dir: Directory to include in the context.
  • <user request>: Instructions for the AI to perform on the codebase.

🔄 sync

Two-way synchronization: copies the current snapshot, waits for your AI-generated patch input via terminal (Ctrl+D to finish), applies it, and copies the updated snapshot back to the clipboard.

johankit sync [dir] [--run] [--dry-run]

Example Workflow

  1. Prepare Context: johankit prompt src "Add input validation to all API routes"
  2. Get AI Response: Copy the JSON patch array generated by your favorite LLM.
  3. Review & Apply: johankit paste --diff

Configuration

Customize ignored patterns by creating a johankit.yaml or johankit.yml in your project root:

ignore:
  - dist
  - node_modules
  - .git
  - custom-build-folder

JohanKit also automatically respects patterns found in your .gitignore file.


Requirements

  • Node.js >= 14
  • Clipboard-compatible OS (pbcopy, xclip, or Windows clip)

Installation

npm install -g johankit

About

JohanKit is a developer-friendly CLI designed to supercharge your vibe-coding flow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published