Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/termux-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"upstream_repo": "anomalyco/opencode",
"upstream_tag": "v1.17.15",
"upstream_name": "v1.17.15",
"upstream_html_url": "https://github.com/anomalyco/opencode/releases/tag/v1.17.15",
"upstream_target": "adf178a6b95c61506ddaadaf4dd062badb4a8fda",
"upstream_release_id": "350399617",
"upstream_prerelease": false,
"release_train": "1.17.15",
"release_branch": "release-1.17.15",
"work_branch": "termux-1.17.15",
"patch_branch": "termux-target",
"patch_source_sha": "ffca5f8f2e00621977c43a232f95d55b58d3f0c5",
"termux_tag": "v1.17.15-termux"
}
4 changes: 3 additions & 1 deletion .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
sync:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: write
pull-requests: write
Expand All @@ -21,6 +21,7 @@ jobs:
uses: ./.github/actions/setup-bun

- name: Setup Git Committer
if: github.repository == 'anomalyco/opencode'
id: setup-git-committer
uses: ./.github/actions/setup-git-committer
with:
Expand All @@ -31,6 +32,7 @@ jobs:
run: bun i -g opencode-ai

- name: Sync beta branch
if: github.repository == 'anomalyco/opencode'
env:
GH_TOKEN: ${{ steps.setup-git-committer.outputs.token }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:
build:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
TAG: "24.04"
Expand All @@ -32,6 +32,7 @@ jobs:
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

- name: Login to GHCR
if: github.repository == 'anomalyco/opencode'
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs-locale-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
sync-locales:
if: false
#if: github.actor != 'opencode-agent[bot]'
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: write
steps:
Expand All @@ -26,6 +26,7 @@ jobs:
uses: ./.github/actions/setup-bun

- name: Setup git committer
if: github.repository == 'anomalyco/opencode'
id: committer
uses: ./.github/actions/setup-git-committer
with:
Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:
run: curl -fsSL https://opencode.ai/install | bash

- name: Sync locale docs with OpenCode
if: steps.changes.outputs.has_changes == 'true'
if: github.repository == 'anomalyco/opencode' && (steps.changes.outputs.has_changes == 'true')
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
OPENCODE_CONFIG_CONTENT: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/duplicate-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
check-duplicates:
if: github.event.action == 'opened'
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: read
issues: write
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
run: curl -fsSL https://opencode.ai/install | bash

- name: Check duplicates and compliance
if: steps.author.outputs.skip != 'true'
if: github.repository == 'anomalyco/opencode' && (steps.author.outputs.skip != 'true')
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:

recheck-compliance:
if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'needs:compliance')
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: read
issues: write
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
run: curl -fsSL https://opencode.ai/install | bash

- name: Recheck compliance
if: steps.author.outputs.skip != 'true'
if: github.repository == 'anomalyco/opencode' && (steps.author.outputs.skip != 'true')
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
generate:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: write
pull-requests: write
Expand All @@ -19,6 +19,7 @@ jobs:
uses: ./.github/actions/setup-bun

- name: Setup git committer
if: github.repository == 'anomalyco/opencode'
id: committer
uses: ./.github/actions/setup-git-committer
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix-eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:
nix-eval:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 15
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix-hashes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runner: macos-15-intel
- system: aarch64-darwin
runner: macos-latest
runs-on: ${{ matrix.runner }}
runs-on: ${{ github.repository == 'anomalyco/opencode' && (matrix.runner) || 'ubuntu-latest' }}

steps:
- name: Checkout repository
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/notify-discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ on:

jobs:
notify:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
steps:
- name: Send nicely-formatted embed to Discord
if: github.repository == 'anomalyco/opencode'
uses: SethCohen/github-releases-to-discord@24d166886aee4646d448c8a389ff9e1ebcab3682 # v1.20.0
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
3 changes: 2 additions & 1 deletion .github/workflows/opencode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
id-token: write
contents: read
Expand All @@ -26,6 +26,7 @@ jobs:
- uses: ./.github/actions/setup-bun

- name: Run opencode
if: github.repository == 'anomalyco/opencode'
uses: anomalyco/opencode/github@2c14fc5586fe0b88e5c04732d2e846769cc35671 # latest
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
check-duplicates:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: read
pull-requests: write
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
} > pr_info.txt

- name: Check for duplicate PRs
if: steps.team-check.outputs.is_team != 'true'
if: github.repository == 'anomalyco/opencode' && (steps.team-check.outputs.is_team != 'true')
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-github-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:
publish:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
publish:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
Expand All @@ -29,6 +29,7 @@ jobs:
working-directory: ./sdks/vscode

