The matured dev-env backport removed dev.sh (which provided `dev up/down/logs/shell`) but the seeded CLAUDE.md files still told users — and Claude sessions, since these symlink into ~/dev/ — to run those commands. `dev` is now just a nav function (cd $DEV_ROOT), so `dev up` silently cd'd and started nothing. Rewrite both Quick-commands / Default-dev-workflow sections to the real command set (lb/prb/dev-status/regtest-start/dev-deploy) and document that FakeWallet startup is manual — there is no `dev up` wrapper.
78 lines
3.3 KiB
Markdown
78 lines
3.3 KiB
Markdown
# `~/dev` — lnbits dev workspace
|
|
|
|
You're working in a dev workspace bootstrapped by **lnbits-sensei**.
|
|
This file is workspace-level orientation; per-project CLAUDE.md files
|
|
(e.g. `~/dev/lnbits/CLAUDE.md`) layer project-specific gotchas on top.
|
|
|
|
> This file is a symlink into your lnbits-sensei checkout's
|
|
> `files/dev-CLAUDE.md` (via home-manager's `mkOutOfStoreSymlink`).
|
|
> Edits should happen in the checkout and be committed there.
|
|
|
|
## Layout
|
|
|
|
```
|
|
~/dev/
|
|
├── repos/ # bare git repos, one per project
|
|
├── <project>/<worktree>/ # worktrees per branch
|
|
├── upstream-prs/<topic>/ # PR branches against upstreams
|
|
├── shared/, scratch/ # workspace utilities
|
|
└── refs/ # curated reference repos (optional)
|
|
```
|
|
|
|
Rationale: bare-repos + per-project-worktree directories means one git
|
|
object database per project (no clone-per-branch churn) and an explicit
|
|
PR contract in `upstream-prs/`. See the lnbits-sensei README's
|
|
"Workspace layout" section for the full reasoning.
|
|
|
|
## Quick commands
|
|
|
|
Installed by lnbits-sensei's dev-env module — standalone binaries plus
|
|
shell functions sourced into interactive shells:
|
|
|
|
- `dev-env-bootstrap` — materialize bare repos + worktrees from your
|
|
declared `projects` (idempotent; `--dry-run` to preview).
|
|
- `lb <worktree>` — cd into `~/dev/lnbits/<worktree>` (e.g. `lb dev`).
|
|
`g <category> <repo>`, `ext <name>`, `prs`, `shared`, `repos` cover
|
|
the rest of the tree.
|
|
- `prb <repo> <branch>` — create a PR worktree branched from
|
|
`upstream/main` under `~/dev/upstream-prs/`; `prc` cleans up, `prl`
|
|
lists.
|
|
- `dev-status` — dirty + ahead/behind across every worktree. `wts` /
|
|
`wtu` sync worktrees / fetch upstream; `rebase status` shows which
|
|
forks need rebasing onto upstream.
|
|
- `regtest-start <worktree>` / `regtest-stop` — Bitcoin/Lightning
|
|
regtest stack (only when `devEnv.regtest.enable = true`; needs docker).
|
|
- `dev-deploy <host>` — `nixos-rebuild` against your deploy flake.
|
|
`dev-tm <session>` — launch a declarative tmux session.
|
|
|
|
**Starting lnbits for iteration:** there is no `dev up` wrapper.
|
|
FakeWallet (`LNBITS_BACKEND_WALLET_CLASS=FakeWallet`) is the default
|
|
path — no docker; run lnbits directly from the worktree (`lb dev`, then
|
|
lnbits's own run command). Use `regtest-start` only when you need real
|
|
channels/payments.
|
|
|
|
## Reference docs
|
|
|
|
Full reference lives in the lnbits-sensei checkout's `docs/`:
|
|
|
|
- `docs/remotes.md` — three remote-topology patterns (upstream-only /
|
|
github-fork / multi-remote-with-private).
|
|
- `docs/upstream-prs.md` — PR workflow with a primer for anyone new
|
|
to fork-based contribution.
|
|
- `docs/lnbits-upstream-flow.md` — how `lnbits/lnbits` itself moves
|
|
(the `dev` / `main` branch split, squash-merge convention).
|
|
- `docs/lnbits-workspace-notes.md` — practical gotchas: port choice,
|
|
`LNBITS_SRC` build-context traps, extension-folder-upgrade wiping
|
|
forks, Nostr key handling, CLINK scope, fork versioning, **settings
|
|
precedence (`.env` vs DB)**.
|
|
|
|
## Per-project orientations
|
|
|
|
Per-project CLAUDE.md files are placed at the worktree root:
|
|
|
|
- `~/dev/lnbits/CLAUDE.md` — LNbits dev gotchas (settings precedence,
|
|
frontend rules, auth decorators, …).
|
|
|
|
These are also symlinked from your lnbits-sensei checkout (under
|
|
`files/`); the seeding is driven by `lnbits-sensei.devEnv.claude.*`
|
|
options.
|