Jarvis is a CLI tool and npm package for creating custom command aliases. Instantly turn lengthy or complex shell commands into simple shortcuts, boosting your productivity in the terminal.
- Add Aliases: Map any shell command to an easy-to-remember alias, with optional directory path for execution.
- Remove Aliases: Delete aliases you no longer need.
- List Aliases: View all your defined aliases, including their execution paths.
- Run Aliases: Execute commands using your defined shortcuts.
- Silent Mode: Run commands without displaying output.
Install Jarvis globally from npm:
npm install -g @sandeepk1729/jarvisjarvis --helpUsage: jarvis [options] [command] <string...>
used to run alias commands
Arguments:
string alias command
Options:
-V, --version output the version number
-s, --silent run command silently
-h, --help display help for command
Commands:
alias Add a new alias
remove Remove an existing alias
list List all aliases
jarvis aliasYou will be prompted to enter the command, alias name, and optional execution path.
Example 1: Development Server Alias
◇ What is the command to alias?
│ npm run dev
│
◇ What is the alias command ?
│ dev
│
◇ Is there any specific path for the command run? (Optional - It will run in the current directory if not specified)
│ /Users/dev/my-react-app
│
◇ Added alias 'dev' to run command: 'npm run dev'
Example 2: Log Search Alias
◇ What is the command to alias?
│ grep -r "ERROR" /var/log/
│
◇ What is the alias command ?
│ find-errors
│
◇ Is there any specific path for the command run? (Optional - It will run in the current directory if not specified)
│ [Press enter to skip]
│
◇ Added alias 'find-errors' to run command: 'grep -r "ERROR" /var/log/'
jarvis devIf a path was provided while creating the alias, the command runs in that directory; otherwise, it runs in the current working directory.
Regular Output:
> Running command:
> npm run dev
> PID: 5678
> my-react-app@1.0.0 dev
> vite --host
VITE v4.4.0 ready in 542 ms
➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.100:5173/
Silent Mode (no output displayed):
jarvis find-errors --silent
# or
jarvis find-errors -sSilent mode is useful when you want to run commands in scripts or background processes without cluttering the terminal output.
jarvis listSample Output:
┌─────────────┬─────────────────────────────────────────┬─────────────────────────────────────────┐
│ (index) │ command │ path │
├─────────────┼─────────────────────────────────────────┼─────────────────────────────────────────┤
│ dev │ 'npm run dev' │ '/Users/dev/my-react-app' │
│ find-errors │ 'grep -r "ERROR" /var/log/' │ undefined │
│ deploy │ 'npm run build && npm run deploy' │ '/Users/dev/my-app' │
│ logs │ 'tail -f /var/log/app.log' │ undefined │
└─────────────┴─────────────────────────────────────────┴─────────────────────────────────────────┘
jarvis removeYou will be prompted to select which alias(es) to delete.
Example Interaction (Single Alias):
◇ Select aliases to delete
│ ◉ dev
│ ◯ find-errors
│ ◯ deploy
│ ◯ logs
│
◇ Removed alias 'dev'
Example Interaction (Multiple Aliases):
◇ Select aliases to delete
│ ◯ dev
│ ◉ find-errors
│ ◉ deploy
│ ◯ logs
│
◇ Removed alias 'find-errors, deploy'
jarvis --versionThis command will display the current version of Jarvis installed on your system.
| Command | Description | Example |
|---|---|---|
jarvis alias |
Create a new alias | Interactive prompts guide you through setup |
jarvis <alias-name> |
Run an alias | jarvis dev |
jarvis <alias-name> --silent |
Run an alias silently | jarvis deploy -s |
jarvis list |
Show all aliases | Displays table with command and path |
jarvis remove |
Delete aliases | Interactive selection of aliases to remove |
jarvis --version |
Show version | Display current Jarvis version |
jarvis --help |
Show help | Display all available commands and options |
- Development Servers:
npm run dev,yarn start,python manage.py runserver - Build & Deploy:
npm run build && npm run deploy,docker build -t myapp . - Log Analysis:
grep -r "ERROR" /var/log/,tail -f /var/log/app.log - System Operations:
docker-compose up -d,systemctl restart nginx - Git Workflows:
git add . && git commit -m "update" && git push
MIT
Jarvis — Your personal command shortcut assistant!