介绍
# Alexandrie Skill
与 Alexandrie 笔记应用程序进行交互,网址为 https://notes.eth3rnit3.org
## 配置
- **API URL**: `https://api-notes.eth3rnit3.org/api` - **Frontend**: `https://notes.eth3rnit3.org` - **Username**: `eth3rnit3` - **User ID**: `671423603690045441` - **Password**: 存储在 `/home/eth3rnit3/clawd/.env` 中,键名为 `ALEXANDRIE_PASSWORD`
## 用法
使用 `alexandrie.sh` 脚本进行所有操作:
```bash /home/eth3rnit3/clawd/skills/alexandrie/alexandrie.sh <command> [args] ```
## 命令
### 身份验证 ```bash ./alexandrie.sh login # Login and get token ./alexandrie.sh logout # Logout ```
### 笔记 (节点) ```bash ./alexandrie.sh list # List all notes/categories ./alexandrie.sh get <nodeId> # Get a specific note with content ./alexandrie.sh search <query> # Search notes ./alexandrie.sh create <name> [content] [parentId] # Create a note ./alexandrie.sh update <nodeId> <name> [content] # Update a note ./alexandrie.sh delete <nodeId> # Delete a note ```
## 节点角色 - **role: 1** = 类别/工作区 (容器) - **role: 3** = 文档 (包含内容的笔记)
## 当前结构 - `671425872858841091` - **Perso** (类别) - `671426069886271492` - **Test** (文档)
## 示例
### 列出所有笔记 ```bash ./alexandrie.sh login ./alexandrie.sh list ```
### 读取笔记 ```bash ./alexandrie.sh get 671426069886271492 # Returns: "Salut, ceci est un **test**" ```
### 创建笔记 ```bash ./alexandrie.sh create "My Note" "# Title\n\nContent here" 671425872858841091 ```
### 搜索 ```bash ./alexandrie.sh search "test" ```
## API 参考
Base URL: `https://api-notes.eth3rnit3.org/api`
### 端点 - `POST /auth` - 登录 (body: `{"username": "...", "password": "..."}`) - `POST /auth/logout` - 登出 - `GET /nodes/user/:userId` - 列出用户的节点 - `GET /nodes/:nodeId` - 根据 ID 获取节点 (包含内容) - `GET /nodes/search?q=query` - 搜索节点 - `POST /nodes` - 创建节点 - `PUT /nodes/:nodeId` - 更新节点 - `DELETE /nodes/:nodeId` - 删除节点
### 身份验证 登录后,JWT 令牌存储在 cookies 中 (`/tmp/alexandrie_cookies.txt`)。