Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d8afc1b
build(deps): bump the cargo group across 2 directories with 1 update …
dependabot[bot] Feb 4, 2026
6b1a1ad
build(deps): bump the npm_and_yarn group across 4 directories with 2 …
dependabot[bot] Feb 12, 2026
fec0070
build(deps): bump the npm_and_yarn group across 3 directories with 2 …
dependabot[bot] Feb 17, 2026
5df452a
build(deps): bump the npm_and_yarn group across 2 directories with 1 …
dependabot[bot] Feb 17, 2026
58221d5
build(deps): bump hono in the npm_and_yarn group across 1 directory (…
dependabot[bot] Feb 21, 2026
0b65110
build(deps): bump the npm_and_yarn group across 3 directories with 2 …
dependabot[bot] Feb 21, 2026
dca45ad
build(deps): bump the npm_and_yarn group across 3 directories with 3 …
dependabot[bot] Feb 25, 2026
3cee31d
build(deps): bump rollup (#391)
dependabot[bot] Feb 25, 2026
0daf1a6
feat(devnet): add interactive config editor (#392)
RetricSu Feb 27, 2026
2c87f23
feat: upgrade project infra for AI agent maintainability (#394)
RetricSu Feb 28, 2026
02f9ba2
chore(templates): remove v3 template support (#393)
digi-monkey Feb 28, 2026
4a88eb6
fix(install): force x86_64 architecture on Windows (#399)
RetricSu Mar 10, 2026
1c81d9e
ci: fix changeset workflow to support skip-changeset label (#401)
RetricSu Mar 10, 2026
679dc9d
build(deps): bump the npm_and_yarn group across 1 directory with 2 up…
dependabot[bot] Mar 10, 2026
bcb4e38
build(deps): bump the npm_and_yarn group across 1 directory with 2 up…
dependabot[bot] Mar 10, 2026
89dca90
build(deps): bump hono in the npm_and_yarn group across 1 directory (…
dependabot[bot] Mar 11, 2026
6700502
build(deps): bump tar in the npm_and_yarn group across 1 directory (#…
dependabot[bot] Mar 11, 2026
e90cfe5
fix(ckb-debugger): lazy-load WASI module to suppress ExperimentalWarn…
RetricSu Mar 13, 2026
37189f7
fix(devnet): only show init hint for InitializationError (#408)
RetricSu Mar 13, 2026
24c954f
chore(release): bump version to 0.4.5 (#410)
RetricSu Mar 13, 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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "develop",
"updateInternalDependencies": "patch",
"ignore": []
}
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

119 changes: 119 additions & 0 deletions .github/workflows/changeset-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Changeset Check

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review, labeled]
branches: [master, develop]

jobs:
verify:
name: Verify Changeset
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changeset') && !contains(github.event.pull_request.labels.*.name, 'dependencies') }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check for changeset
id: check
run: |
if pnpm changeset status --since=origin/${{ github.base_ref }}; then
echo "has_changeset=true" >> $GITHUB_OUTPUT
else
echo "has_changeset=false" >> $GITHUB_OUTPUT
exit 1
fi

- name: Comment on PR (success)
if: steps.check.outputs.has_changeset == 'true'
uses: actions/github-script@v7
with:
script: |
const marker = '<!-- changeset-check -->';
const body = marker + '\n✅ Changeset file detected.';

const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});

const existing = comments.find(c => c.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existing.id,
body
});
}

- name: Comment on PR (failure)
if: failure()
uses: actions/github-script@v7
with:
script: |
const marker = '<!-- changeset-check -->';
const body = [
marker,
'❌ **Missing Changeset**',
'',
'Please add a changeset describing your changes:',
'```bash',
'pnpm changeset',
'```',
'',
'If your changes do not need a version bump (docs, CI, refactoring),',
'add the `skip-changeset` label to this PR.',
'',
'For dependency updates, use the `dependencies` label.'
].join('\n');

const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});

const existing = comments.find(c => c.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existing.id,
body
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body
});
}

skipped:
name: Changeset Check (Skipped)
if: ${{ contains(github.event.pull_request.labels.*.name, 'skip-changeset') || contains(github.event.pull_request.labels.*.name, 'dependencies') }}
runs-on: ubuntu-latest
steps:
- run: echo "⏭️ Changeset check skipped via label"
19 changes: 18 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,30 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: npm install -g pnpm && pnpm i
run: pnpm install --frozen-lockfile

- name: Linting
run: pnpm lint
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ jobs:
- name: Install dependencies
run: npm install -g pnpm && pnpm i

- name: Verify changesets are consumed
if: startsWith(github.ref, 'refs/tags/')
run: |
pnpm changeset version
if ! git diff --quiet; then
echo "Error: 'pnpm changeset version' produced uncommitted changes on a tag build."
echo "Please run 'pnpm changeset version' locally, commit the resulting changes, and re-create the tag."
git diff
exit 1
fi

- name: Build
run: pnpm build

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm test
- name: Run tests with coverage threshold
run: pnpm test:ci

- name: Build project
run: pnpm build
Expand Down
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
pnpm lint-staged
pnpm typecheck
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# @offckb/cli

## 0.4.5

### Patch Changes

- 37189f7: fix(devnet): only show init hint for InitializationError

The `offckb devnet config` command was showing the "run `offckb node` once to initialize devnet config files first" hint for ALL errors, including user input errors like invalid `--set` syntax or validation failures.

Now the hint is only shown for actual initialization errors (missing config path, ckb.toml, or miner.toml), making error messages clearer and less misleading.

- Added `InitializationError` class to distinguish initialization errors from user input errors
- Updated `createDevnetConfigEditor()` to throw `InitializationError` for missing files/paths
- Modified `devnetConfig()` catch block to only show hint for `InitializationError`
- Added type safety guard for error handling

Fixes #406

- e90cfe5: fix(ckb-debugger): lazy-load WASI module to suppress ExperimentalWarning

Convert static import of node:wasi to dynamic import with caching.
This prevents the ExperimentalWarning from being emitted when running
non-debugger commands like 'offckb accounts' or 'offckb config list'.

The WASI module is now only loaded when debugger functionality is
actually executed.

Fixes #405

- 4a88eb6: fix(install): force x86_64 architecture on Windows

CKB only provides x86_64 binaries for Windows, not aarch64.
When Windows ARM devices reported 'arm64' via os.arch(), the code
tried to download a non-existent 'aarch64-pc-windows-msvc' binary,
resulting in a 404 error.

This fix forces all Windows systems to use x86_64, which:

- Works correctly on Windows x64
- Works via emulation on Windows ARM devices
- Matches the only Windows binary CKB provides

## Changelog

All notable changes to this project will be documented in this file.
This file is automatically updated by [changesets](https://github.com/changesets/changesets).
42 changes: 36 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,38 @@ offckb system-scripts --output <output-file-path>

By default, OffCKB use a fixed Devnet config. You can customize it, for example by modifying the default log level (`warn,ckb-script=debug`).

1. Locate your Devnet config folder:

1. Open the interactive Devnet config editor:

```sh
offckb devnet config
```

The editor uses a three-column layout: first-column file switcher (`ckb.toml` / `ckb-miner.toml`), a middle primary editing pane, and a smaller right read-only reference pane that shows the full built-in template for the currently selected file.

The left editing pane supports full key browsing/editing, including primitive value edits, object key add, array append/insert/move, search filter, and path delete.

Common shortcuts: `Enter` edit primitive, `a` add key/item, `i` insert array item, `m` move array item, `d` delete path, `/` search filter, `n`/`N` next/previous search match, `c` add custom value in fixed-array dialog (when allowed), `s` save, `q` quit.

Note: saving rewrites `ckb.toml` / `ckb-miner.toml` into canonical TOML format; upstream comments and original formatting are not preserved after save.

You can also update the same fields non-interactively (useful for scripts/CI):

```sh
offckb devnet config --set ckb.logger.filter=info
offckb devnet config --set ckb.rpc.enable_deprecated_rpc=true --set miner.client.poll_interval=1500
```

If your terminal is non-interactive (no TTY, e.g. CI/remote pipeline), use `--set` mode directly instead of the full-screen editor.

1. Save changes and restart devnet:

```sh
offckb clean -d
offckb node
```

1. (Advanced) Locate your Devnet config folder for manual edits:

```sh
offckb config list
```
Expand All @@ -293,12 +323,12 @@ Example result:
}
}
```

Pay attention to the `devnet.configPath` and `devnet.dataPath`.

2. `cd` into the `devnet.configPath` . Modify the config files as needed. See [Custom Devnet Setup](https://docs.nervos.org/docs/node/run-devnet-node#custom-devnet-setup) and [Configure CKB](https://github.com/nervosnetwork/ckb/blob/develop/docs/configure.md) for details.
3. After modifications, run `offckb clean -d` to remove the chain data if needed while keeping the updated config files.
4. Restart local blockchain by running `offckb node`

1. `cd` into the `devnet.configPath` . Modify the config files as needed. See [Custom Devnet Setup](https://docs.nervos.org/docs/node/run-devnet-node#custom-devnet-setup) and [Configure CKB](https://github.com/nervosnetwork/ckb/blob/develop/docs/configure.md) for details.
2. After modifications, run `offckb clean -d` to remove the chain data if needed while keeping the updated config files.
3. Restart local blockchain by running `offckb node`

## Config Setting

Expand Down
Loading
Loading