Skip to content

antick/ok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ok - CLI (v0.1.0 - alpha)

ok - a super CLI with super powers

Installation

macOS options:

  • Go toolchain (requires Go 1.22+):

    go install github.com/antick/ok@main

    Ensure your $GOPATH/bin (usually $HOME/go/bin) is on PATH:

    echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
  • Local build:

    git clone https://github.com/antick/ok.git
    cd ok
    go build -o ok .
    ./ok help
  • From GitHub Releases (when available):

    1. Download the latest ok binary for macOS (arm64 or amd64) from the Releases page.
    2. Make it executable and place it on your PATH:
      chmod +x ok && mv ok /usr/local/bin/ok

Usage

Get an overview and examples:

ok help

Common commands:

ok copy <source> [to] <destination>
ok build <input_file> [as/to] <output_file>
ok move <source> [to] <destination>
ok remove <file_or_directory> [--permanent|-p]
ok docker
ok kill [--port] <port>

Kill processes on a port (macOS)

Find and kill processes listening on a TCP port. This uses lsof under the hood (equivalent to lsof -iTCP:<port> -sTCP:LISTEN), shows the list of matching processes, and asks for confirmation before killing with SIGKILL (-9).

Examples:

# Find what is using port 3000 and kill after confirmation
ok kill --port 3000

# You can also specify the port as a positional argument
ok kill 3000

# If you omit the port, the help menu is shown
ok kill

Behavior:

  • Shows a table of processes (COMMAND, USER, PID, NAME) using the port.
  • Prompts: Proceed to kill them? [Y/n]: Enter defaults to Yes.
  • Uses SIGKILL to ensure processes exit.
  • If nothing is listening, it prints a friendly message.

Notes:

  • Requires lsof (available by default on macOS).
  • You may need elevated privileges to kill some processes.

Config

It creates ~/.ok/config.yaml file to set preferred defaults.

Update

  • If installed via Go:
    go install github.com/antick/ok@main
    This fetches and installs the latest version from main branch.
  • If installed from GitHub Releases: re-download the latest binary and replace the existing /usr/local/bin/ok.

License

GNU General Public License v3.0

About

WIP: ok CLI - a super CLI with super powers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages