feat: add uteke onboard β interactive onboarding wizard#696
feat: add uteke onboard β interactive onboarding wizard#696gnoviawan wants to merge 5 commits into
uteke onboard β interactive onboarding wizard#696Conversation
Guides new users from zero to productive in one command: - Detects install (binary on PATH, existing store) - Asks which AI agent they use (Hermes/Claude/Cursor/Pi/OpenCode) - Picks integration mode (tool vs memory-provider) - Toggles features on/off (Aging, Auto-maintenance, Graph rerank, Salience/Recency boost, Server mode) - Writes uteke.toml config with selections - Runs uteke init with selected agent automatically - Prints a full feature showcase (all commands grouped by category) Non-interactive mode: uteke onboard --yes --agent hermes --namespace default Docs updated: getting-started.md, cli-reference.md, AGENT.md, CHANGELOG.md New dep: which crate for PATH detection
Add a prominent "π Onboarding" section right after install, before "Why Uteke?". Includes an agent-readable callout so when a user drops the GitHub link to an AI agent (Hermes, Claude, etc.), the agent reads the README and knows to run `uteke onboard.
There was a problem hiding this comment.
Code Review: uteke onboard PR #696
Overall: good feature, well-structured code, clean separation. CI all green. But there are issues to address before merge.
π΄ Must Fix
1. AGENT.md schema version is wrong (v13 β should be v15)
CURRENT_SCHEMA_VERSION on develop is already 15 (crates/uteke-core/src/memory/store.rs:176). The develop AGENT.md was already stale at v12; this PR bumps it to v13, still behind. Full version map (crates/uteke-core/src/memory/crud.rs:815):
- v15 = roomβdocument junction table (#689) β current
- v14 = FTS5
memory_typecolumn (#662) - v13 = global docs, remove namespace isolation (#614)
- v12 = hierarchical docs (#438)
-- Current: **v13** (global documents, author column, duplicate slug cleanup)
++ Current: **v15** (roomβdocument junction table β #689)Also: the PR's description ("author column", "duplicate slug cleanup") doesn't map cleanly to v13/v14/v15 β please correct the description too.
2. get_stats() returns hardcoded placeholder "existing" (onboard.rs:224-228)
fn get_stats() -> String {
// We can't easily open the store here without uteke-core's onnx feature.
"existing".to_string()
}Prints β Existing memory store found: existing memories (:105) β misleading (says "memories" but shows no count). Two options:
- (a) Drop the count claim: just
β Existing memory store found(pragmatic, zero-risk). - (b) Query
SELECT COUNT(*) FROM memoriesβ but not viaUteke::open(that triggersvalidate_backend/onnx embedding init, seemain.rs:66fail-fast β exactly what onboard deliberately avoids, per the author's own comment atonboard.rs:225). Needs a lightweight rawrusqliteconnection (add dep touteke-cli, or expose acount()fromuteke-core).
3. write_config() destructively overwrites existing uteke.toml (onboard.rs:367)
std::fs::write(&config_path, toml).map_err(...)?;If the user already has a uteke.toml, this replaces it wholesale β including the [embedding] section's api_key (config.rs:41, OpenAI key) when they stored it in TOML (rather than via the UTEKE_EMBEDDING_API_KEY env var). That's silent credential loss, not just custom settings. At minimum, when the file already exists and --yes is not set:
β Config file already exists at ~/.uteke/uteke.toml β overwrite? [y/N]
(prefer: backup .bak or merge with existing keys.)
π‘ Should Fix
4. prompt_integration_mode() is silent for custom agents (onboard.rs:264-268)
let supports_mp = matches!(agent, "hermes" | "claude" | "cursor" | "pi" | "opencode");
if !supports_mp {
return Ok(false);
}Custom agent names skip the prompt with no output at all, which is confusing. Add a line like β Integration mode: uteke-tool (custom agent).
5. validate_agent() is a no-op (onboard.rs:382-389)
Both branches return Ok(agent.to_string()). The name/docstring imply validation, but every input passes. Either remove it and inline agent.clone(), or actually validate (warn on unrecognized agents).
6. Banner box alignment is off by 1 (onboard.rs:74-77, also :188-190)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Welcome to Uteke Onboarding β
β The Brain for Your AI β persistent memory engine β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Top/bottom borders are 64 inner chars; content lines are 65 β the right β is pushed out by exactly 1 column. The em-dash β (:76) is also ambiguous-width in many terminals. Same issue in the "Onboarding complete!" box. Use a format/pad helper for consistency.
7. --json flag produces mixed output (new)
onboard forwards the global cli.json flag to run_init (onboard.rs:171 & :173; flag at cli.rs:27) but never handles it itself β so uteke onboard --json prints ASCII banners/steps to stdout interleaved with potential JSON from run_init. Output can't be parsed. Fix: ignore cli.json in onboard (always human-readable) β one line.
π’ Nice to Have
8. Install URL points to main (onboard.rs:85)
println!(" curl -fsSL https://raw.githubusercontent.com/codecoradev/uteke/main/install.sh | sh");Repo default branch is develop; install.sh exists on both branches, so main resolves fine β but worth confirming whether main is the intended stable/release branch or should follow the develop convention.
9. No unit tests for onboard.rs
515 lines, zero tests. At minimum the pure functions β no stdin mocking needed:
write_config()output (TOML parse round-trip)get_toggle()logicvalidate_agent()behavior
β What's Good
- Clean early-exit dispatch pattern (matches
init/completions/benchconvention) - Direct
crate::init::run_init()call instead of subprocess β correct approach - TOML key mapping matches the actual
Configstruct fields - Docs coverage: README, README.id, getting-started, cli-reference, AGENT.md, CHANGELOG β thorough
- Non-interactive
--yesmode well designed - Feature showcase at the end is a nice UX touch
Fix the π΄ items and I'll approve.
π΄ Must Fix: - AGENT.md: correct schema version v13 β v15 (roomβdocument junction, codecoradev#689) - onboard.rs: remove misleading get_stats() placeholder, drop count claim - onboard.rs: write_config() now backs up existing uteke.toml to .bak and prompts for confirmation before overwriting (prevents credential loss) π‘ Should Fix: - prompt_integration_mode(): print message for custom agents (no longer silent) - validate_agent(): now warns on unrecognized agents instead of being a no-op - Banner boxes: replace misaligned Unicode box drawing with consistent ASCII print_banner() helper (fixes off-by-1 alignment, ambiguous em-dash width) - --json flag: intentionally ignored in onboard to avoid mixing ASCII banners with parseable JSON output π’ Nice to Have: - Install URL: main β develop (matches repo default branch convention) - Add 7 unit tests for pure functions (get_toggle, validate_agent, print_banner, write_config TOML structure) All tests pass: cargo fmt --check β , cargo clippy -D warnings β , cargo test (50 passed) β Co-authored-by: ajianaz <reviewer>
Review Feedback AddressedCommit: π΄ Must Fix β All Done β
π‘ Should Fix β All Done β
π’ Nice to Have β Both Done β
Verification
|
MigrationFork repository has been deleted, so this PR branch can no longer be updated directly. All review feedback has been addressed + clippy errors fixed. Closing this PR and recreating from the codecoradev/uteke repo branch. |
Summary
Adds a new
uteke onboardcommand that guides new users from zero to productive in a single interactive flow.Flow
utekeis on PATH (viawhichcrate) and if a store exists~/.uteke/uteke.tomlwith selectionsuteke init --agent <choice>(or--memory-provider) automaticallyNon-interactive mode
Files changed
crates/uteke-cli/src/onboard.rscrates/uteke-cli/src/cli.rsOnboardvariant toCommandsenumcrates/uteke-cli/src/main.rsinit, no store needed)crates/uteke-cli/src/commands/mod.rscrates/uteke-cli/Cargo.tomlwhich = "7"dependencyAGENT.mdCHANGELOG.md[Unreleased]docs/getting-started.mddocs/cli-reference.mduteke onboardcommand referenceTesting
cargo fmt --checkβcargo clippy -p uteke-cli -- -D warningsβ (0 warnings)cargo test -p uteke-cliβ (43 passed, 0 failed)./target/release/uteke onboard --yes --agent hermesruns end-to-end successfully