Outlit CLI
Customer intelligence from the terminal. Install: INLINECODE0
All commands support --help for full option details.
Command Reference
| Command | Purpose |
|---|
| INLINECODE2 | Store API key (interactive or --key for CI) |
| INLINECODE4 |
Remove stored key |
|
outlit auth status | Validate current key |
|
outlit auth whoami | Print masked key (for scripting) |
|
outlit auth signup | Open signup in browser |
|
outlit customers list | List/filter customers with risk signals |
|
outlit customers get <id\|domain> | Customer details with optional
--include users,revenue,recentTimeline,behaviorMetrics |
|
outlit customers timeline <id\|domain> | Activity timeline with channel/event filters |
|
outlit users list | List/filter users across customers |
|
outlit facts <customer> | Signals and insights for a customer |
|
outlit search '<query>' | Natural language search across customer context |
|
outlit sql '<query>' | SQL against analytics DB (or
--query-file) |
|
outlit schema [table] | Describe analytics tables and columns |
|
outlit setup | Auto-detect and configure AI agents |
|
outlit setup <agent> | Configure specific agent:
cursor,
claude-code,
claude-desktop,
vscode,
gemini,
openclaw |
|
outlit doctor | Diagnose CLI version, auth, connectivity, agents |
|
outlit completions <shell> | Generate shell completions (bash/zsh/fish) |
Authentication
API key format: ok_ + 32+ alphanumeric characters.
Credential priority (first match wins):
- 1.
--api-key flag - INLINECODE30 env var
- INLINECODE31 (written by
outlit auth login)
Quick auth for CI/scripts:
CODEBLOCK0
Output Behavior
- - Interactive terminal: Pretty tables with colors
- Piped stdout: Automatic JSON (no flag needed)
--json flag: Force JSON in any context
This means outlit customers list | jq '.items[].domain' just works.
SQL Tables
Available in outlit sql and outlit schema:
| Table | Contains |
|---|
| INLINECODE37 | All tracked events |
| INLINECODE38 |
Customer attributes and metrics |
|
user_dimensions | User attributes and journey stages |
|
mrr_snapshots | Revenue over time |
Always run outlit schema first to discover columns before writing SQL.
Common Filters
Most list commands share these filters (check --help for specifics):
- - INLINECODE43
- INLINECODE44 / INLINECODE45
- INLINECODE46 / INLINECODE47
- INLINECODE48
- INLINECODE49 /
--cursor <token> for pagination - INLINECODE51 / INLINECODE52
Common Patterns
At-risk paying customers:
CODEBLOCK1
High-value customer details:
CODEBLOCK2
Search for churn signals:
CODEBLOCK3
Revenue query:
CODEBLOCK4
Setup all detected agents at once:
CODEBLOCK5
Outlit CLI
从终端获取客户情报。安装:npm i -g @outlit/cli
所有命令均支持 --help 查看完整选项详情。
命令参考
| 命令 | 用途 |
|---|
| outlit auth login | 存储API密钥(交互式或使用 --key 用于CI) |
| outlit auth logout |
移除已存储的密钥 |
| outlit auth status | 验证当前密钥 |
| outlit auth whoami | 打印脱敏密钥(用于脚本编写) |
| outlit auth signup | 在浏览器中打开注册页面 |
| outlit customers list | 列出/筛选带有风险信号的客户 |
| outlit customers get
| 客户详情,可选 --include users,revenue,recentTimeline,behaviorMetrics |
| outlit customers timeline | 活动时间线,支持渠道/事件筛选 |
| outlit users list | 跨客户列出/筛选用户 |
| outlit facts | 客户信号和洞察 |
| outlit search | 跨客户上下文的自然语言搜索 |
| outlit sql | 对分析数据库执行SQL(或使用 --query-file) |
| outlit schema [table] | 描述分析表及列 |
| outlit setup | 自动检测并配置AI代理 |
| outlit setup | 配置特定代理:cursor、claude-code、claude-desktop、vscode、gemini、openclaw |
| outlit doctor | 诊断CLI版本、认证、连接、代理 |
| outlit completions | 生成shell补全(bash/zsh/fish) |
认证
API密钥格式:ok_ + 32个及以上字母数字字符。
凭据优先级(首个匹配项生效):
- 1. --api-key 标志
- OUTLITAPIKEY 环境变量
- ~/.config/outlit/credentials.json(由 outlit auth login 写入)
CI/脚本快速认证:
bash
outlit auth login --key okyourkey_here
或
export OUTLITAPIKEY=okyourkey_here
输出行为
- - 交互式终端: 带颜色的美观表格
- 管道输出: 自动JSON(无需标志)
- --json 标志: 在任何上下文中强制输出JSON
这意味着 outlit customers list | jq .items[].domain 可以直接使用。
SQL表
在 outlit sql 和 outlit schema 中可用:
| 表 | 包含内容 |
|---|
| events | 所有跟踪的事件 |
| customer_dimensions |
客户属性和指标 |
| user_dimensions | 用户属性和旅程阶段 |
| mrr_snapshots | 随时间变化的收入 |
在编写SQL之前,始终先运行 outlit schema 来发现列。
常用筛选器
大多数列表命令共享以下筛选器(查看 --help 了解详情):
- - --billing-status PAYING|TRIALING|CHURNED|NONE
- --no-activity-in 7d|14d|30d|90d / --has-activity-in
- --mrr-above / --mrr-below
- --search
- --limit <1-100> / --cursor 用于分页
- --order-by / --order-direction asc|desc
常用模式
有风险的付费客户:
bash
outlit customers list --billing-status PAYING --no-activity-in 30d
高价值客户详情:
bash
outlit customers get acme.com --include users,revenue,behaviorMetrics
搜索流失信号:
bash
outlit search complaints about pricing --customer acme.com
收入查询:
bash
outlit sql SELECT customerid, mrrcents FROM mrrsnapshots ORDER BY mrrcents DESC LIMIT 10
一次性设置所有检测到的代理:
bash
outlit setup --yes