1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00

add opencode

This commit is contained in:
Henrik Hautakoski 2026-04-30 16:56:07 +02:00
parent b0e401e325
commit 5255f26d6b
9 changed files with 400 additions and 0 deletions

1
opencode/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

18
opencode/bun.lock Normal file
View file

@ -0,0 +1,18 @@
{
"lockfileVersion": 1,
"configVersion": 1,
"workspaces": {
"": {
"dependencies": {
"@opencode-ai/plugin": "1.3.13",
},
},
},
"packages": {
"@opencode-ai/plugin": ["@opencode-ai/plugin@1.3.13", "", { "dependencies": { "@opencode-ai/sdk": "1.3.13", "zod": "4.1.8" }, "peerDependencies": { "@opentui/core": ">=0.1.95", "@opentui/solid": ">=0.1.95" }, "optionalPeers": ["@opentui/core", "@opentui/solid"] }, "sha512-zHgtWfdDz8Wu8srE8f8HUtPT9i6c3jTmgQKoFZUZ+RR5CMQF1kAlb1cxeEe9Xm2DRNFVJog9Cv/G1iUHYgXSUQ=="],
"@opencode-ai/sdk": ["@opencode-ai/sdk@1.3.13", "", {}, "sha512-/M6HlNnba+xf1EId6qFb2tG0cvq0db3PCQDug1glrf8wYOU57LYNF8WvHX9zoDKPTMv0F+O4pcP/8J+WvDaxHA=="],
"zod": ["zod@4.1.8", "", {}, "sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ=="],
}
}

View file

@ -0,0 +1,9 @@
---
description: Analyze git changes
agent: build
temprature: 0.1
---
You are analyzing staged changes in git to formalize a commit message and commit the changes.
* Analyze previous commits to see what style to use.

3
opencode/opencode.json Normal file
View file

@ -0,0 +1,3 @@
{
"$schema": "https://opencode.ai/config.json"
}

115
opencode/package-lock.json generated Normal file
View file

@ -0,0 +1,115 @@
{
"name": "opencode",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@opencode-ai/plugin": "1.3.17"
}
},
"node_modules/@opencode-ai/plugin": {
"version": "1.3.17",
"resolved": "https://registry.npmjs.org/@opencode-ai/plugin/-/plugin-1.3.17.tgz",
"integrity": "sha512-N5lckFtYvEu2R8K1um//MIOTHsJHniF2kHoPIWPCrxKG5Jpismt1ISGzIiU3aKI2ht/9VgcqKPC5oZFLdmpxPw==",
"license": "MIT",
"dependencies": {
"@opencode-ai/sdk": "1.3.17",
"zod": "4.1.8"
},
"peerDependencies": {
"@opentui/core": ">=0.1.96",
"@opentui/solid": ">=0.1.96"
},
"peerDependenciesMeta": {
"@opentui/core": {
"optional": true
},
"@opentui/solid": {
"optional": true
}
}
},
"node_modules/@opencode-ai/sdk": {
"version": "1.3.17",
"resolved": "https://registry.npmjs.org/@opencode-ai/sdk/-/sdk-1.3.17.tgz",
"integrity": "sha512-2+MGgu7wynqTBwxezR01VAGhILXlpcHDY/pF7SWB87WOgLt3kD55HjKHNj6PWxyY8n575AZolR95VUC3gtwfmA==",
"license": "MIT",
"dependencies": {
"cross-spawn": "7.0.6"
}
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"license": "ISC"
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/zod": {
"version": "4.1.8",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}

5
opencode/package.json Normal file
View file

@ -0,0 +1,5 @@
{
"dependencies": {
"@opencode-ai/plugin": "1.3.17"
}
}

View file

@ -0,0 +1,12 @@
import { Plugin } from "@opencode-ai/plugin"
export const NotificationPlugin : Plugin = async ({ project, client, $, directory, worktree }) => {
return {
event: async ({ event }) => {
// Send notification on session completion
if (event.type === "session.idle") {
await $`notify-send "Opencode" "Agent finished"`
}
},
}
}

233
opencode/themes/custom.json Normal file
View file

