Skip to content

tk-425/caller-cli

Repository files navigation

Caller CLI

Caller-CLI is a handy command-line tool that makes your life easier by simplifying your workflow. It's inspired by fig.io, which has shut down, and it offers shortcuts for those tricky commands you can never remember. Plus, it has some Git features and uses AI to help you find and run commands quickly. If you want to create your own shortcuts or just need a bit of help with command-line tasks, Caller-CLI is here to make things smoother and more straightforward.

Installation

  1. To install Caller CLI, follow these steps:
    git clone https://github.com/tk-425/caller-cli.git
  2. Move the repository to the /usr/local/share directory
    sudo mv /path/to/repository/ /usr/local/share
  3. Navigate to the /usr/local/share/caller-cli/src/bin directory
    cd /usr/local/share/caller-cli/src/bin
  4. Make the caller.js script executable
    chmod +x caller.js
  5. Create a Symlink to your script
    sudo ln -s /usr/local/share/caller-cli/src/bin/caller.js /usr/local/bin/caller
  6. Install packages (using pnpm or npm)
    # Using pnpm (recommended)
    cd .. && pnpm install --prod
    
    # Or using npm
    cd .. && npm install --omit=dev
  7. Restart your terminal
  8. Use caller <command> to run the Caller-CLI command

Saved commands are stored in ~/.caller-cli/caller-cli-commands.json by default.

Commands

List Commands

caller list

Display a list of all commands currently registered with Caller CLI.

Example

$ caller list

- List -

? Select command (use arrow keys)
> npm-global-list
  ...
  ...
  ---------------
  EXIT

Add a Command

caller add <name> <command>

Add a new command to Caller CLI.

Example

$ caller add npm-global-list 'npm list -g'

This will add a new command named npm-global-list that runs the command npm list -g when invoked.

Rename a Command

caller rename <old_name> <new_name>

Rename an existing command.

Example

$ caller rename npm-global-list npm-list-global

Remove a Command

caller remove <name>

Remove a command from Caller CLI.

Example

$ caller remove npm-list-global

Git

caller git

Access various Git commands. We will add more Git commands later.

Example

$ caller git

- GIT COMMANDS -

? Select a git command (Use arrow keys)
> Add All
  Commit
  List Branches
  Create Branch
  Push to current branch
  Select a branch to push
  -------------
  EXIT

AI Command

caller ai

Use AI to find a command. Please create a Gemini API key by following these instructions.

Example

$ caller ai

- AI -

? Enter your Gemini API key: *********************
? Ask AI: Command for listing all the global npm packages.

npm list -g

? Would you like to run the command? (y/N)

Please only ask questions about command-line commands. Otherwise, the AI will respond with Please provide a question related to command-line commands.

Note: Your API key is securely stored using the keytar npm package and saved in your system's keychain.

Delete API Key

caller del key

Delete the stored Gemini API key.

Update

caller update

Update Caller CLI to the latest available version.

Version

caller -V
caller --version

Display the current version number of Caller CLI.

About

Caller-CLI is a command-line tool that simplifies your workflow with shortcuts for tricky commands, Git features, and AI assistance.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors