permagen
v1.0.5
Published
CLI that automatically generates a permalink for any file. Useful for quickly creating free permalinks for images, PDFs, etc.
Downloads
14
Maintainers
Readme
permagen
CLI that automatically generates a permalink for any file. Useful for quickly creating free permalinks for images, PDFs, etc.
It works by storing the file in your Firebase Storage bucket using your Firebase project credentials. Credentials never leave your computer and are stored locally at ~/.permagenConfig.json
. See recommended Firebase setup section below.
Installation
npx permagen
or npm i -g permagen
Usage
npx permagen
- home menunpx permagen --config
- settingsnpx permagen [path to file]
- generates a permalinknpx permagen [path to file] -c
- generates a permalink and copies it to the clipboard
Recommended Firebase Setup
- Create a new Firebase project
- Enable Storage in production mode
- Change the security rule to "allow read, write: if true;"
- Get your credentials by going through the web app registration process and copying the "firebaseConfig" object (also in Project Settings > Web apps > npm)
- Enter the credentials when prompted or by running
npx permagen --config
Created by Rohan Taneja