Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d23aaac
docs: record cli test-harness import-path blocker
highruned Feb 20, 2026
0914407
refactor cli link to socketLink + fix local fallback
highruned Feb 20, 2026
457727b
cli: restore command output and verify cerebro websocket flow
highruned Feb 20, 2026
7bc2f53
cli: default local link fallback and refresh test snapshots
highruned Feb 20, 2026
3f6ea0f
fix(cli): remove verbose error debug noise
highruned Feb 20, 2026
50f9051
docs: document verified cerebro websocket CLI commands
highruned Feb 20, 2026
b17afff
fix(cli): preserve hyphen-prefixed values in array flags
highruned Feb 20, 2026
2171b38
fix(cli): preserve lone hyphen in array flag values
highruned Feb 20, 2026
57fd20e
fix cli array flag parsing for equals-assigned values
highruned Feb 20, 2026
c80a42a
docs: record cli-cerebro websocket validation run
highruned Feb 20, 2026
38306ce
test(cli): cover short alias equals array flags
highruned Feb 21, 2026
827ef83
test(cli): lock repeated short-alias array flag parsing
highruned Feb 21, 2026
7a2d159
Harden optional remote router registration and stabilize fs e2e timing
highruned Feb 21, 2026
a870391
Reduce eager route/socket initialization for namespaced CLI commands
highruned Feb 21, 2026
e9c584f
fix cli array flag boundary for short tokens
highruned Feb 21, 2026
c688577
Fix CI to run CLI tests inside arken Rush workspace
highruned Feb 21, 2026
ca6fab9
test: cover README cerebro websocket commands
highruned Feb 21, 2026
9ebd6ae
fix shorthand parser trailing empty params
highruned Feb 21, 2026
e98c8b2
Preserve quoted whitespace in shorthand params
highruned Feb 21, 2026
cf270a0
test(cli): cover README cerebro.ask websocket command
highruned Feb 21, 2026
9bb4a0a
test: cover bin cerebro.ask README websocket path
highruned Feb 21, 2026
289f597
docs: record 2026-02-21 websocket README validation run
highruned Feb 21, 2026
3dab620
Handle hyphenated shorthand agent/method names
highruned Feb 21, 2026
220380b
test and fix README cerebro.exec websocket flows
highruned Feb 21, 2026
ada82bd
fix cli shorthand trailing backslash param parsing
highruned Feb 21, 2026
9bfdb86
docs: pin cerebro-link websocket port in README workflow
highruned Feb 22, 2026
cef36f9
ci: update monorepo sync path from packages/cli to cli
highruned Feb 22, 2026
bc97dd7
test: cover README config.list commands in websocket smoke
highruned Feb 22, 2026
63b4da9
docs(cli): log websocket interop verification run
highruned Feb 22, 2026
3c74f84
docs: make cerebro-link README flow use auto websocket port
highruned Feb 22, 2026
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
100 changes: 85 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,96 @@
name: CI

on:
push: {}
pull_request: {}

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- run: npm install -g @microsoft/rush
- run: git clone https://github.com/arkenrealms/arken.git
- run: cd arken
- run: rush install
- run: rush update
- run: rushx build
- run: rushx lint
- run: rushx test
- name: Checkout cli repo
uses: actions/checkout@v4
with:
path: cli

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.11.1

- name: Enable corepack
run: corepack enable

- name: Install Rush
run: npm install -g @microsoft/rush

- name: Clone arken monorepo
run: git clone --depth=1 https://github.com/arkenrealms/arken.git arken

- name: Sync cli sources into monorepo app path
run: |
rsync -a --delete \
--exclude '.git' \
--exclude 'node_modules' \
--exclude '.rush' \
--exclude '.github' \
cli/ arken/cli/

- name: Install dependencies
run: rush install
working-directory: arken

- name: Build cli
run: rushx build
working-directory: arken/cli

- name: Lint cli
run: rushx lint
working-directory: arken/cli

- name: Test cli
run: rushx test
working-directory: arken/cli

test_trpc_vnext:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- run: npm install -g @microsoft/rush
- run: rush add -p @trpc/server@next
- run: rushx test e2e
- name: Checkout cli repo
uses: actions/checkout@v4
with:
path: cli

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.11.1

- name: Enable corepack
run: corepack enable

- name: Install Rush
run: npm install -g @microsoft/rush

- name: Clone arken monorepo
run: git clone --depth=1 https://github.com/arkenrealms/arken.git arken

- name: Sync cli sources into monorepo app path
run: |
rsync -a --delete \
--exclude '.git' \
--exclude 'node_modules' \
--exclude '.rush' \
--exclude '.github' \
cli/ arken/cli/

- name: Install dependencies
run: rush install
working-directory: arken

- name: Upgrade tRPC server (next)
run: rush add -p @trpc/server@next --make-consistent
working-directory: arken/cli

- name: Run tests with tRPC next
run: rushx test
working-directory: arken/cli
197 changes: 197 additions & 0 deletions ANALYSIS.md

Large diffs are not rendered by default.

47 changes: 39 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
Run `rush update`

## Local test-gate note (rotation automation)
In this checkout, test execution is currently blocked until dependencies/workspace links are restored:
- `rushx test` may fail if Rush cannot resolve all workspace packages.
- `npm test` requires local `vitest` to be installed and available.
Use Node 20 and Rush scripts in this workspace:
- `source ~/.nvm/nvm.sh && nvm use 20`
- `rushx test`

## Using Commands

Try out:

```bash
source ~/.nvm/nvm.sh
nvm use 20

rushx dev

# OR
Expand All @@ -23,6 +26,26 @@ rushx cli config.list
./bin/arken config.list
```

### Cerebro link over tRPC websocket

Start `@arken/cerebro-link` first (in this workspace, prefer an auto-selected free port):

```bash
# from arken/cerebro/link
source ~/.nvm/nvm.sh
nvm use 20
PORT=0 rushx dev
```

Then run CLI commands against the websocket URI printed by cerebro-link (`ws://localhost:<port>`):

```bash
CEREBRO_SERVICE_URI=ws://127.0.0.1:<port> rushx cli cerebro.info
CEREBRO_SERVICE_URI=ws://127.0.0.1:<port> ./bin/arken cerebro.info
```

If you want to pin a port (for scripts/automation), set `PORT=<fixed-port>` and make sure that port is free first.

## Usage

### Commands
Expand Down Expand Up @@ -69,12 +92,20 @@ cerebro.exec Gon.ask("calculate 1+1", "you always reply with a smile")
Gon.ask("calculate 1+1", "you always reply with a smile")
```

For list-style flags, spaced, equals, and repeated short-alias forms are accepted:

```bash
rushx cli some.command --values a b c
rushx cli some.command --values=a --values=b --values=c
rushx cli some.command -v a -v b -v c
```

Run the individual module CLI:

```
npx tsx src/modules/config/config.cli.ts list
npx tsx src/modules/config/config.cli.ts set metaverse Arken
npx tsx src/modules/application/application.cli.ts create ABC
npx tsx src/modules/math/math.cli.ts add 1 1
npx tsx src/modules/help/help.cli.ts man cerebro
npx tsx modules/config/config.cli.ts list
npx tsx modules/config/config.cli.ts set metaverse Arken
npx tsx modules/application/application.cli.ts create ABC
npx tsx modules/math/math.cli.ts add 1 1
npx tsx modules/help/help.cli.ts man cerebro
```
5 changes: 3 additions & 2 deletions bin/arken
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env ts-node
#!/usr/bin/env node

require('../cli');
require('tsx/cjs');
require('../cli.ts');
Loading
Loading