← 返回 Skills 市场
leeshunee

AList CLI (Cloud Storage CLI for AList)

作者 Kinema. · GitHub ↗ · v1.6.2 · MIT-0
cross-platform ⚠ suspicious
247
总下载
0
收藏
2
当前安装
16
版本数
在 OpenClaw 中安装
/install alist-cli
功能描述
AList file management CLI for OpenClaw. Supports upload, download, list, mkdir, rm, mv, search, url. Auth via environment variables with auto-refresh. Trigge...
使用说明 (SKILL.md)

AList CLI

AList file management CLI. Auth token managed via environment variables with auto-login and auto-refresh.

⚠️ Before First Use | 首次使用必读

首次使用此 skill 前,必须先读取 ONBOARDING.md 完成环境配置。

  • 环境不可用(命令不存在、依赖缺失、连接失败)→ 读取 ONBOARDING.md 按步骤排查修复
  • 首次配置 → 读取 ONBOARDING.md 完成 6 步配置
  • 配置完成后 → 直接使用下方 Run Commands

Environment Variables

Variable Required Description
ALIST_URL AList server URL (e.g. https://your-alist-server)
ALIST_USERNAME Login username
ALIST_PASSWORD Login password
ALIST_AUTH_TOKEN Auth token (auto-obtained via login, skip manual set)
ALIST_USER_INFO User info JSON (auto-obtained via login, skip manual set)

Run Commands

alist-cli \x3Ccommand> [args]

Commands

Command Description
login [username] [password] Login (outputs export statements to source)
ls [path] List files
get \x3Cpath> Get file info + all URLs
url \x3Cpath> Get preview/download URLs for file or folder
mkdir \x3Cpath> Create folder
upload \x3Clocal> \x3Cremote> Upload file (outputs preview + download URL)
rm \x3Cpath> Delete file
mv \x3Csrc> \x3Cdst> Move file
search \x3Ckeyword> [path] Search files
whoami Current user info

Upload Behavior | 上传行为

上传前必须判断文件用途,选择正确的目标路径:

判断规则

场景 目标路径 说明
外部访问(分享给他人、公开文件) /public/... Guest 可见,预览和下载链接无需登录
内部使用(个人文件、工具输出、临时文件) /private/storage/... 需要登录才能访问

如何判断:

  1. 用户明确说"分享给 XX"、"发给别人"、"外部" → /public/
  2. 用户说"内部"、"私有"、"自己看"、"备份" → /private/storage/
  3. 用户未说明 → 必须询问文件用途
  4. 批量上传多个文件到同一个目标 → 可以创建新文件夹整理
  5. 单个文件 → 一般直接上传到已有目录,不新建文件夹(除非用户指定或目标目录为空)

文件夹创建规则

  • ❌ 不要随意创建新文件夹
  • ✅ 用户明确要求时才创建
  • ✅ 批量上传且目标目录为空时,可以创建子文件夹
  • ✅ 用户指定路径时,自动创建(mkdir -p 行为由 API 保证)

URL Rules

AList 文件有两种链接:

1. 预览链接

{ALIST_URL}{path}
  • 从 raw_url 去掉 /p 前缀和 ?sign=xxx 参数
  • 内部文件/private/):需要 AList 登录态才能预览
  • 外部文件/public/):无需登录即可预览
  • 例: https://cloud.example.com/public/docs/notes.md

2. 下载直链

API 返回的 raw_url 字段(包含 /p/ 前缀和 ?sign 签名)
  • 直接下载文件,无需登录,curl/wget 可用
  • 签名有时效性,过期后需重新通过 API 获取
  • 例: https://cloud.example.com/p/public/docs/notes.md?sign=abc123=:0
  • 分享文件时优先使用此链接

Directory Structure | 目录结构

/ (root)
├── public/        ← 外部访问(guest 挂载点)
│   └── ...
└── private/       ← 内部文件(需登录)
    └── storage/   ← 用户存储
        └── ...

Path Mapping

