Skip to content

Commit 8f4cbde

Browse files
committed
refactor: simplify omni init command usage and update documentation and installation scripts accordingly
1 parent 2dcaa0f commit 8f4cbde

7 files changed

Lines changed: 16 additions & 19 deletions

File tree

docs/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ src/
5252
├── mcp/
5353
│ └── server.rs # MCP server (5 tools: retrieve, learn, density, trust, compress)
5454
└── cli/
55-
├── init.rs # omni init --hook
55+
├── init.rs # omni init
5656
├── stats.rs # omni stats analytics dashboard
5757
├── session.rs # omni session state inspection
5858
├── learn.rs # omni learn CLI

docs/HOW_TO_USE.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ Start Claude Code normally. OMNI is now active and invisible.
148148
```bash
149149
# Homebrew
150150
brew upgrade omni
151-
omni init --hook # Reinstall hooks after upgrade
151+
omni init # Reinstall hooks after upgrade
152152

153153
# Manual
154154
curl -fsSL https://raw.githubusercontent.com/fajarhide/omni/main/scripts/install.sh | sh
155-
omni init --hook
155+
omni init
156156
```
157157

158158
See [MIGRATION.md](MIGRATION.md) for detailed upgrade instructions from 0.4.x.
@@ -794,9 +794,6 @@ When you run `omni doctor --fix`, OMNI will automatically repair:
794794
| Problem | Fix Applied |
795795
|---|---|
796796
| Missing `~/.omni/` directory | Creates it |
797-
| Claude Code hooks not installed | Runs `omni init --hook` |
798-
| MCP not registered | Runs `omni init --mcp` |
799-
| Untrusted project filters | Runs `omni trust` |
800797
| Broken `.toml` filter files | Renames to `.toml.bak` |
801798
| Historical `Unknown` stats records | Re-classifies with latest model |
802799

@@ -904,7 +901,6 @@ omni init --claude # Full Setup for Claude Code (Hooks + MCP)
904901
omni init --vscode # Setup for VS Code Continue.dev
905902
omni init --opencode # Setup for OpenCode plugin
906903
omni init --codex # Setup for Codex CLI
907-
omni init --hook # Setup Claude Hooks only
908904
omni init --mcp # Setup Claude MCP Server only
909905
omni init --status # Check Claude installation status
910906
omni init --uninstall # Remove all OMNI components from Claude
@@ -1000,8 +996,6 @@ When `--fix` is passed, OMNI will automatically resolve detected issues:
1000996
| Issue | Fix Applied |
1001997
|---|---|
1002998
| Missing `~/.omni/` directory | Creates the directory |
1003-
| Missing Claude Code hooks | Runs `omni init --hook` |
1004-
| Missing MCP server registration | Runs `omni init --mcp` |
1005999
| Untrusted project filters | Runs `omni trust` on the project |
10061000
| Invalid user filter files | Renames broken `.toml` to `.toml.bak` |
10071001

@@ -1128,7 +1122,6 @@ omni doctor --fix # Self-repair
11281122
- [ ] Run `omni learn --verify` after applying any filters
11291123

11301124
### After Upgrading OMNI
1131-
- [ ] Run `omni init --hook` (reinstall hooks after upgrade)
11321125
- [ ] Run `omni doctor --fix` (re-classify historical data with new model)
11331126
- [ ] Run `omni stats` to confirm everything is working
11341127

docs/MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ omni doctor # Verify everything
8585

8686
```bash
8787
curl -fsSL https://raw.githubusercontent.com/fajarhide/omni/main/scripts/install.sh | sh
88-
omni init --hook
88+
omni init
8989
omni doctor
9090
```
9191

scripts/install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ if ($UserPath -notmatch [regex]::Escape($InstallDir)) {
103103

104104
Write-Host ""
105105
Write-Host " Next steps:"
106-
Write-Host " omni init --hook # Activate Claude Code hooks"
107-
Write-Host " omni doctor # Verify installation"
108-
Write-Host " omni stats # View savings after first session"
106+
Write-Host " omni init # Interactive setup for your preferred AI Agent"
107+
Write-Host " omni doctor # Verify installation"
108+
Write-Host " omni stats # View savings after first session"
109109
Write-Host ""

scripts/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ main() {
165165

166166
echo ""
167167
echo " Next steps:"
168-
echo " omni init --hook # Activate Claude Code hooks"
169-
echo " omni doctor # Verify installation"
170-
echo " omni stats # View savings after first session"
168+
echo " omni init # Interactive setup for your preferred AI Agent"
169+
echo " omni doctor # Verify installation"
170+
echo " omni stats # View savings after first session"
171171
echo ""
172172
}
173173

src/cli/doctor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ pub fn run(args: &[String]) -> anyhow::Result<()> {
471471
local_report.filters.len().to_string().yellow(),
472472
"[WARNING]".yellow().bold()
473473
);
474-
warnings.push("Project filters found but not trusted. Run: `omni trust`.");
474+
warnings
475+
.push("Project filters found but not trusted. Run: `omni doctor --fix`.");
475476
all_ok = false;
476477
}
477478
}

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ fn print_help() {
116116
println!(" {: <12} Show this help message", "help, -h".cyan());
117117

118118
println!("\n{}", "EXAMPLES:".bold().bright_white());
119-
println!(" omni init {}", "# OMNI setup (interactive)".bright_black());
119+
println!(
120+
" omni init {}",
121+
"# OMNI setup (interactive)".bright_black()
122+
);
120123
println!(
121124
" omni doctor {}",
122125
"# Diagnose installation health".bright_black()

0 commit comments

Comments
 (0)