Skip to content

feat: interactive setup wizard (memoria init -i) and improved install script#41

Merged
aptend merged 1 commit intomainfrom
feat/onboard-guiding
Mar 18, 2026
Merged

feat: interactive setup wizard (memoria init -i) and improved install script#41
aptend merged 1 commit intomainfrom
feat/onboard-guiding

Conversation

@aptend
Copy link
Contributor

@aptend aptend commented Mar 18, 2026

What type of PR is this?

  • feat (new feature)

Which issue(s) this PR fixes

N/A — new feature

What this PR does / why we need it

Interactive setup wizard (memoria init -i)

Adds a guided interactive mode to memoria init that walks users through configuration step by step:

  1. AI Tool — multi-select (Kiro, Cursor, Claude Code)
  2. Database — host/port/user/password/database fields with defaults
  3. Embedding service — SiliconFlow (recommended) / OpenAI / Ollama / Custom
  4. Confirm — summary review before writing config

Key behaviors:

  • -i flag enters interactive mode; without it, original flag-based CLI is unchanged
  • Non-first-run: reads existing mcp.json and uses current values as defaults
  • API key input is hidden (no echo) with masked display of existing values (sk-zpk...eky)
  • SiliconFlow is recommended as default embedding provider (free tier, BAAI/bge-m3 1024d)

Improved install script

Rewrites scripts/install.sh following starship/rustup patterns:

  • Default install to /usr/local/bin with automatic sudo elevation when needed
  • PATH detection with shell-specific config hints (bash/zsh/fish)
  • Confirmation prompt before install (-y to skip for CI)
  • Colored output with status indicators (✓/!/x)
  • POSIX sh compatible (was bash)
  • Recommends memoria init -i after installation

Changes

File Change
memoria/crates/memoria-cli/src/main.rs Interactive wizard, --tool now optional, -i flag
memoria/crates/memoria-cli/Cargo.toml Add libc (unix, for terminal echo control)
scripts/install.sh Rewrite with sudo/PATH/confirm/colors

@aptend aptend merged commit e0df7b9 into main Mar 18, 2026
4 checks passed
aptend added a commit that referenced this pull request Mar 18, 2026
…it (#42)

## What type of PR is this?

- [x] feat (new feature)
- [x] chore (maintenance, tooling)

## Which issue(s) this PR fixes

N/A — follow-up to #41

## What this PR does / why we need it

Adds connectivity validation to `memoria init -i` after user confirms
settings, before writing config files.

### Connectivity checks

Between the confirm step and writing config:
- **Database**: TCP connect to `host:port` (3s timeout) — catches wrong
host/port/DB not running
- **Embedding**: POST `/embeddings` with
`{"model":"...","input":"test"}` — verifies URL reachable, API key
valid, model exists

On failure, shows the error and prompts `Continue anyway?` so users can
still write config if they plan to start services later.

### Other changes
- Fix clippy `collapsible_if` warning
- Add `scripts/migrate_embedding_dim.sh` to `.gitignore` (local-only
utility)

### Changes

| File | Change |
|------|--------|
| `memoria/crates/memoria-cli/src/main.rs` | `check_db`,
`check_embedding`, `check_embedding_request` functions; fix
`read_password_line` tty fallback; clippy fix |
| `.gitignore` | Ignore local migration script |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant