Files
actionbook__actionbook/packages/cli-v2/Cargo.toml
mcfn.feng 2f421b1dfa [packages/cli-v2]refactor: port setup to interactive wizard from actionbook-rs
Convert setup from a single-file sync implementation to a multi-module
interactive wizard matching the actionbook-rs design:

- setup/mod.rs: 4-step orchestrator (env detect → API key → browser → save)
  with welcome banner, spinners, re-run protection, and completion summary
- setup/theme.rs: dialoguer theme with ◉/○ radio-button style
- setup/detect.rs: environment detection (OS, browsers, Node, npx, existing config)
- setup/api_key.rs: interactive API key input (flag > env > config > prompt)
- setup/browser_cfg.rs: interactive browser mode selection (local/extension/cloud)

Config field renames with serde aliases for backward compatibility:
- api.base_url added
- browser.default_profile → browser.profile_name
- browser.executable → browser.executable_path

TODOs left for future PRs:
- API key server-side validation (requires ApiClient)
- Extension installer integration
- Health check step
- Skills installation step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:28:31 +08:00

72 lines
1.4 KiB
TOML

[package]
name = "actionbook-cli"
version = "1.0.0"
edition = "2024"
description = "Actionbook CLI - Browser automation for AI agents"
license = "MIT"
keywords = ["browser", "automation", "cdp", "cli"]
categories = ["command-line-utilities"]
[[bin]]
name = "actionbook"
path = "src/main.rs"
[lib]
name = "actionbook_cli"
path = "src/lib.rs"
[dependencies]
# CLI
clap = { version = "4", features = ["derive", "env"] }
# Async runtime
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "signal", "process", "net", "io-util", "sync"] }
# CDP WebSocket
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
futures-util = "0.3"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
# Error handling
thiserror = "2"
# HTTP (for Chrome CDP discovery endpoints)
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
# URL encoding
urlencoding = "2"
which = "8"
# Interactive UI
dialoguer = "0.11"
colored = "3"
indicatif = "0.17"
console = "0.15"
dirs = "6"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[dev-dependencies]
assert_cmd = "2"
tempfile = "3"
serde_json = "1"
[[test]]
name = "e2e"
path = "tests/e2e/main.rs"
harness = true
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true
panic = "abort"