Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@halo-dev/attachment-upload-cli

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@halo-dev/attachment-upload-cli

A CLI tool for uploading attachments to Halo.

latest
npmnpm
Version
1.2.0
Version published
Maintainers
2
Created
Source

Halo Attachment Upload CLI

npm npm

在 Terminal 中上传文件到 Halo 并得到链接,兼容 Typora 编辑器的图片上传。

asciicast

安装

npm install @halo-dev/attachment-upload-cli -g

安装完成之后,就可以在 Terminal 中使用 halo-attachment-upload 命令,或者 hau,以下使用 hau 为例。

配置

hau setup

其中,Personal Access Token 需要有附件管理的权限。

配置文件存储位置:~/.config/@halo-dev/attachment-upload-cli/config.json

上传文件

hau upload -f /path/to/file

在 Typora 中使用

  • 找到 Node 和 hau 的实际路径

    which node
    which hau
    
    # 以下为例子
    /opt/homebrew/opt/node@18/bin/node
    /opt/homebrew/bin/hau
    
  • 拼接上传命令

    /opt/homebrew/opt/node@18/bin/node /opt/homebrew/bin/hau upload -f
    
  • 打开 Typora 设置,进入 图像 -> 上传服务设定,将上传服务改为自定义命令,并将上面拼接的命令填入即可。

帮助

❯ hau --help
Usage: halo-attachment-upload|hau [options] [command]

Options:
  -V, --version       output the version number
  -h, --help          display help for command

Commands:
  upload|u [options]  Upload a file to Halo
  setup|s             Setup your Halo site url and personal access token
  help [command]      display help for command

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts