Thanks to visit codestin.com
Credit goes to github.com

Skip to content

abishek77s/kmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kmd

Turn your recently used commands (usually repeated) into a Makefile.

Install

Download the appropriate Linux/MacOS binary from the Releases page:

Linux (amd64)

curl -L -o kmd.tar.gz https://github.com/abishek77s/kmd/releases/download/v0.1.0-alpha/kmd_0.1.0-alpha_linux_amd64.tar.gz && \
tar -xzf kmd.tar.gz && \
chmod +x kmd && \
sudo mv kmd /usr/local/bin/

Build from source

git clone https://github.com/abishek77s/kmd.git
cd kmd/cli
go build

Supported Shells

✓ Bash
✓ Zsh
✓ Fish

Usage

kmd            # Show last 5 commands
kmd -n 7       # Show last 7 commands

What it does

  1. Reads your shell history (bash/zsh/fish)
  2. Lets you select commands in order
  3. Generates a Makefile with numbered steps

Example Output

all: step1 step2 step3 step4

step1:
	@echo "🔧 Step 1: docker build -t myapp:latest ."
	docker build -t myapp:latest .

step2:
	@echo "🔧 Step 2: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 123456789.dkr.ecr.us-east-1.amazonaws.com"
	aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 123456789.dkr.ecr.us-east-1.amazonaws.com

step3:
	@echo "🔧 Step 3: docker tag myapp:latest 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:latest"
	docker tag myapp:latest 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:latest

step4:
	@echo "🔧 Step 4: docker push 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:latest"
	docker push 123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:latest

Run using:

make all
# or individually
make step1
make step2

About

Generate makefile for your repeated commands.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages