Skip to content

Commit ec02281

Browse files
author
Aleksei Tikhomirov
committed
feat: add production-ready OpenCode bootstrap kit
0 parents  commit ec02281

39 files changed

Lines changed: 2129 additions & 0 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*.{sh,md,txt}]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
11+
[Makefile]
12+
indent_style = tab

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
syntax-and-bootstrap:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- os: ubuntu-latest
16+
args: "--force --skip-backup"
17+
- os: macos-latest
18+
args: "--force --skip-backup --skip-deps"
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 24
26+
27+
- name: Shell syntax check
28+
run: |
29+
sh -n bootstrap.sh
30+
sh -n scripts/verify.sh
31+
sh -n scripts/generate-checksums.sh
32+
33+
- name: Verify bundle checksums are current
34+
run: |
35+
./scripts/generate-checksums.sh --check
36+
37+
- name: Bootstrap smoke test
38+
run: |
39+
chmod +x bootstrap.sh scripts/verify.sh scripts/generate-checksums.sh
40+
./bootstrap.sh --target-dir "$RUNNER_TEMP/opencode-bootstrap-test" ${{ matrix.args }}
41+
./scripts/verify.sh --target-dir "$RUNNER_TEMP/opencode-bootstrap-test"
42+
43+
- name: Dry run smoke test
44+
run: |
45+
./bootstrap.sh --dry-run --target-dir "$RUNNER_TEMP/opencode-bootstrap-dry-run"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
.idea/
3+
*.log
4+
tmp/
5+
dist/
6+
node_modules/

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is inspired by Keep a Changelog.
6+
7+
## [0.1.0] - 2026-03-10
8+
9+
### Added
10+
- Initial public bootstrap kit for Linux, macOS, and WSL.
11+
- Global OpenCode bundle with agents, prompts, skills, and tools.
12+
- `bootstrap.sh` with preflight, backup, staging, verification, and promotion flow.
13+
- `scripts/verify.sh` verification entrypoint.
14+
- `bundle/checksums.txt` integrity file and checksum validation flow.
15+
- GitHub Actions CI for syntax and bootstrap smoke testing.
16+
- English and Russian README files.
17+
- MIT license, contribution guide, and security policy.

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing
2+
3+
Thanks for contributing to `opencode-bootstrap`.
4+
5+
## Scope
6+
7+
This repository is focused on one thing: reproducible bootstrap of a curated global OpenCode setup for Linux, macOS, and WSL.
8+
9+
Please keep changes aligned with that goal.
10+
11+
## Principles
12+
13+
- Prefer minimal and reviewable diffs.
14+
- Keep the bootstrap flow idempotent.
15+
- Do not add secrets, tokens, or machine-specific credentials.
16+
- Keep MCP usage intentionally small.
17+
- Preserve Linux + macOS + WSL compatibility.
18+
19+
## Before opening a PR
20+
21+
Run at least:
22+
23+
```bash
24+
sh -n bootstrap.sh
25+
sh -n scripts/verify.sh
26+
./bootstrap.sh --dry-run --target-dir /tmp/opencode-bootstrap-dry-run
27+
./bootstrap.sh --target-dir /tmp/opencode-bootstrap-test --force --skip-backup
28+
./scripts/verify.sh --target-dir /tmp/opencode-bootstrap-test
29+
./scripts/generate-checksums.sh
30+
```
31+
32+
Then clean up temporary directories.
33+
34+
## Bundle changes
35+
36+
If you change anything under `bundle/`:
37+
38+
1. update the relevant files
39+
2. regenerate `bundle/checksums.txt`
40+
3. run the bootstrap smoke checks
41+
4. update `CHANGELOG.md` if the change is user-visible
42+
43+
## Security
44+
45+
Do not commit:
46+
47+
- `~/.local/share/opencode/auth.json`
48+
- API keys
49+
- OAuth tokens
50+
- session exports containing secrets
51+
- machine-specific shell profile data

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Alex Tikhomirov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)