- name: Publish
if: github.repository == 'anomalyco/opencode'
run: |
./script/publish
working-directory: ./sdks/vscode
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-github-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:
release:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/review') &&
contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association)
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: read
pull-requests: write
Expand Down Expand Up @@ -44,6 +44,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check PR guidelines compliance
if: github.repository == 'anomalyco/opencode'
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
build:
name: storybook build
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
host: blacksmith-4vcpu-ubuntu-2404
- name: windows
host: blacksmith-4vcpu-windows-2025
runs-on: ${{ matrix.settings.host }}
runs-on: ${{ github.repository == 'anomalyco/opencode' && (matrix.settings.host) || 'ubuntu-latest' }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
host: blacksmith-4vcpu-ubuntu-2404
- name: windows
host: blacksmith-4vcpu-windows-2025
runs-on: ${{ matrix.settings.host }}
runs-on: ${{ github.repository == 'anomalyco/opencode' && (matrix.settings.host) || 'ubuntu-latest' }}
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers
defaults:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
triage:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
permissions:
contents: read
issues: write
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
run: curl -fsSL https://opencode.ai/install | bash

- name: Triage issue
if: steps.author.outputs.skip != 'true'
if: github.repository == 'anomalyco/opencode' && (steps.author.outputs.skip != 'true')
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
typecheck:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
Expand Down
1 change: 1 addition & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ else
arch="x64"
fi

if [ "$os" = "linux" ] && [ "$arch" = "arm64" ]; then
if [ -n "${TERMUX_VERSION:-}" ] || [ "${PREFIX:-}" = "/data/data/com.termux/files/usr" ] || [ -d /data/data/com.termux/files/usr ]; then
os="android"
fi
fi

if [ "$os" = "darwin" ] && [ "$arch" = "x64" ]; then
rosetta_flag=$(sysctl -n sysctl.proc_translated 2>/dev/null || echo 0)
if [ "$rosetta_flag" = "1" ]; then
Expand All @@ -101,7 +107,7 @@ else

combo="$os-$arch"
case "$combo" in
linux-x64|linux-arm64|darwin-x64|darwin-arm64|windows-x64)
android-arm64|linux-x64|linux-arm64|darwin-x64|darwin-arm64|windows-x64)
;;
*)
echo -e "${RED}Unsupported OS/Arch: $os/$arch${NC}"
Expand All @@ -110,7 +116,7 @@ else
esac

archive_ext=".zip"
if [ "$os" = "linux" ]; then
if [ "$os" = "linux" ] || [ "$os" = "android" ]; then
archive_ext=".tar.gz"
fi

Expand Down Expand Up @@ -168,7 +174,7 @@ else
filename="$APP-$target$archive_ext"


if [ "$os" = "linux" ]; then
if [ "$os" = "linux" ] || [ "$os" = "android" ]; then
if ! command -v tar >/dev/null 2>&1; then
echo -e "${RED}Error: 'tar' is required but not installed.${NC}"
exit 1
Expand Down Expand Up @@ -274,7 +280,9 @@ download_with_progress() {
exec 4>/dev/null
fi

local tmp_dir=${TMPDIR:-/tmp}
local tmp_dir="${TMPDIR:-${PREFIX:+${PREFIX}/tmp}}"
tmp_dir="${tmp_dir:-/tmp}"
mkdir -p "$tmp_dir"
local basename="${tmp_dir}/opencode_install_$$"
local tracefile="${basename}.trace"

Expand Down Expand Up @@ -326,15 +334,17 @@ download_with_progress() {

download_and_install() {
print_message info "\n${MUTED}Installing ${NC}opencode ${MUTED}version: ${NC}$specific_version"
local tmp_dir="${TMPDIR:-/tmp}/opencode_install_$$"
local tmp_root="${TMPDIR:-${PREFIX:+${PREFIX}/tmp}}"
tmp_root="${tmp_root:-/tmp}"
local tmp_dir="${tmp_root}/opencode_install_$$"
mkdir -p "$tmp_dir"

if [[ "$os" == "windows" ]] || ! [ -t 2 ] || ! download_with_progress "$url" "$tmp_dir/$filename"; then
# Fallback to standard curl on Windows, non-TTY environments, or if custom progress fails
curl -# -L -o "$tmp_dir/$filename" "$url"
fi

if [ "$os" = "linux" ]; then
if [ "$os" = "linux" ] || [ "$os" = "android" ]; then
tar -xzf "$tmp_dir/$filename" -C "$tmp_dir"
else
unzip -q "$tmp_dir/$filename" -d "$tmp_dir"
Expand Down
Loading
Loading