Skip to content

feat(cli): scripted unlock, ~/.edw data dir, clean stdout, exit codes - #118

Merged
kassandraoftroy merged 4 commits into
masterfrom
feat/cli-ux-improvements
Oct 26, 2026
Merged

kassandraoftroy merged 4 commits into
masterfrom
feat/cli-ux-improvements

Conversation

@fbwoolf

@fbwoolf fbwoolf commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #106. Supersedes #112.

  • Breaking: balance --verbose is now balance --detailed, so -v/--verbose means more logging on every command.
  • Breaking: the data directory is ~/.edw from any folder. It used to be ./.edw under the current directory, so each folder had its own wallet. The variable is renamed from DATA_DIR to EDW_DATA_DIR so it doesn't clash with other tools. Existing users: move ./.edw to ~/.edw or pass --data-dir ./.edw.
  • Scripts can open a locked wallet without a session. A command that can't prompt (under --non-interactive, or with stdin piped as in a script or CI) used to fail unless edw unlock had left a session. Now it can read the password from EDW_DECRYPTION_PASSWORD.
  • Scripts work on macOS. macOS keeps no session, so edw unlock --non-interactive and every command without a terminal used to fail. Now unlock succeeds and reports that no session was kept, and commands read EDW_DECRYPTION_PASSWORD. Sessions on macOS are EDW-030 - Keep the unlock session in memory #116.
  • An outdated session no longer blocks every command. If the wallet's password changed, every command failed with "incorrect password" until edw lock. Now that session is dropped and the wallet counts as locked.
  • Logs no longer mix with output. Info logs used to go to stdout, into --non-interactive JSON. Now they go to stderr at warn, adjustable with -v and -q.
  • Exit codes say what went wrong. Every failure used to exit 1. Now 2 is bad input, 3 is a locked wallet or wrong password, and 1 is anything else; codes for network failures are EDW-031 - Let core errors say whether they are worth retrying #117.
  • --non-interactive failures are JSON. They used to be plain Error: text on stderr; now they're one edw/error document on stdout, parsed like any other result.
  • edw config view shows where you are. It now lists the networks that exist, the active RPC, and where a session is held, and works while locked.
  • --help lists only working commands. network status, database migrate and database purge only errored; they're hidden.
  • Session store failures report the real error. An empty XDG_RUNTIME_DIR used to put the session in ./edw, edw lock said "nothing to do" when the store couldn't be opened, and a failed unlock could leave the previous network unlocked while saying otherwise.

@fbwoolf fbwoolf changed the title feat: CLI usability: scripted unlock, ~/.edw data dir, clean stdout, exit codes feat(cli): scripted unlock, ~/.edw data dir, clean stdout, exit codes Oct 25, 2026

@kassandraoftroy kassandraoftroy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kassandraoftroy
kassandraoftroy merged commit c1da8f4 into master Oct 26, 2026
4 of 5 checks passed
@fbwoolf
fbwoolf deleted the feat/cli-ux-improvements branch October 26, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EDW-028 - CLI usability: scripted unlock, a stable data directory, clean stdout

2 participants