Skip to content

Commit 1d48dde

Browse files
committed
docs: update install instructions to reflect flexcamp-ai OpenWork Setup wizard
- LOCAL_AWS_SETUP.md: replace bare flexcamp-ai link with step-by-step end-user flow (Slack /get-openwork → download OpenWork Setup app → guided wizard) and API key renewal instructions - install-flex: remove write_shell_alias() step; opencode-work() launcher is no longer needed since flexcamp-ai configures OpenCode with an API key via the OpenWork Setup wizard. Update completion 'Next steps' to point users to Slack /get-openwork and OpenWork Setup.
1 parent cb7c336 commit 1d48dde

2 files changed

Lines changed: 19 additions & 62 deletions

File tree

LOCAL_AWS_SETUP.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22

33
Instructions for building and running the Flexion fork of opencode.
44

5-
## AWS Credentials Setup
5+
## AWS Credentials & End-User Install
66

7-
AWS credentials and opencode configuration are managed by **flexcamp-ai**:
7+
End-user installation and AWS credentials are managed by **[flexcamp-ai](https://github.com/flexion/flexcamp-ai)** — a macOS menubar app that walks you through a guided setup wizard.
88

9-
```
10-
https://github.com/flexion/flexcamp-ai
11-
```
9+
**Getting started:**
10+
11+
1. In Slack, type `/get-openwork` in any channel — the bot will DM you a Bedrock API key, expiration date, and region.
12+
2. Download **OpenWork Setup** from the link in the DM (or the [latest release](https://github.com/flexion/flexcamp-ai/releases/latest)).
13+
3. Open the app and run the setup wizard (~2 min). It installs and configures everything: Homebrew/Node.js if needed, OpenCode, the OpenWork desktop app, AWS Bedrock credentials, workspace folder, and pre-built skills.
14+
4. After setup, click **"Open OpenWork"** or use the menu bar icon.
15+
16+
**Renewing your API key (expires every 7 days):**
17+
Type `/bedrock-key` in Slack → click the menu bar icon → **"Replace API Key..."** → paste the Slack message.
18+
19+
---
1220

13-
Follow the setup instructions there before building or running this fork. flexcamp-ai handles AWS authentication, the `opencode-work` shell function, and `~/.config/opencode/opencode.json`.
21+
_Developers building from source: continue to the sections below._
1422

1523
---
1624

install-flex

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
# 2. Prompts: clone directory
1010
# 3. Clones git@github.com:flexion/opencode.git (flex branch) — skipped if already present
1111
# 4. Installs dependencies and builds the native binary
12-
# 5. Appends opencode-work() launcher function to ~/.zshrc or ~/.bashrc
1312
#
1413
# AWS credentials and opencode configuration are managed by flexcamp-ai:
1514
# https://github.com/flexion/flexcamp-ai
16-
# Run flexcamp-ai setup before or after this installer.
15+
# Use /get-openwork in Slack to get your API key, then run the OpenWork Setup
16+
# app to complete configuration.
1717
#
1818
# Existing files are never overwritten; each step is skipped with a warning
1919
# if the output already exists.
@@ -111,70 +111,19 @@ clone_and_build() {
111111
success "Binary built"
112112
}
113113

114-
# ── step 4: shell launcher function ──────────────────────────────────────────
115-
write_shell_alias() {
116-
local rc_file
117-
case "$(basename "${SHELL:-bash}")" in
118-
zsh) rc_file="$HOME/.zshrc" ;;
119-
*) rc_file="$HOME/.bashrc" ;;
120-
esac
121-
122-
# Sentinel comment is the idempotency guard — more reliable than matching the
123-
# function signature, which a user might remove while leaving a stale comment.
124-
if grep -qF "── Flexion opencode launcher ──" "$rc_file" 2>/dev/null; then
125-
warn "opencode-work() already defined in $rc_file — skipping"
126-
return
127-
fi
128-
129-
info "Appending opencode-work() to $rc_file..."
130-
131-
# Use printf %q to shell-quote the clone path at install time.
132-
# This eliminates the previous Perl s|...|..| substitution which was vulnerable
133-
# to injection if CLONE_DIR contained a | character.
134-
local clone_dir_q
135-
clone_dir_q=$(printf '%q' "$CLONE_DIR")
136-
137-
# Double-quoted heredoc: $clone_dir_q expands now (install time);
138-
# all other $ references are \-escaped so they expand at shell run time.
139-
cat >>"$rc_file" <<SHELL_EOF
140-
141-
# ── Flexion opencode launcher ─────────────────────────────────────────────────
142-
# AWS credentials are managed by flexcamp-ai (github.com/flexion/flexcamp-ai).
143-
opencode-work() {
144-
local clone_dir=$clone_dir_q
145-
local arch os
146-
case "\$(uname -m)" in arm64|aarch64) arch="arm64" ;; *) arch="x64" ;; esac
147-
case "\$(uname -s)" in Darwin) os="darwin" ;; Linux) os="linux" ;; *)
148-
echo "Unsupported OS: \$(uname -s)" && return 1 ;; esac
149-
"\${clone_dir}/packages/opencode/dist/opencode-\${os}-\${arch}/bin/opencode" "\$@"
150-
}
151-
# ─────────────────────────────────────────────────────────────────────────────
152-
SHELL_EOF
153-
154-
success "opencode-work() added to $rc_file"
155-
}
156-
157114
# ── main ──────────────────────────────────────────────────────────────────────
158115
main() {
159116
check_prereqs
160117
gather_inputs
161118
clone_and_build
162-
write_shell_alias
163-
164-
local rc_file
165-
case "$(basename "${SHELL:-bash}")" in
166-
zsh) rc_file="$HOME/.zshrc" ;;
167-
*) rc_file="$HOME/.bashrc" ;;
168-
esac
169119

170120
printf '\n%s%sInstallation complete!%s\n' "$GREEN" "$BOLD" "$NC"
171121
printf '────────────────────────────────────────────\n'
172122
printf ' Binary: %s/packages/opencode/dist/opencode-*/bin/opencode\n' "$CLONE_DIR"
173123
printf '\n Next steps:\n'
174-
printf ' 1. Set up AWS credentials via flexcamp-ai:\n'
175-
printf ' https://github.com/flexion/flexcamp-ai\n'
176-
printf ' 2. source %s\n' "$rc_file"
177-
printf ' 3. opencode-work\n\n'
124+
printf ' 1. Type /get-openwork in Slack to receive your Bedrock API key\n'
125+
printf ' 2. Download and run OpenWork Setup to complete configuration:\n'
126+
printf ' https://github.com/flexion/flexcamp-ai\n\n'
178127
}
179128

180129
main

0 commit comments

Comments
 (0)