user_path (用户输入)  →  real_path (AList API 使用)
/public/docs/a.md    →  /public/docs/a.md       (外部)
/private/storage/a   →  /private/storage/a       (内部)
  • base_path 通过登录自动获取(/api/me 接口),当前为 /
  • 预览链接基于 real_path(去掉 /p?sign
  • 下载直链使用 API 返回的 raw_url

Auth Behavior

  • Auto-login: Script checks ALIST_AUTH_TOKEN on startup. If missing, auto-logins with ALIST_USERNAME + ALIST_PASSWORD.
  • Auto-refresh: If API returns 401, automatically re-logins and retries.
  • Manual login: alist login command outputs export statements. User should eval $(alist login) or manually source them.

References

  • references/openapi.json - AList API specification
安全使用建议
This package appears to be a legitimate AList CLI, but there are a few red flags to consider before installing: - Metadata mismatch: The registry entry lists no required env vars, yet SKILL.md and the script require ALIST_URL, ALIST_USERNAME, and ALIST_PASSWORD. Confirm this omission with the publisher before trusting the package. - Avoid storing plaintext credentials: ONBOARDING.md suggests echoing username/password exports into ~/.bashrc. Do NOT store your ALIST_PASSWORD in a global shell rc file. Prefer running the CLI in a temporary session (export vars per-session), use a secrets manager, or use a container/VM. - Prefer isolated installs: Instead of running sudo pip or modifying system Python, use a Python virtualenv or a container so installation can't affect the host. The repo lists only 'requests' as a dependency, which is reasonable. - Review the code and server trust: Inspect scripts/alist_cli.py (already included) to verify endpoints; ensure the ALIST_URL you use is a trusted server (the CLI will send username/password there and will auto-login/refresh tokens). - Be cautious with sudo and symlink steps: If you must create a command shortcut, consider using a user-local bin directory or an alias rather than writing to /usr/local/bin with sudo. If you don't trust the publisher or can't avoid persisting credentials, run the skill in an isolated environment (container or throwaway VM) and/or ask the publisher to update the registry metadata to declare the required environment variables and to provide safer installation guidance.
功能分析
Type: OpenClaw Skill Name: alist-cli Version: 1.6.2 The skill is a functional and well-documented CLI tool for managing files on an AList server. It implements standard operations such as listing, uploading, and moving files via the AList API (scripts/alist_cli.py). Authentication is handled via environment variables, and credentials are only sent to the user-configured AList URL. The instructions in SKILL.md and ONBOARDING.md are transparent, providing the AI agent with clear operational logic and setup steps (including dependency installation and path mapping) without any evidence of prompt injection, data exfiltration, or hidden malicious intent.
能力评估
Purpose & Capability
The skill's name/description and the included script implement an AList file-management CLI and the required APIs (login, fs ops) are consistent with that purpose. However, the registry metadata declares no required environment variables or primary credential even though SKILL.md and the script clearly require ALIST_URL, ALIST_USERNAME, and ALIST_PASSWORD — an inconsistency that should be resolved.
Instruction Scope
SKILL.md and ONBOARDING.md instruct the user/agent to install Python deps, create a symlink into /usr/local/bin (using sudo), and persist credentials by echoing exports into shell rc files. Those instructions go beyond simply invoking the API (they modify shell configuration and require elevated install steps), and they encourage storing plaintext passwords in persistent shell config.
Install Mechanism
There is no formal install spec in registry metadata, but the repo includes a Python script and a simple requirements.txt (requests). The onboarding recommends pip installs and optional venv usage and offers fallback steps. No network downloads from unknown hosts or obfuscated installers are present in the files provided.
Credentials
The script legitimately needs ALIST_URL, ALIST_USERNAME, and ALIST_PASSWORD to authenticate to an AList server — those are proportionate to the stated task. However, the package metadata fails to declare them, and the onboarding encourages persisting credentials (including password) in shell rc files, which is a security risk. The script also sets ALIST_AUTH_TOKEN/ALIST_USER_INFO in the process environment (prints exports), which is expected but sensitive.
Persistence & Privilege
The skill does not request always:true and does not autonomously modify other skills. The onboarding suggests creating a symlink under /usr/local/bin (requires sudo) and writing exports into ~/.bashrc, which increases system persistence and requires elevated privileges if followed; this is an install-time concern rather than a runtime permission requested by the skill manifest.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alist-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alist-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.6.2
Simplify CLI command to alist-cli (direct mapping, no python needed)
v1.6.1
Add Author, Organization and GitHub repository links to SKILL.md
v1.6.0
Add ONBOARDING.md, upload routing (public/private), fix base_path=/
v1.5.0
Add upload routing (public/private), fix base_path=/ double slash, document directory structure
v1.4.0
Add url command, fix URL generation (preview + download), document URL rules
v1.1.3
README 添加 ClawHub 安装链接
v1.1.2
version sync
v1.1.1
Remove hardcoded default server, fix install, add requirements.txt
v1.0.4
fix: base_path handling
v1.0.1
fix: 正确处理 AList 用户的 base_path - 登录后自动获取并保存用户的 base_path - 用户路径自动转换为实际路径(添加 base_path 前缀) - 显示路径时转换为用户视角(去掉 base_path 前缀) - alist whoami/upload/get/search 都正确显示路径信息
v1.2.3
No changes detected in this version. - Version 1.2.3 introduces no updates or modifications to the skill files.
v1.2.2
- Added a displayName ("AList CLI (Self-hosted, Cloud File Storage)") to improve identification and clarity. - No changes to commands or usage instructions.
v1.2.1
## alist-cli 1.2.1 Changelog - No user-facing changes detected in this version. - Documentation, features, and commands remain unchanged.
v1.2.0
- Streamlined documentation and descriptions for easier reading. - Updated environment variable setup instructions. - Simplified and clarified command usage summaries. - Removed duplicate or verbose sections, focusing on core features and usage. - Updated references for better project navigation.
v1.1.0
AList-CLI 1.1.0 brings improved documentation and feature visibility. - Added detailed usage instructions and examples for all CLI commands. - Expanded feature list and descriptions in SKILL.md. - Provided configuration steps for environment setup. - Included project structure and license information. - Enhanced bilingual support in documentation (English/Chinese).
v1.0.0
Initial release of the alist-cli skill. - Adds support for file management via AList API v3, including upload, download, preview, and directory operations. - Provides detailed setup instructions for configuring AList service connection and authentication. - Documents core API endpoints for authentication, file system operations, public access, and admin features. - Includes command usage examples and ready-to-use curl and Python code samples. - Lists environment variable configuration and error code meanings. - Links to official AList documentation and OpenAPI reference.
元数据
Slug alist-cli
版本 1.6.2
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 16
常见问题

AList CLI (Cloud Storage CLI for AList) 是什么?

AList file management CLI for OpenClaw. Supports upload, download, list, mkdir, rm, mv, search, url. Auth via environment variables with auto-refresh. Trigge... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 247 次。

如何安装 AList CLI (Cloud Storage CLI for AList)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alist-cli」即可一键安装,无需额外配置。

AList CLI (Cloud Storage CLI for AList) 是免费的吗?

是的,AList CLI (Cloud Storage CLI for AList) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

AList CLI (Cloud Storage CLI for AList) 支持哪些平台?

AList CLI (Cloud Storage CLI for AList) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 AList CLI (Cloud Storage CLI for AList)?

由 Kinema.(@leeshunee)开发并维护,当前版本 v1.6.2。

💬 留言讨论