openapp-cli
v1.0.1
Published
A secure CLI tool to quickly open websites in your browser from the terminal. Supports custom shortcuts, multiple browsers, and incognito mode.
Downloads
9
Maintainers
Readme
OpenApp CLI
A secure, cross-platform CLI tool to quickly open websites in your browser from the terminal. Save time with built-in shortcuts for 50+ popular websites and create your own custom shortcuts.
Features
- 50+ Built-in Shortcuts - Instantly open YouTube, Gmail, GitHub, LinkedIn, and many more
- Custom Shortcuts - Add your own shortcuts for any URL
- Cross-Platform - Works on Windows, macOS, and Linux
- Multiple Browsers - Support for Chrome, Firefox, Safari, Edge, Brave, and Opera
- Incognito Mode - Open links in private/incognito browsing mode
- Quick Search - Search Google, Bing, or DuckDuckGo directly from terminal
- Secure by Design - URL validation, input sanitization, and no shell injection vulnerabilities
Installation
# Install globally via npm
npm install -g openapp-cli
# Or using yarn
yarn global add openapp-cliQuick Start
# Open YouTube
openapp youtube
# Open Gmail
openapp gmail
# Open GitHub
openapp github
# Open in incognito mode
openapp youtube --incognito
# Search on Google
openapp search how to learn javascriptUsage
Open a Website
openapp <shortcut>Examples:
openapp youtube # Opens YouTube
openapp linkedin # Opens LinkedIn
openapp github # Opens GitHub
openapp gmail # Opens GmailOpen in Incognito/Private Mode
openapp <shortcut> --incognito
# or
openapp <shortcut> -iExamples:
openapp youtube --incognito
openapp gmail -iSearch the Web
openapp search <query>Options:
-i, --incognito- Search in incognito mode-e, --engine <engine>- Choose search engine (google, bing, duckduckgo)
Examples:
openapp search javascript tutorials
openapp search react hooks --incognito
openapp search node.js best practices -e duckduckgoAdd Custom Shortcuts
openapp add <name> <url>Examples:
openapp add myresume https://drive.google.com/file/d/abc123/view
openapp add portfolio https://myportfolio.com
openapp add company-wiki https://wiki.mycompany.comNow you can use:
openapp myresume # Opens your resume
openapp portfolio # Opens your portfolioRemove Custom Shortcuts
openapp remove <name>Example:
openapp remove myresumeList All Shortcuts
# List all shortcuts
openapp list
# List only built-in shortcuts
openapp list --builtin
# List only custom shortcuts
openapp list --customConfigure Browser
# Set Chrome as default
openapp config browser chrome
# Set Firefox as default
openapp config browser firefox
# Available browsers: chrome, firefox, safari, edge, brave, opera, default
openapp config browser default # Use system defaultView Configuration
openapp config showReset Configuration
openapp config resetBuilt-in Shortcuts
Social Media
| Shortcut | Website |
|----------|---------|
| youtube | YouTube |
| facebook | Facebook |
| twitter | Twitter |
| x | X (Twitter) |
| instagram | Instagram |
| linkedin | LinkedIn |
| reddit | Reddit |
| pinterest | Pinterest |
| tiktok | TikTok |
| snapchat | Snapchat |
Productivity & Work
| Shortcut | Website |
|----------|---------|
| gmail | Gmail |
| outlook | Outlook |
| drive | Google Drive |
| docs | Google Docs |
| sheets | Google Sheets |
| slides | Google Slides |
| calendar | Google Calendar |
| notion | Notion |
| trello | Trello |
| slack | Slack |
| discord | Discord |
| zoom | Zoom |
| meet | Google Meet |
| teams | Microsoft Teams |
Development
| Shortcut | Website |
|----------|---------|
| github | GitHub |
| gitlab | GitLab |
| bitbucket | Bitbucket |
| stackoverflow | Stack Overflow |
| npm | npm |
| codepen | CodePen |
| codesandbox | CodeSandbox |
| vercel | Vercel |
| netlify | Netlify |
Entertainment
| Shortcut | Website |
|----------|---------|
| netflix | Netflix |
| prime | Amazon Prime Video |
| hotstar | Disney+ Hotstar |
| spotify | Spotify |
| twitch | Twitch |
Shopping
| Shortcut | Website |
|----------|---------|
| amazon | Amazon |
| flipkart | Flipkart |
| ebay | eBay |
Search & Information
| Shortcut | Website |
|----------|---------|
| google | Google |
| bing | Bing |
| duckduckgo | DuckDuckGo |
| wikipedia | Wikipedia |
AI Tools
| Shortcut | Website |
|----------|---------|
| chatgpt | ChatGPT |
| claude | Claude |
| gemini | Gemini |
| perplexity | Perplexity AI |
News & Blogs
| Shortcut | Website |
|----------|---------|
| hackernews | Hacker News |
| medium | Medium |
| devto | Dev.to |
Configuration File
OpenApp stores custom shortcuts and settings in ~/.openapprc.json in your home directory.
Example configuration:
{
"customShortcuts": {
"myresume": "https://drive.google.com/file/d/abc123/view",
"portfolio": "https://myportfolio.com"
},
"settings": {
"browser": "chrome"
}
}Security
OpenApp is built with security as a priority:
- URL Validation - All URLs are validated using the URL constructor to prevent malformed URLs
- Protocol Whitelist - Only
http://andhttps://protocols are allowed. Dangerous protocols likejavascript:,data:,file:, etc. are blocked - Input Sanitization - Shortcut names can only contain alphanumeric characters, hyphens, and underscores
- No Shell Injection - Uses the
openpackage which properly escapes arguments - Reserved Names Protection - Command names like
add,remove,listcannot be used as shortcuts - Safe JSON Handling - Proper error handling for configuration file operations
Requirements
- Node.js >= 18.0.0
- npm or yarn
Platform Support
| Platform | Supported | Notes | |----------|-----------|-------| | Windows | Yes | Uses system browser associations | | macOS | Yes | Full browser support including Safari | | Linux | Yes | Requires browser to be installed |
Browser Support
| Browser | Incognito Flag | Status |
|---------|----------------|--------|
| Chrome | --incognito | Full support |
| Firefox | --private-window | Full support |
| Edge | --inprivate | Full support |
| Brave | --incognito | Full support |
| Opera | --private | Full support |
| Safari | N/A | No CLI incognito support |
Troubleshooting
Browser not opening?
- Make sure the browser is installed on your system
- Try setting a specific browser:
openapp config browser chrome - Check if the browser path is in your system PATH
Custom shortcut not working?
- Check the URL is valid:
openapp list --custom - Make sure the shortcut name uses only letters, numbers, hyphens, and underscores
- Verify the URL starts with
http://orhttps://
Incognito mode not working?
- Set a specific browser:
openapp config browser chrome - Note: Safari doesn't support command-line incognito mode
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Shubham Rawat
Changelog
v1.0.0
- Initial release
- 50+ built-in shortcuts
- Custom shortcut support
- Multi-browser support
- Incognito mode
- Search functionality
- Cross-platform support
Made with love for developers who live in the terminal.
