1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(name = "lobe", version, about = "Lobe — local HTTP performance observer")]
pub struct Cli {
#[arg(long, global = true)]
pub db: Option<PathBuf>,
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Probe {
url: String,
},
History {
target: Option<String>,
#[arg(short, long, default_value_t = 10)]
limit: usize,
},
Compare {
url: String,
#[arg(long, default_value_t = 40.0)]
threshold: f64,
},
Watch {
url: String,
#[arg(short, long, default_value_t = 5)]
interval: u64,
#[arg(long, default_value_t = 40.0)]
threshold: f64,
#[arg(long)]
count: Option<usize>,
#[arg(long)]
tui: bool,
},
Capture {
upstream: String,
#[arg(long, default_value = "127.0.0.1:7878")]
listen: String,
/// Auto-upload the session to your Lobe cloud on export.
/// Requires `lobe login` first.
#[arg(long)]
upload: bool,
},
/// Authorize this machine to sync sessions to your Lobe cloud.
Login {
/// Provide the token non-interactively (e.g. from CI).
#[arg(long)]
token: Option<String>,
/// Override the web URL used in the auth prompt.
/// Defaults to https://getlobe.dev.
#[arg(long)]
web_url: Option<String>,
/// Override the Convex API URL used for token verification and
/// uploads. Defaults to the shipped production URL.
#[arg(long)]
api_url: Option<String>,
},
Explain {
/// Path to a session JSON file produced by `lobe capture` (press `e`).
session: PathBuf,
/// Model to use. Defaults to Haiku 4.5 for cost. Use `--model sonnet` for a deeper pass.
#[arg(long, default_value = "haiku")]
model: String,
/// Write the markdown report to a file instead of stdout.
#[arg(short, long)]
output: Option<PathBuf>,
},
/// Install the lobe-diagnose skill into your AI editor of choice.
InstallSkill {
/// Target editor: `claude-code` or `cursor`.
target: String,
/// Install to your home dir (~/.claude or ~/.cursor) instead of the current project.
#[arg(long)]
global: bool,
/// Overwrite an existing skill file if present.
#[arg(long)]
force: bool,
},
}