@mc1global/opencode-jarvis 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/QUICK-GUIDE.md +42 -28
- package/README.md +309 -166
- package/dist/application/bootstrap/use-cases.d.ts.map +1 -1
- package/dist/application/bootstrap/use-cases.js +4 -4
- package/dist/application/bootstrap/use-cases.js.map +1 -1
- package/dist/hooks/first-run-guide.d.ts.map +1 -1
- package/dist/hooks/first-run-guide.js +35 -2
- package/dist/hooks/first-run-guide.js.map +1 -1
- package/dist/hooks/slash-commands.d.ts +36 -0
- package/dist/hooks/slash-commands.d.ts.map +1 -0
- package/dist/hooks/slash-commands.js +121 -0
- package/dist/hooks/slash-commands.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/scripts/setup/setup-linux.sh +124 -0
- package/scripts/setup/setup-macos.sh +137 -0
- package/scripts/setup/setup-wsl.sh +175 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
# JARVIS Plugin — macOS Prerequisites Setup
|
|
4
|
+
#
|
|
5
|
+
# Installs non-npm dependencies required by @mc1global/opencode-jarvis:
|
|
6
|
+
# - Bun (required) — SQLite runtime for the plugin
|
|
7
|
+
# - Ollama (required) — Local embedding generation for RAG semantic search
|
|
8
|
+
# - embeddinggemma model — Default embedding model (768 dimensions)
|
|
9
|
+
# - Azure CLI (optional) — Azure DevOps board sync
|
|
10
|
+
# - Dagger CLI (optional) — Container-based CI/CD gate execution
|
|
11
|
+
#
|
|
12
|
+
# Usage:
|
|
13
|
+
# curl -fsSL <repo-raw-url>/scripts/setup/setup-macos.sh | bash
|
|
14
|
+
# # or
|
|
15
|
+
# chmod +x setup-macos.sh && ./setup-macos.sh
|
|
16
|
+
#
|
|
17
|
+
# Requires: macOS 12+ with Homebrew (installs Homebrew if missing)
|
|
18
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
19
|
+
set -euo pipefail
|
|
20
|
+
|
|
21
|
+
BOLD="\033[1m"
|
|
22
|
+
GREEN="\033[0;32m"
|
|
23
|
+
YELLOW="\033[0;33m"
|
|
24
|
+
RED="\033[0;31m"
|
|
25
|
+
RESET="\033[0m"
|
|
26
|
+
|
|
27
|
+
info() { echo -e "${BOLD}[INFO]${RESET} $1"; }
|
|
28
|
+
ok() { echo -e "${GREEN}[OK]${RESET} $1"; }
|
|
29
|
+
warn() { echo -e "${YELLOW}[WARN]${RESET} $1"; }
|
|
30
|
+
fail() { echo -e "${RED}[FAIL]${RESET} $1"; }
|
|
31
|
+
|
|
32
|
+
# ── Homebrew ──────────────────────────────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
if ! command -v brew &>/dev/null; then
|
|
35
|
+
info "Homebrew not found — installing..."
|
|
36
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
37
|
+
# shellcheck disable=SC2016
|
|
38
|
+
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> "$HOME/.zprofile"
|
|
39
|
+
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
40
|
+
ok "Homebrew installed"
|
|
41
|
+
else
|
|
42
|
+
ok "Homebrew already installed"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# ── Bun (required) ───────────────────────────────────────────────────────────
|
|
46
|
+
|
|
47
|
+
if ! command -v bun &>/dev/null; then
|
|
48
|
+
info "Installing Bun..."
|
|
49
|
+
curl -fsSL https://bun.sh/install | bash
|
|
50
|
+
# Source the updated profile so bun is available in this session
|
|
51
|
+
export BUN_INSTALL="$HOME/.bun"
|
|
52
|
+
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
53
|
+
ok "Bun installed ($(bun --version))"
|
|
54
|
+
else
|
|
55
|
+
ok "Bun already installed ($(bun --version))"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# ── Ollama (required) ────────────────────────────────────────────────────────
|
|
59
|
+
|
|
60
|
+
if ! command -v ollama &>/dev/null; then
|
|
61
|
+
info "Installing Ollama..."
|
|
62
|
+
brew install ollama
|
|
63
|
+
ok "Ollama installed"
|
|
64
|
+
else
|
|
65
|
+
ok "Ollama already installed"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# Start Ollama if not already running
|
|
69
|
+
if ! curl -sf http://localhost:11434/api/tags &>/dev/null; then
|
|
70
|
+
info "Starting Ollama server..."
|
|
71
|
+
ollama serve &>/dev/null &
|
|
72
|
+
sleep 3
|
|
73
|
+
ok "Ollama server started"
|
|
74
|
+
else
|
|
75
|
+
ok "Ollama server already running"
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# ── Embedding Model (required for RAG) ───────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
if ollama list 2>/dev/null | grep -q "embeddinggemma"; then
|
|
81
|
+
ok "embeddinggemma model already pulled"
|
|
82
|
+
else
|
|
83
|
+
info "Pulling embeddinggemma embedding model (this may take a minute)..."
|
|
84
|
+
ollama pull embeddinggemma
|
|
85
|
+
ok "embeddinggemma model ready"
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# ── Optional: Azure CLI ──────────────────────────────────────────────────────
|
|
89
|
+
|
|
90
|
+
echo ""
|
|
91
|
+
read -rp "Install Azure CLI for Azure DevOps sync? (y/N): " INSTALL_AZ
|
|
92
|
+
if [[ "${INSTALL_AZ:-N}" =~ ^[Yy]$ ]]; then
|
|
93
|
+
if ! command -v az &>/dev/null; then
|
|
94
|
+
info "Installing Azure CLI..."
|
|
95
|
+
brew install azure-cli
|
|
96
|
+
ok "Azure CLI installed — run 'az login' to authenticate"
|
|
97
|
+
else
|
|
98
|
+
ok "Azure CLI already installed"
|
|
99
|
+
fi
|
|
100
|
+
else
|
|
101
|
+
warn "Skipped Azure CLI (optional — needed only for Azure DevOps sync)"
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
# ── Optional: Dagger CLI ─────────────────────────────────────────────────────
|
|
105
|
+
|
|
106
|
+
read -rp "Install Dagger CLI for CI/CD pipelines? (y/N): " INSTALL_DAGGER
|
|
107
|
+
if [[ "${INSTALL_DAGGER:-N}" =~ ^[Yy]$ ]]; then
|
|
108
|
+
if ! command -v dagger &>/dev/null; then
|
|
109
|
+
info "Installing Dagger CLI..."
|
|
110
|
+
brew install dagger/tap/dagger
|
|
111
|
+
ok "Dagger CLI installed"
|
|
112
|
+
else
|
|
113
|
+
ok "Dagger CLI already installed"
|
|
114
|
+
fi
|
|
115
|
+
else
|
|
116
|
+
warn "Skipped Dagger CLI (optional — needed only for CI/CD pipeline gates)"
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# ── Summary ──────────────────────────────────────────────────────────────────
|
|
120
|
+
|
|
121
|
+
echo ""
|
|
122
|
+
echo -e "${BOLD}──────────────────────────────────────────${RESET}"
|
|
123
|
+
echo -e "${GREEN}${BOLD}JARVIS prerequisites installed!${RESET}"
|
|
124
|
+
echo ""
|
|
125
|
+
echo "Next steps:"
|
|
126
|
+
echo " 1. Add the plugin to your project:"
|
|
127
|
+
echo ""
|
|
128
|
+
echo " # In your project root:"
|
|
129
|
+
echo ' echo '"'"'{ "plugin": ["@mc1global/opencode-jarvis"] }'"'"' > opencode.json'
|
|
130
|
+
echo ""
|
|
131
|
+
echo " 2. Launch OpenCode:"
|
|
132
|
+
echo ""
|
|
133
|
+
echo " cd /path/to/your/project"
|
|
134
|
+
echo " opencode"
|
|
135
|
+
echo ""
|
|
136
|
+
echo " 3. JARVIS will auto-bootstrap on first launch."
|
|
137
|
+
echo -e "${BOLD}──────────────────────────────────────────${RESET}"
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
# JARVIS Plugin — Windows (WSL) Prerequisites Setup
|
|
4
|
+
#
|
|
5
|
+
# This script runs INSIDE a WSL (Windows Subsystem for Linux) environment.
|
|
6
|
+
# It installs non-npm dependencies required by @mc1global/opencode-jarvis.
|
|
7
|
+
#
|
|
8
|
+
# Prerequisites:
|
|
9
|
+
# - WSL 2 with Ubuntu 22.04+ (recommended)
|
|
10
|
+
# - Run this script from your WSL terminal, NOT from PowerShell/cmd
|
|
11
|
+
#
|
|
12
|
+
# What it installs:
|
|
13
|
+
# - OpenCode CLI — The host runtime for JARVIS
|
|
14
|
+
# - Bun (required) — SQLite runtime for the plugin
|
|
15
|
+
# - Ollama (required) — Local embedding generation for RAG semantic search
|
|
16
|
+
# - embeddinggemma model — Default embedding model (768 dimensions)
|
|
17
|
+
# - Azure CLI (optional) — Azure DevOps board sync
|
|
18
|
+
# - Dagger CLI (optional) — Container-based CI/CD gate execution
|
|
19
|
+
#
|
|
20
|
+
# Usage (from WSL terminal):
|
|
21
|
+
# curl -fsSL <repo-raw-url>/scripts/setup/setup-wsl.sh | bash
|
|
22
|
+
# # or
|
|
23
|
+
# chmod +x setup-wsl.sh && ./setup-wsl.sh
|
|
24
|
+
#
|
|
25
|
+
# For more on WSL + OpenCode, see: https://opencode.ai/docs/windows-wsl
|
|
26
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
27
|
+
set -euo pipefail
|
|
28
|
+
|
|
29
|
+
BOLD="\033[1m"
|
|
30
|
+
GREEN="\033[0;32m"
|
|
31
|
+
YELLOW="\033[0;33m"
|
|
32
|
+
RED="\033[0;31m"
|
|
33
|
+
RESET="\033[0m"
|
|
34
|
+
|
|
35
|
+
info() { echo -e "${BOLD}[INFO]${RESET} $1"; }
|
|
36
|
+
ok() { echo -e "${GREEN}[OK]${RESET} $1"; }
|
|
37
|
+
warn() { echo -e "${YELLOW}[WARN]${RESET} $1"; }
|
|
38
|
+
fail() { echo -e "${RED}[FAIL]${RESET} $1"; }
|
|
39
|
+
|
|
40
|
+
# ── Verify WSL ───────────────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
if [ ! -f /proc/version ] || ! grep -qi "microsoft\|wsl" /proc/version 2>/dev/null; then
|
|
43
|
+
warn "This does not appear to be a WSL environment."
|
|
44
|
+
warn "This script is designed for Windows Subsystem for Linux."
|
|
45
|
+
read -rp "Continue anyway? (y/N): " CONTINUE
|
|
46
|
+
if [[ ! "${CONTINUE:-N}" =~ ^[Yy]$ ]]; then
|
|
47
|
+
echo "Aborted. Use setup-linux.sh for native Linux or setup-macos.sh for macOS."
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
info "WSL environment detected"
|
|
53
|
+
|
|
54
|
+
# ── OpenCode CLI ─────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
if ! command -v opencode &>/dev/null; then
|
|
57
|
+
info "Installing OpenCode CLI..."
|
|
58
|
+
curl -fsSL https://opencode.ai/install | bash
|
|
59
|
+
# Source profile to make opencode available
|
|
60
|
+
# shellcheck disable=SC1090
|
|
61
|
+
[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc" 2>/dev/null || true
|
|
62
|
+
ok "OpenCode CLI installed"
|
|
63
|
+
else
|
|
64
|
+
ok "OpenCode CLI already installed"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# ── Bun (required) ───────────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
if ! command -v bun &>/dev/null; then
|
|
70
|
+
info "Installing Bun..."
|
|
71
|
+
curl -fsSL https://bun.sh/install | bash
|
|
72
|
+
export BUN_INSTALL="$HOME/.bun"
|
|
73
|
+
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
74
|
+
ok "Bun installed ($(bun --version))"
|
|
75
|
+
else
|
|
76
|
+
ok "Bun already installed ($(bun --version))"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
# ── Ollama (required) ────────────────────────────────────────────────────────
|
|
80
|
+
|
|
81
|
+
if ! command -v ollama &>/dev/null; then
|
|
82
|
+
info "Installing Ollama..."
|
|
83
|
+
curl -fsSL https://ollama.ai/install.sh | sh
|
|
84
|
+
ok "Ollama installed"
|
|
85
|
+
else
|
|
86
|
+
ok "Ollama already installed"
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
# Start Ollama if not already running
|
|
90
|
+
if ! curl -sf http://localhost:11434/api/tags &>/dev/null; then
|
|
91
|
+
info "Starting Ollama server..."
|
|
92
|
+
ollama serve &>/dev/null &
|
|
93
|
+
sleep 3
|
|
94
|
+
if curl -sf http://localhost:11434/api/tags &>/dev/null; then
|
|
95
|
+
ok "Ollama server started"
|
|
96
|
+
else
|
|
97
|
+
warn "Ollama server may not have started. You can start it manually: ollama serve"
|
|
98
|
+
fi
|
|
99
|
+
else
|
|
100
|
+
ok "Ollama server already running"
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# ── Embedding Model (required for RAG) ───────────────────────────────────────
|
|
104
|
+
|
|
105
|
+
if ollama list 2>/dev/null | grep -q "embeddinggemma"; then
|
|
106
|
+
ok "embeddinggemma model already pulled"
|
|
107
|
+
else
|
|
108
|
+
info "Pulling embeddinggemma embedding model (this may take a minute)..."
|
|
109
|
+
ollama pull embeddinggemma
|
|
110
|
+
ok "embeddinggemma model ready"
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
# ── Optional: Azure CLI ──────────────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
echo ""
|
|
116
|
+
read -rp "Install Azure CLI for Azure DevOps sync? (y/N): " INSTALL_AZ
|
|
117
|
+
if [[ "${INSTALL_AZ:-N}" =~ ^[Yy]$ ]]; then
|
|
118
|
+
if ! command -v az &>/dev/null; then
|
|
119
|
+
info "Installing Azure CLI..."
|
|
120
|
+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
|
121
|
+
ok "Azure CLI installed — run 'az login' to authenticate"
|
|
122
|
+
else
|
|
123
|
+
ok "Azure CLI already installed"
|
|
124
|
+
fi
|
|
125
|
+
else
|
|
126
|
+
warn "Skipped Azure CLI (optional — needed only for Azure DevOps sync)"
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
# ── Optional: Dagger CLI ─────────────────────────────────────────────────────
|
|
130
|
+
|
|
131
|
+
read -rp "Install Dagger CLI for CI/CD pipelines? (y/N): " INSTALL_DAGGER
|
|
132
|
+
if [[ "${INSTALL_DAGGER:-N}" =~ ^[Yy]$ ]]; then
|
|
133
|
+
if ! command -v dagger &>/dev/null; then
|
|
134
|
+
info "Installing Dagger CLI..."
|
|
135
|
+
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
|
|
136
|
+
sudo mv ./bin/dagger /usr/local/bin/dagger 2>/dev/null || true
|
|
137
|
+
ok "Dagger CLI installed"
|
|
138
|
+
else
|
|
139
|
+
ok "Dagger CLI already installed"
|
|
140
|
+
fi
|
|
141
|
+
else
|
|
142
|
+
warn "Skipped Dagger CLI (optional — needed only for CI/CD pipeline gates)"
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
# ── Summary ──────────────────────────────────────────────────────────────────
|
|
146
|
+
|
|
147
|
+
echo ""
|
|
148
|
+
echo -e "${BOLD}──────────────────────────────────────────────────────────────${RESET}"
|
|
149
|
+
echo -e "${GREEN}${BOLD}JARVIS prerequisites installed in WSL!${RESET}"
|
|
150
|
+
echo ""
|
|
151
|
+
echo "Next steps:"
|
|
152
|
+
echo ""
|
|
153
|
+
echo " 1. Clone or navigate to your project INSIDE WSL:"
|
|
154
|
+
echo ""
|
|
155
|
+
echo " # Option A: Use a WSL-native path (recommended for performance)"
|
|
156
|
+
echo " cd ~/code/my-project"
|
|
157
|
+
echo ""
|
|
158
|
+
echo " # Option B: Access Windows files via /mnt/"
|
|
159
|
+
echo " cd /mnt/c/Users/YourName/Documents/my-project"
|
|
160
|
+
echo ""
|
|
161
|
+
echo " 2. Add the plugin to your project:"
|
|
162
|
+
echo ""
|
|
163
|
+
echo ' echo '"'"'{ "plugin": ["@mc1global/opencode-jarvis"] }'"'"' > opencode.json'
|
|
164
|
+
echo ""
|
|
165
|
+
echo " 3. Launch OpenCode from WSL:"
|
|
166
|
+
echo ""
|
|
167
|
+
echo " opencode"
|
|
168
|
+
echo ""
|
|
169
|
+
echo " 4. JARVIS will auto-bootstrap on first launch."
|
|
170
|
+
echo ""
|
|
171
|
+
echo -e " ${YELLOW}TIP:${RESET} For best performance, keep your project files in the WSL"
|
|
172
|
+
echo " filesystem (~/code/) rather than on /mnt/c/."
|
|
173
|
+
echo ""
|
|
174
|
+
echo -e " See: ${BOLD}https://opencode.ai/docs/windows-wsl${RESET}"
|
|
175
|
+
echo -e "${BOLD}──────────────────────────────────────────────────────────────${RESET}"
|