{"id":13525445,"url":"https://github.com/halo-sigs/attachment-upload-cli","last_synced_at":"2025-04-12T14:41:54.149Z","repository":{"id":168095614,"uuid":"643234776","full_name":"halo-sigs/attachment-upload-cli","owner":"halo-sigs","description":"Attachment Upload CLI - 支持在 Terminal 中上传文件到 Halo 并得到链接，兼容 Typora 编辑器的图片上传。","archived":false,"fork":false,"pushed_at":"2024-12-17T13:41:52.000Z","size":94,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T09:57:20.802Z","etag":null,"topics":["cli","halo","node-cli","typora"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halo-sigs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-20T14:18:26.000Z","updated_at":"2024-12-17T13:41:56.000Z","dependencies_parsed_at":"2023-11-21T16:43:30.553Z","dependency_job_id":"f84f8af6-c3cb-40c2-905f-bf5eeb1feb53","html_url":"https://github.com/halo-sigs/attachment-upload-cli","commit_stats":null,"previous_names":["halo-sigs/attachment-upload-cli"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halo-sigs%2Fattachment-upload-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halo-sigs%2Fattachment-upload-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halo-sigs%2Fattachment-upload-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halo-sigs%2Fattachment-upload-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halo-sigs","download_url":"https://codeload.github.com/halo-sigs/attachment-upload-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248582933,"owners_count":21128475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","halo","node-cli","typora"],"created_at":"2024-08-01T06:01:18.783Z","updated_at":"2025-04-12T14:41:54.124Z","avatar_url":"https://github.com/halo-sigs.png","language":"JavaScript","funding_links":[],"categories":["Halo 2.0"],"sub_categories":["其他"],"readme":"# Halo Attachment Upload CLI\n\n\u003cp\u003e\n\u003ca href=\"https://www.npmjs.com/package/@halo-dev/attachment-upload-cli\" target=\"__blank\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@halo-dev/attachment-upload-cli?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@halo-dev/attachment-upload-cli\" target=\"__blank\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dm/@halo-dev/attachment-upload-cli?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e 在 Terminal 中上传文件到 Halo 并得到链接，兼容 Typora 编辑器的图片上传。\n\n[![asciicast](https://asciinema.org/a/NVnIamnx3WrQNnDSOHKLDqDic.svg)](https://asciinema.org/a/NVnIamnx3WrQNnDSOHKLDqDic)\n\n## 安装\n\n```bash\nnpm install @halo-dev/attachment-upload-cli -g\n```\n\n安装完成之后，就可以在 Terminal 中使用 `halo-attachment-upload` 命令，或者 `hau`，以下使用 `hau` 为例。\n\n## 配置\n\n```bash\nhau setup\n```\n\n\u003e 配置文件存储位置：`~/.config/@halo-dev/attachment-upload-cli/config.json`\n\n## 上传文件\n\n```bash\nhau upload -f /path/to/file\n```\n\n## 在 Typora 中使用\n\n1. 找到 Node 和 hau 的实际路径\n\n    ```bash\n    which node\n    which hau\n\n    # 以下为例子\n    /opt/homebrew/opt/node@18/bin/node\n    /opt/homebrew/bin/hau\n    ```\n\n2. 拼接上传命令\n\n    ```bash\n    /opt/homebrew/opt/node@18/bin/node /opt/homebrew/bin/hau upload -f\n    ```\n\n3. 打开 Typora 设置，进入 **图像 -\u003e 上传服务设定**，将上传服务改为自定义命令，并将上面拼接的命令填入即可。\n\n## 帮助\n\n```bash\n❯ hau --help\nUsage: halo-attachment-upload|hau [options] [command]\n\nOptions:\n  -V, --version       output the version number\n  -h, --help          display help for command\n\nCommands:\n  upload|u [options]  Upload a file to Halo\n  setup|s             Setup your Halo site url, username and password\n  help [command]      display help for command\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalo-sigs%2Fattachment-upload-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalo-sigs%2Fattachment-upload-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalo-sigs%2Fattachment-upload-cli/lists"}