Xpersona
A

AList CLI (Cloud Storage CLI for AList)

CLAWHUB · Unverified

AList file management CLI for AI agents including Codex, Claude Code, and OpenClaw. Supports upload, download, list, mkdir, rm, mv, search, url. Auth via env...

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1782xm9gtwjg6m1vnxsad9zc583qs9v:alist-cli
  1. Install using `clawhub skill install s1782xm9gtwjg6m1vnxsad9zc583qs9v:alist-cli` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/leeshunee/alist-cli before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-alist-cli/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

125,986 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: alist-cli
displayName: "AList CLI (Cloud Storage CLI for AList)"
version: 1.7.0
description: |
  AList file management CLI for AI agents including Codex, Claude Code, and OpenClaw. Supports upload, download, list, mkdir, rm, mv, search, url.
  Auth via environment variables with auto-refresh. Trigger: file management, AList operations, upload/download.
---

# AList CLI

- **Author**: [LeeShunEE](https://github.com/LeeShunEE)
- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)
- **GitHub**: https://github.com/KinemaClawWorkspace/alist-cli

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

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

**首次使用此 skill 前,必须先读取 [references/ONBOARDING.md](references/ONBOARDING.md) 完成环境配置。**

- **环境不可用**(命令不存在、依赖缺失、连接失败)→ 读取 [references/ONBOARDING.md](references/ONBOARDING.md) 按步骤排查修复
- **首次配置** → 读取 [references/ONBOARDING.md](references/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

```bash
alist-cli <command> [args]
```

### Commands

| Command | Description |
|---------|-------------|
| `login [username] [password]` | Login (outputs export statements to source) |
| `ls [path]` | List files |
| `get <path>` | Get file info + all URLs |
| `url <path>` | Get preview/download URLs for file or folder |
| `mkdir <path>` | Create folder |
| `upload <local> <remote>` | Upload file (outputs preview + download URL) |
| `rm <path>` | Delete file |
| `mv <src> <dst>` | Move file |
| `search <keyword> [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 签名)
```

- 直接下载文件

README.md

# AList CLI

基于 AList API 的文件管理 CLI 工具,支持上传、下载、搜索、直链获取,认证令牌自动管理。

## 功能

- 文件上传/下载
- 文件列表浏览
- 创建文件夹、删除、移动文件
- 文件搜索
- 获取文件预览链接和下载直链
- 自动登录认证 + 令牌自动刷新

## 适用场景

- 通过对话管理 AList 云存储文件
- 上传文件并获取分享链接
- 搜索和浏览远程存储

## 使用方式

本 skill 支持 Codex、Claude Code 和 OpenClaw,安装后可通过对话触发:

```
上传这个文件到云存储
帮我看看 /public/docs 下有什么文件
搜索一下 xxx 相关的文件
把文件分享给别人
```

首次使用需完成 [references/ONBOARDING.md](references/ONBOARDING.md) 配置(设置环境变量和安装脚本)。

## Codex 安装

```powershell
codex plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace.git
codex plugin add alist-cli@kinema-skills-marketplace
```

安装后新开一个 Codex 对话。Codex 插件本身不需要 Node.js;运行 AList CLI 需要 Python 3 和 `requests`。

## 命令列表

| 命令 | 说明 |
|------|------|
| `login` | 登录认证 |
| `ls [path]` | 列出文件 |
| `upload <local> <remote>` | 上传文件 |
| `get <path>` | 获取文件信息 |
| `url <path>` | 获取预览/下载链接 |
| `mkdir <path>` | 创建文件夹 |
| `rm <path>` | 删除文件 |
| `mv <src> <dst>` | 移动文件 |
| `search <keyword>` | 搜索文件 |
| `whoami` | 当前用户 |

## 项目结构

```
alist-cli/
├── .claude-plugin/plugin.json
├── .codex-plugin/plugin.json
├── skills/alist-cli/SKILL.md
├── SKILL.md
├── scripts/
│   └── alist_cli.py
└── references/
    ├── ONBOARDING.md
    └── openapi.json
```

## 作者

- **Author**: [LeeShunEE](https://github.com/LeeShunEE)
- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)

## 许可证

[GNU General Public License v3.0](LICENSE)

_meta.json

{
  "ownerId": "kn7cjsf9pc9x1tmreq1dahs90s83p9y0",
  "slug": "alist-cli",
  "version": "1.7.0",
  "publishedAt": 1784192230610
}

references/ONBOARDING.md

# AList CLI Onboarding

> 本文档指导 AI Agent 完成首次环境配置。按顺序执行,遇到问题时参考 Troubleshooting。

## Prerequisites | 前置条件

- Python 3.x(容器通常自带,运行 `python3 --version` 确认)
- 网络可访问目标 AList 服务器

> Windows/Codex:以下 `python3` 可替换为 `python`。不需要创建全局 symlink,可直接运行 `python <plugin_root>/scripts/alist_cli.py <command>`。

## Step 1: 检查 Python 环境

```bash
python3 --version
```

如果不存在,尝试:
```bash
python --version
# 或
which python3 || which python
```

如果完全没有 Python,告知用户需要安装 Python 3。

## Step 2: 安装依赖

检查 `requests` 是否可用:
```bash
python3 -c "import requests" 2>/dev/null && echo "OK" || echo "NEED_INSTALL"
```

如果需要安装,按顺序尝试:

```bash
# 尝试 1: uv(最快)
uv pip install --system requests 2>/dev/null && echo "OK"

# 尝试 2: pip
pip3 install requests 2>/dev/null && echo "OK"

# 尝试 3: sudo pip(PEP 668 限制时)
sudo pip3 install --break-system-packages requests 2>/dev/null && echo "OK"

# 尝试 4: venv(隔离环境,不会污染系统)
SKILL_DIR="<skill_dir>"
cd "$SKILL_DIR" && uv venv .venv && .venv/bin/pip install requests
# 注意:使用 venv 时所有后续命令需用 .venv/bin/python 替代 python3
```

安装后验证:
```bash
python3 -c "import requests; print('OK')"
```

## Step 3: 创建命令别名

如果未创建 `alist-cli` 命令(检查 `which alist-cli`),创建 symlink:

```bash
# 确认脚本有执行权限
chmod +x <skill_dir>/scripts/alist_cli.py

# 创建 symlink 到 PATH 目录
sudo ln -sf <skill_dir>/scripts/alist_cli.py /usr/local/bin/alist-cli

# 验证
alist-cli --help
```

如果无 sudo 权限,可用 alias 替代:
```bash
alias alist-cli="python3 <skill_dir>/scripts/alist_cli.py"
```

Windows PowerShell 可直接调用:

```powershell
python "<plugin_root>\scripts\alist_cli.py" --help
```

## Step 4: 配置环境变量

检查现有配置:
```bash
echo $ALIST_URL
echo $ALIST_USERNAME
echo $ALIST_PASSWORD
```

| 变量 | 说明 | 如何获取 |
|------|------|---------|
| `ALIST_URL` | AList 服务器地址 | 用户提供,如 `https://cloud.example.com` |
| `ALIST_USERNAME` | 登录用户名 | 用户提供 |
| `ALIST_PASSWORD` | 登录密码 | 用户提供 |

**重要**:如果环境变量未设置,**必须询问用户提供**这三个值。不要猜测或使用默认值。

设置方式(选一种):
```bash
# 临时(当前 session)
export ALIST_URL="https://..."
export ALIST_USERNAME="xxx"
export ALIST_PASSWORD="xxx"

# 持久化(写入 shell 配置)
echo 'export ALIST_URL="https://..."' >> ~/.bashrc
echo 'export ALIST_USERNAME="xxx"' >> ~/.bashrc
echo 'export ALIST_PASSWORD="xxx"' >> ~/.bashrc
source ~/.bashrc
```

Windows PowerShell 当前会话:

```powershell
$env:ALIST_URL = "https://..."
$env:ALIST_USERNAME = "<username>"
$env:ALIST_PASSWORD = "<password>"
```

密码和 token 不得写入仓库。Agent 未获用户明确同意时,不把密码追加到 shell profile 或其他持久化配置。

## Step 5: 验证连接

```bash
alist-cli whoami
```

期望输出:
```
用户: <username>
ID: <id>
根目录 (base_path): /
```

如果输出 `❌ 请设置 ALIST_URL 环境变量` → 回到 Step 4
如果输出 `❌ 登录失败` → 检查用户名密码,回到 Step 4
如果输出 `❌ 未认证` → 环境变量已设置但 token 过期,尝试 `alist-cli login` 或检查 ALIST_USERNAME/PASSWORD

## Step 6: 确认目录结构

```bash
alist-cli ls /
alist-cli ls /private
alist-cli ls /public
```

期望看到:
```
/ → private, public
/private → storage (或其他子目录)
/public → (公开目录内容)
```

## Onboarding 完成

skill-card.md

## Description:

AList CLI provides file-management commands for AI agents to upload, download, list, create, delete, move, search, and retrieve URLs for files on an AList server.

This skill is ready for commercial/non-commercial use.

## Publisher:

[leeshunee](https://clawhub.ai/user/leeshunee)

### License/Terms of Use:

GNU General Public License v3.0

## Use Case:

Developers and agent users use this skill to manage files on a configured AList cloud storage server through conversational workflows, including upload, download, browsing, search, sharing-link retrieval, folder creation, deletion, and move operations.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The security verdict is suspicious because setup and login guidance can expose credentials or encourage risky shell handling.

Mitigation: Use only trusted HTTPS AList servers, avoid eval or source of login output, and keep ALIST_PASSWORD out of shell startup files unless the user explicitly approves persistent storage.

Risk: The skill can delete or move files on the connected AList server.

Mitigation: Require explicit user confirmation before rm or mv operations and restate the source and destination paths before running the command.

Risk: Installing dependencies or command aliases can modify the host environment.

Mitigation: Prefer a virtual environment or direct script path, and avoid privileged installation steps unless the user explicitly requests them.

## Reference(s):

- [AList CLI onboarding](references/ONBOARDING.md)
- [AList API specification](references/openapi.json)
- [AList CLI source repository](https://github.com/KinemaClawWorkspace/alist-cli)
- [AList CLI ClawHub page](https://clawhub.ai/leeshunee/skills/alist-cli)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with shell commands and CLI text output]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May include AList paths, file metadata, preview URLs, download URLs, and environment-variable setup guidance.]

## Skill Version(s):

1.7.0 (source: frontmatter and server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to AList CLI (Cloud Storage CLI for AList) and adjacent AI workflows.