Skip to content

Commit 0b51628

Browse files
authored
Merge pull request #69 from xoxruns/tui_refactor
After multiple struggles to make ink work properly, I'm changing the CLI to use openTUI https://opentui.com/ which is way better in many ways. Adding multiple new features : - Task show : when pressing `ctrl+T` we can now see the tasks running - `ctrl+O` expands and collapses the tooling results. - Adding validation command to switch between FLAG, LLM as a judge or Hybrid
2 parents 2a7a200 + 8090e80 commit 0b51628

90 files changed

Lines changed: 5429 additions & 10662 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-cli.yml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,38 @@ jobs:
2323
- os: ubuntu-latest
2424
platform: linux
2525
arch: x86_64
26-
binary_name: deadend-server
26+
target: bun-linux-x64
27+
binary_name: deadend-cli
2728
- os: macos-latest
2829
platform: macos
29-
arch: x86_64
30-
binary_name: deadend-server
30+
arch: aarch64
31+
target: bun-darwin-arm64
32+
binary_name: deadend-cli
3133

3234
steps:
3335
- name: Checkout code
3436
uses: actions/checkout@v5
3537

36-
- name: Setup Deno
37-
uses: denoland/setup-deno@v2
38+
- name: Setup Bun
39+
uses: oven-sh/setup-bun@v2
3840
with:
39-
deno-version: v2.x
41+
bun-version: latest
42+
43+
- name: Install dependencies
44+
working-directory: cli/deadend
45+
run: bun install --frozen-lockfile
4046

4147
- name: Build CLI binary
42-
working-directory: cli/deadend_cli
48+
working-directory: cli/deadend
4349
run: |
44-
deno compile \
45-
--allow-all \
46-
--target ${{ matrix.arch }}-${{ matrix.platform == 'linux' && 'unknown-linux-gnu' || 'apple-darwin' }} \
47-
--output ${{ matrix.binary_name }} \
48-
main.tsx
50+
bun build --compile \
51+
--target=${{ matrix.target }} \
52+
--outfile ${{ matrix.binary_name }} \
53+
index.ts
4954
5055
- name: Create package directory
5156
id: package
52-
working-directory: cli/deadend_cli
57+
working-directory: cli/deadend
5358
run: |
5459
PACKAGE_NAME="deadend-cli-${{ matrix.platform }}-${{ matrix.arch }}"
5560
mkdir -p "$PACKAGE_NAME"
@@ -58,12 +63,12 @@ jobs:
5863
echo "binary=${{ matrix.binary_name }}" >> $GITHUB_OUTPUT
5964
6065
- name: Create archive
61-
working-directory: cli/deadend_cli
66+
working-directory: cli/deadend
6267
run: |
6368
tar -czf "${{ steps.package.outputs.name }}.tar.gz" "${{ steps.package.outputs.name }}"
6469
6570
- name: Create checksum
66-
working-directory: cli/deadend_cli
71+
working-directory: cli/deadend
6772
run: |
6873
if command -v sha256sum >/dev/null 2>&1; then
6974
sha256sum "${{ steps.package.outputs.name }}.tar.gz" > "${{ steps.package.outputs.name }}.tar.gz.sha256"
@@ -76,8 +81,8 @@ jobs:
7681
with:
7782
name: deadend-cli-${{ matrix.platform }}-${{ matrix.arch }}
7883
path: |
79-
cli/deadend_cli/${{ steps.package.outputs.name }}.tar.gz
80-
cli/deadend_cli/${{ steps.package.outputs.name }}.tar.gz.sha256
84+
cli/deadend/${{ steps.package.outputs.name }}.tar.gz
85+
cli/deadend/${{ steps.package.outputs.name }}.tar.gz.sha256
8186
retention-days: 30
8287

