oc-openchut 0.1.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/README.md +37 -0
- package/package.json +41 -0
- package/src/index.tsx +44 -0
- package/tsconfig.json +12 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# OPENCHUT OpenCode TUI Plugin
|
|
2
|
+
|
|
3
|
+
A TUI plugin that replaces the OpenCode home screen banner with "OPENCHUT".
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
opencode plugin add oc-openchut
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or add to your `opencode.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"plugin": ["oc-openchut"]
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- Replaces the home screen `OPENCODE` logo with `OPENCHUT` ASCII art
|
|
22
|
+
- Pink color scheme for a distinctive look
|
|
23
|
+
- Uses the official `home_logo` slot API
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
bun install
|
|
29
|
+
bun run fmt # format
|
|
30
|
+
bun run fmt:check # check formatting
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Publish
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm publish --access public
|
|
37
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "oc-openchut",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenCode TUI plugin that replaces the home screen OPENCODE banner with OPENCHUT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./tui": {
|
|
8
|
+
"import": "./src/index.tsx",
|
|
9
|
+
"config": {
|
|
10
|
+
"enabled": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/RazoBeckett/oc-openchut.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": ["opencode", "plugin", "tui", "openchut"],
|
|
19
|
+
"author": "RazoBeckett",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"engines": {
|
|
22
|
+
"opencode": ">=1.3.14"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"fmt": "oxfmt --write .",
|
|
26
|
+
"fmt:check": "oxfmt --check ."
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@opencode-ai/plugin": "*",
|
|
30
|
+
"@opentui/core": ">=0.1.97",
|
|
31
|
+
"@opentui/solid": ">=0.1.97",
|
|
32
|
+
"solid-js": "^1.9.11",
|
|
33
|
+
"typescript": "^5"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@opencode-ai/plugin": "*",
|
|
37
|
+
"@opentui/core": ">=0.1.97",
|
|
38
|
+
"@opentui/solid": ">=0.1.97",
|
|
39
|
+
"solid-js": "^1.9.11"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/solid */
|
|
2
|
+
import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui"
|
|
3
|
+
|
|
4
|
+
const id = "openchut.home-logo"
|
|
5
|
+
|
|
6
|
+
const art = [
|
|
7
|
+
" @@@@@@ @@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@ @@@ @@@ @@@ @@@@@@@",
|
|
8
|
+
" @@! @@@ @@! @@@ @@! @@!@!@@@ !@@ @@! @@@ @@! @@@ @@! ",
|
|
9
|
+
" @!@ !@! @!@@!@! @!!!:! @!@@!!@! !@! @!@!@!@! @!@ !@! @!! ",
|
|
10
|
+
" !!: !!! !!: !!: !!: !!! :!! !!: !!! !!: !!! !!: ",
|
|
11
|
+
" : :. : : : :: ::: :: : :: :: : : : : :.:: : : ",
|
|
12
|
+
] as const
|
|
13
|
+
|
|
14
|
+
const colors = [
|
|
15
|
+
"#ff69b4",
|
|
16
|
+
"#ff1493",
|
|
17
|
+
"#db7093",
|
|
18
|
+
"#c71585",
|
|
19
|
+
"#ffb6c1",
|
|
20
|
+
] as const
|
|
21
|
+
|
|
22
|
+
const tui: TuiPlugin = async (api) => {
|
|
23
|
+
api.slots.register({
|
|
24
|
+
order: 100,
|
|
25
|
+
slots: {
|
|
26
|
+
home_logo(ctx) {
|
|
27
|
+
return (
|
|
28
|
+
<box flexDirection="column" alignItems="center">
|
|
29
|
+
{art.map((line, index) => (
|
|
30
|
+
<text fg={colors[index]}>{line}</text>
|
|
31
|
+
))}
|
|
32
|
+
</box>
|
|
33
|
+
)
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const plugin: TuiPluginModule & { id: string } = {
|
|
40
|
+
id,
|
|
41
|
+
tui,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default plugin
|
package/tsconfig.json
ADDED