Your CLI tool has been transformed into a professional, publishable npm package.
npm install -g quick-share-cliThen use:
quick-share setup
quick-share myfile.pdfquick-image-link/
├── bin/
│ └── quick-share.js # Main CLI entry point
├── lib/
│ └── upload.js # Core upload logic
├── scripts/
│ ├── postinstall.js # Post-install message
│ └── preuninstall.js # Cleanup message
├── test/
│ └── upload.test.js # Unit tests
├── examples/
│ ├── config.example.json # Example config
│ └── README.md # Examples documentation
├── assets/
│ ├── logo.svg # Project logo
│ └── banner.svg # README banner
├── .github/
│ ├── workflows/
│ │ └── ci.yml # GitHub Actions CI/CD
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md # Bug report template
│ │ └── feature_request.md # Feature request template
│ └── pull_request_template.md
├── .eslintrc.json # ESLint configuration
├── .gitignore # Git ignore rules
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # MIT License
├── README.md # Comprehensive documentation
├── jest.config.js # Jest test configuration
├── package.json # NPM package configuration
└── install.sh # Alternative install script
# Legacy bash scripts (kept for reference):
├── setup-r2.sh
├── upload-file.sh
└── upload-image.sh
-
Create a GitHub repository named
quick-share-cli -
Initialize git and push:
git init git add . git commit -m "Initial release: v1.0.0" git remote add origin https://github.com/jack/quick-share-cli.git git push -u origin main
-
Create NPM account (if not done): https://www.npmjs.com/signup
-
Login to NPM:
npm login
-
Publish:
npm publish
- Global NPM installation support
- Three command aliases (quick-share, qshare, share)
- Interactive setup wizard
- Support for all file types
- Smart output (Markdown, HTML, embed codes)
- Clipboard integration
- Secure config storage
- Comprehensive README with badges
- Installation instructions (multiple methods)
- Usage examples
- Configuration guide
- API documentation
- SVG logo
- SVG banner for README
- NPM badges (version, downloads, license, build)
- MIT License
- CHANGELOG.md (Keep a Changelog format)
- CONTRIBUTING.md with development setup
- .gitignore for Node.js projects
- GitHub Actions workflow for testing
- Automated releases on git tags
- NPM publishing on release
- Code coverage reporting
- Bug report template
- Feature request template
- Pull request template
- Jest test suite
- Unit tests for core functions
- Test coverage configuration
-
Test locally:
npm install npm test node bin/quick-share.js --help -
Create GitHub repository
-
Set up NPM_TOKEN secret in GitHub for automated publishing
-
Tag and release v1.0.0
-
Share with the world!
- Zero-config uploads - Just run
quick-share <file> - Beautiful CLI - Colorful output with progress indicators
- Multiple formats - Get URL, Markdown, and HTML automatically
- Secure - Credentials stored with 600 permissions
- Cross-platform - Works on macOS and Linux
- Extensible - Easy to add new storage backends
quick-share <file> # Quick upload
quick-share upload <file> # Explicit upload
quick-share setup # Configure credentials
quick-share config # View current config
quick-share --help # Show helpConfig stored at: ~/.quick-share/config.json
Example:
{
"accountId": "xxxxx",
"accessKeyId": "xxxxx",
"secretAccessKey": "xxxxx",
"bucketName": "my-bucket",
"publicUrl": "https://pub-xxxxx.r2.dev"
}MIT License - Free to use, modify, and distribute!
Your package is ready to ship! 🚀