📊 Segment
Segment — manage sources, destinations, events, and tracking plans via Config & Tracking APIs
Requirements
| Variable | Required | Description |
|---|
| INLINECODE0 | ✅ | Config API token |
| INLINECODE1 |
✅ | Source write key |
Quick Start
CODEBLOCK0
All Commands
| Command | Description |
|---|
| INLINECODE2 | List sources |
| INLINECODE3 |
Get source |
|
source-create | Create source |
|
source-delete | Delete source |
|
destinations | List destinations |
|
destination-get | Get destination |
|
warehouses | List warehouses |
|
catalog-sources | List source catalog |
|
catalog-destinations | List destination catalog |
|
tracking-plans | List tracking plans |
|
tracking-plan-get | Get tracking plan |
|
spaces | List spaces |
|
functions | List functions |
|
track | Send track event |
|
identify | Send identify |
Output Format
All commands output JSON by default. Add --human for readable formatted output.
CODEBLOCK1
Script Reference
| Script | Description |
|---|
| INLINECODE18 | Main CLI — all commands in one tool |
Credits
Built by
M. Abidi |
agxntsix.ai
YouTube |
GitHub
Part of the
AgxntSix Skill Suite for OpenClaw agents.
📅 Need help setting up OpenClaw for your business? Book a free consultation
📊 Segment
Segment — 通过配置与跟踪API管理数据源、目标、事件及跟踪计划
环境要求
| 变量名 | 是否必需 | 描述 |
|---|
| SEGMENTACCESSTOKEN | ✅ | 配置API令牌 |
| SEGMENTWRITEKEY |
✅ | 数据源写入密钥 |
快速开始
bash
列出数据源
python3 {{baseDir}}/scripts/segment.py sources
获取数据源
python3 {{baseDir}}/scripts/segment.py source-get id
创建数据源
python3 {{baseDir}}/scripts/segment.py source-create --name --catalog_name
删除数据源
python3 {{baseDir}}/scripts/segment.py source-delete id
列出目标
python3 {{baseDir}}/scripts/segment.py destinations
获取目标
python3 {{baseDir}}/scripts/segment.py destination-get id
列出数据仓库
python3 {{baseDir}}/scripts/segment.py warehouses
列出数据源目录
python3 {{baseDir}}/scripts/segment.py catalog-sources
全部命令
| 命令 | 描述 |
|---|
| sources | 列出数据源 |
| source-get |
获取数据源 |
| source-create | 创建数据源 |
| source-delete | 删除数据源 |
| destinations | 列出目标 |
| destination-get | 获取目标 |
| warehouses | 列出数据仓库 |
| catalog-sources | 列出数据源目录 |
| catalog-destinations | 列出目标目录 |
| tracking-plans | 列出跟踪计划 |
| tracking-plan-get | 获取跟踪计划 |
| spaces | 列出空间 |
| functions | 列出函数 |
| track | 发送跟踪事件 |
| identify | 发送识别信息 |
输出格式
所有命令默认输出JSON格式。添加 --human 参数可获取可读性更好的格式化输出。
bash
python3 {{baseDir}}/scripts/segment.py --human
脚本参考
| 脚本 | 描述 |
|---|
| {{baseDir}}/scripts/segment.py | 主命令行工具 — 集成所有命令 |
致谢
由 M. Abidi 构建 | agxntsix.ai
YouTube | GitHub
属于面向OpenClaw代理的 AgxntSix技能套件 的一部分。
📅 需要为您的企业设置OpenClaw? 预约免费咨询