8388
release:
@@ -88,7 +93,7 @@ jobs:
8893
permissions:
8994
contents: write
9095
id-token: write
91-
96+
9297
steps:
9398
- name: Checkout code
9499
uses: actions/checkout@v5
@@ -117,22 +122,23 @@ jobs:
117122
name: CLI Release ${{ steps.version.outputs.version }}
118123
body: |
119124
## Deadend CLI ${{ steps.version.outputs.version }}
120-
125+
121126
### What's changed ?
127+
- [x] Rewrote CLI from Deno/React to Bun/OpenTUI
122128
- [x] Adding LLM error handling in the CLI.
123129
- [x] Adding interruption feature to stop the agent at any time.
124130
- [x] Handling and verify Ollama cloud models.
125131
126132
### Downloads
127-
133+
128134
**Linux (x86_64):**
129135
- `deadend-cli-linux-x86_64.tar.gz`
130-
131-
**macOS (x86_64):**
132-
- `deadend-cli-macos-x86_64.tar.gz`
133-
136+
137+
**macOS (ARM64):**
138+
- `deadend-cli-macos-aarch64.tar.gz`
139+
134140
### Installation
135-
141+
136142
Download and run the install script:
137143
```bash
138144
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/install.sh | bash -s -- --version ${{ steps.version.outputs.version }}

.github/workflows/build-release.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,46 +149,49 @@ jobs:
149149
- os: ubuntu-latest
150150
platform: linux
151151
arch: x86_64
152-
target: x86_64-unknown-linux-gnu
152+
target: bun-linux-x64
153153
- os: macos-latest
154154
platform: macos
155155
arch: aarch64
156-
target: aarch64-apple-darwin
156+
target: bun-darwin-arm64
157157

158158
steps:
159159
- name: Checkout code
160160
uses: actions/checkout@v5
161161

162-
- name: Setup Deno
163-
uses: denoland/setup-deno@v2
162+
- name: Setup Bun
163+
uses: oven-sh/setup-bun@v2
164164
with:
165-
deno-version: v2.x
165+
bun-version: latest
166+
167+
- name: Install dependencies
168+
working-directory: cli/deadend
169+
run: bun install --frozen-lockfile
166170

167171
- name: Build CLI binary
168-
working-directory: cli/deadend_cli
172+
working-directory: cli/deadend
169173
run: |
170-
deno compile \
171-
--allow-all \
172-
--target ${{ matrix.target }} \
173-
--output deadend-cli \
174-
main.tsx
174+
bun build --compile \
175+
--target=${{ matrix.target }} \
176+
--outfile deadend-cli \
177+
index.ts
175178
176179
- name: Create package directory
177180
id: package
178-
working-directory: cli/deadend_cli
181+
working-directory: cli/deadend
179182
run: |
180183
PACKAGE_NAME="deadend-cli-${{ matrix.platform }}-${{ matrix.arch }}"
181184
mkdir -p "$PACKAGE_NAME"
182185
cp deadend-cli "$PACKAGE_NAME/"
183186
echo "name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
184187
185188
- name: Create archive
186-
working-directory: cli/deadend_cli
189+
working-directory: cli/deadend
187190
run: |
188191
tar -czf "${{ steps.package.outputs.name }}.tar.gz" "${{ steps.package.outputs.name }}"
189192
190193
- name: Create checksum
191-
working-directory: cli/deadend_cli
194+
working-directory: cli/deadend
192195
run: |
193196
if command -v sha256sum >/dev/null 2>&1; then
194197
sha256sum "${{ steps.package.outputs.name }}.tar.gz" > "${{ steps.package.outputs.name }}.tar.gz.sha256"
@@ -201,8 +204,8 @@ jobs:
201204
with:
202205
name: deadend-cli-${{ matrix.platform }}-${{ matrix.arch }}
203206
path: |
204-
cli/deadend_cli/${{ steps.package.outputs.name }}.tar.gz
205-
cli/deadend_cli/${{ steps.package.outputs.name }}.tar.gz.sha256
207+
cli/deadend/${{ steps.package.outputs.name }}.tar.gz
208+
cli/deadend/${{ steps.package.outputs.name }}.tar.gz.sha256
206209
retention-days: 30
207210

208211
release:

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,17 @@ chunks.txt
7373
chunks_html.txt
7474

7575
.logfire
76-
CLAUDE.md
7776

7877
# benchmark runs
7978
**/run-*/
8079
**/docs/
8180
docs/
8281

83-
.codex
82+
# AI tool configs (recursive)
83+
**/CLAUDE.md
84+
**/.cursor/
85+
# Match .codex file or dir anywhere; trailing slash alone would miss a file named `.codex`.
86+
**/.codex
87+
88+
# Internal docs
89+
docs/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ cd deadend-cli
190190
uv sync
191191
```
192192

193-
**Run CLI with Deno**
193+
**Run CLI**
194194

195-
To run the CLI interface directly with Deno for development:
195+
To run the maintained CLI for development:
196196

197197
```bash
198-
cd cli/deadend_cli
199-
deno task dev
198+
cd cli/deadend
199+
bun run dev
200200
```
201201

202202
---

cli/deadend/.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store

cli/deadend/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# deadend
2+
3+
Bun-based OpenTUI rewrite of the deadend CLI.
4+
5+
## Install
6+
7+
```bash
8+
bun install
9+
```
10+
11+
## Run
12+
13+
```bash
14+
bun run index.ts
15+
```
16+
17+
## Options
18+
19+
```bash
20+
bun run index.ts --help
21+
```
22+
23+
Supported flags:
24+
25+
- `--mode supervisor|yolo`
26+
- `--dev`
27+
- `--debug`
28+
- `--codebase <dir>`
29+
- `--target <value>`
30+
- `--prompt <value>`
31+
32+
## Notes
33+
34+
- It reads the same config and settings files under `~/.cache/deadend`.
35+
- It preserves the terminal transcript model from the earlier CLI while using OpenTUI instead of Ink.
36+
- `--dev` and `--debug` launch the Python JSON-RPC server with `uv` from the repo's `deadend_cli` package.
37+
- Keyboard handling notes live in `docs/deadend-cli-keyboard.md`.

0 commit comments

Comments
 (0)