@ -0,0 +1,233 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"macRosewater": "#f4dbd6",
"macFlamingo": "#f0c6c6",
"macPink": "#f5bde6",
"macMauve": "#c6a0f6",
"macRed": "#ed8796",
"macMaroon": "#ee99a0",
"macPeach": "#f5a97f",
"macYellow": "#eed49f",
"macGreen": "#a6da95",
"macTeal": "#8bd5ca",
"macSky": "#91d7e3",
"macSapphire": "#7dc4e4",
"macBlue": "#8aadf4",
"macLavender": "#b7bdf8",
"macText": "#eceef4",
"macSubtext1": "#b8c0e0",
"macSubtext0": "#a5adcb",
"macOverlay2": "#767BA0",
"macOverlay1": "#5B5F7C",
"macOverlay0": "#3F4256",
"macSurface2": "#41476F",
"macSurface1": "#343959",
"macSurface0": "#1a1c2d",
"macBase": "#0E1019",
"macMantle": "#0D0F17",
"macCrust": "#0C0D14"
},
"theme": {
"primary": {
"dark": "macBlue",
"light": "macBlue"
},
"secondary": {
"dark": "macMauve",
"light": "macMauve"
},
"accent": {
"dark": "macPink",
"light": "macPink"
},
"error": {
"dark": "macRed",
"light": "macRed"
},
"warning": {
"dark": "macYellow",
"light": "macYellow"
},
"success": {
"dark": "macGreen",
"light": "macGreen"
},
"info": {
"dark": "macTeal",
"light": "macTeal"
},
"text": {
"dark": "macText",
"light": "macText"
},
"textMuted": {
"dark": "macSubtext1",
"light": "macSubtext1"
},
"background": {
"dark": "macBase",
"light": "macBase"
},
"backgroundPanel": {
"dark": "macMantle",
"light": "macMantle"
},
"backgroundElement": {
"dark": "macCrust",
"light": "macCrust"
},
"border": {
"dark": "macSurface0",
"light": "macSurface0"
},
"borderActive": {
"dark": "macSurface1",
"light": "macSurface1"
},
"borderSubtle": {
"dark": "macSurface2",
"light": "macSurface2"
},
"diffAdded": {
"dark": "macGreen",
"light": "macGreen"
},
"diffRemoved": {
"dark": "macRed",
"light": "macRed"
},
"diffContext": {
"dark": "macOverlay2",
"light": "macOverlay2"
},
"diffHunkHeader": {
"dark": "macPeach",
"light": "macPeach"
},
"diffHighlightAdded": {
"dark": "macGreen",
"light": "macGreen"
},
"diffHighlightRemoved": {
"dark": "macRed",
"light": "macRed"
},
"diffAddedBg": {
"dark": "#29342b",
"light": "#29342b"
},
"diffRemovedBg": {
"dark": "#3a2a31",
"light": "#3a2a31"
},
"diffContextBg": {
"dark": "macMantle",
"light": "macMantle"
},
"diffLineNumber": {
"dark": "macSurface1",
"light": "macSurface1"
},
"diffAddedLineNumberBg": {
"dark": "#223025",
"light": "#223025"
},
"diffRemovedLineNumberBg": {
"dark": "#2f242b",
"light": "#2f242b"
},
"markdownText": {
"dark": "macText",
"light": "macText"
},
"markdownHeading": {
"dark": "macMauve",
"light": "macMauve"
},
"markdownLink": {
"dark": "macBlue",
"light": "macBlue"
},
"markdownLinkText": {
"dark": "macSky",
"light": "macSky"
},
"markdownCode": {
"dark": "macGreen",
"light": "macGreen"
},
"markdownBlockQuote": {
"dark": "macYellow",
"light": "macYellow"
},
"markdownEmph": {
"dark": "macYellow",
"light": "macYellow"
},
"markdownStrong": {
"dark": "macPeach",
"light": "macPeach"
},
"markdownHorizontalRule": {
"dark": "macSubtext0",
"light": "macSubtext0"
},
"markdownListItem": {
"dark": "macBlue",
"light": "macBlue"
},
"markdownListEnumeration": {
"dark": "macSky",
"light": "macSky"
},
"markdownImage": {
"dark": "macBlue",
"light": "macBlue"
},
"markdownImageText": {
"dark": "macSky",
"light": "macSky"
},
"markdownCodeBlock": {
"dark": "macText",
"light": "macText"
},
"syntaxComment": {
"dark": "macOverlay2",
"light": "macOverlay2"
},
"syntaxKeyword": {
"dark": "macMauve",
"light": "macMauve"
},
"syntaxFunction": {
"dark": "macBlue",
"light": "macBlue"
},
"syntaxVariable": {
"dark": "macRed",
"light": "macRed"
},
"syntaxString": {
"dark": "macGreen",
"light": "macGreen"
},
"syntaxNumber": {
"dark": "macPeach",
"light": "macPeach"
},
"syntaxType": {
"dark": "macYellow",
"light": "macYellow"
},
"syntaxOperator": {
"dark": "macSky",
"light": "macSky"
},
"syntaxPunctuation": {
"dark": "macText",
"light": "macText"
}
}
}

4
opencode/tui.json Normal file
View file

@ -0,0 +1,4 @@
{
"$schema": "https://opencode.ai/tui.json",
"theme": "custom"
}