A tool for picture uploading
npm install picgo---
!standard
!GitHub

!npm

!node
A tool for picture uploading. Both CLI & api supports. It also supports plugin system, please check Awesome-PicGo to find powerful plugins.
Typora supports PicGo-Core natively. If you like PicGo-Core and have time, welcome to help me translate the documentation of PicGo-Core into English.
PicGo requires Node.js >= 20.19.0 or >= 22.12.0. For older PicGo versions (<= v1.5.x), Node.js >= 16 is sufficient. Cause we need the stability of ES Module support.
``bash
npm install picgo -g
yarn global add picgo
`
`bash
npm install picgo -D
yarn add picgo -D
`
> PicGo uses SM.MS as the default upload pic-bed.
Show help:
`bash
$ picgo -h
Usage: picgo [options] [command]
Options:
-v, --version output the version number
-d, --debug debug mode
-s, --silent silent mode
-c, --config
-p, --proxy
-h, --help display help for command
Commands:
install|add [options]
uninstall|rm
update [options]
set
upload|u [input...] upload, go go go
use [module] [name] [configName] use module (uploader/transformer/plugin) of picgo
i18n [lang] change picgo language
uploader manage uploader configurations
server [options] run PicGo as a standalone server
login [token] login to cloud.picgo.app
logout logout from cloud.picgo.app
help [command] display help for command
`
#### Upload a picture from path
`bash`
picgo upload /xxx/xx/xx.jpg
#### Upload a picture from clipboard
> picture from clipboard will be converted to png
`bash`
picgo upload
Thanks to vs-picgo && Spades-S for providing the method to upload picture from clipboard.
#### Run as a server
`bash`
picgo server -p 36677 -h 127.0.0.1
#### Login to PicGo Cloud
`bash`
picgo loginor
picgo login
#### Logout from PicGo Cloud
`bash`
picgo logout
#### Manage uploader configs
Since v1.8.0, PicGo-Core supports multiple configurations per uploader. Just like the configuration of the Electron version of PicGo.
You can use picgo set uploader to configure different uploader configurations.
And you can use picgo use uploader to switch between different uploader configurations.
For example:
`bash
picgo set uploader github Test
picgo use uploader github Test
`
For more details, you can use picgo uploader -h to check the help of uploader management:
`bash
Usage: picgo uploader [options] [command]
Options:
-h, --help display help for command
Commands:
list [type] list uploader configurations
rename
copy
rm
`
#### Init a picgo plugin template
Note: the plugin's template initializer has moved to the standalone picgo-init package.
You can use the following command to init a picgo plugin template:
`bash`
npx picgo-init plugin
#### Common JS
`js`
const { PicGo } = require('picgo')
#### ES Module
`js`
import { PicGo } from 'picgo'
#### API usage example
`js
const picgo = new PicGo()
// upload a picture from path
picgo.upload(['/xxx/xxx.jpg'])
// upload a picture from clipboard
picgo.upload()
``
For more details, you can checkout documentation.