Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New CLI command: pear data to print local database contents #525

Merged
merged 35 commits into from
Jan 21, 2025

Conversation

AndreiRegiani
Copy link
Contributor

@AndreiRegiani AndreiRegiani commented Jan 6, 2025

$ pear data

Pear ~ Welcome to the Internet of Peers
🍐 v0.dev./Users/user/holepunch/pear

  pear data [flags] [command]

  View database contents

  Local data stored in this device.

  Flags:
    --secrets   Show sensitive information, i.e. encryption-keys
    --json      Newline delimited JSON output
    --help|-h   Show help

  Commands:
    apps        Installed apps
    dht         DHT known-nodes cache

  • Bundle collection
$ pear data --secrets apps

- pear://aaaaarnjxokeem1zcxh8e3agedgj6i95dc86g7zp1qd7w1h9boodo
      appStorage: /Users/user/holepunch/pear/pear/app-storage/by-dkey/aaaa30fb0c8be67d0f22d1c653084aa5309f6b7c369983273f3b769bed1cc3e
      encryptionKey: aabbccddc96f1f10d84eba78b9d639a0c64ee75827206f39cc199e2fd32b44aaaaa


- pear://bbbbbbabf55kwunpycdiqmkysyy36nzcw3ye6bsnttgpcwgpp8fcy
      appStorage: /Users/user/holepunch/pear/pear/app-storage/by-dkey/bbbbbb28b3966948ed165083985a37b03bb0f343644f777784720b53e87441d6

  • Bundle collection filter by link
$ pear data apps pear://keet

- pear://keet
      appStorage: /Users/user/holepunch/pear/pear/app-storage/by-dkey/197ea022b663edbedcf0b2a0fe44ebc99c21448cb46d375ec77d95de6e0a4c1a

DHT collection

$ pear data dht

111.222.237.123:38689
111.222.147.8:60357
111.222.185.104:39033

JSON output

--json flag

$ pear data --json dht

{"host":"111.222.28.20","port":40974},{"host":"111.222.237.154","port":50688},{"host":"111.222.237.154","port":49741}]}
{"cmd":"data","tag":"final","data":{"success":true}}

Screenshots

(my system bold=yellow)
image


image

@AndreiRegiani AndreiRegiani added the enhancement New feature or request label Jan 6, 2025
@AndreiRegiani
Copy link
Contributor Author

@AndreiRegiani AndreiRegiani changed the title [WIP] CLI command to list 'installed apps' New CLI command: pear data to print local database contents Jan 14, 2025
@AndreiRegiani AndreiRegiani marked this pull request as ready for review January 14, 2025 23:19
gui/preload.js Outdated Show resolved Hide resolved
@rafapaezbas
Copy link
Contributor

we should add test

@AndreiRegiani
Copy link
Contributor Author

NOTE: "pear-ipc": "github:holepunchto/pear-ipc#cli-list-bundles"

@rafapaezbas
Copy link
Contributor

lgtm

@davidmarkclements davidmarkclements merged commit fa19998 into main Jan 21, 2025
3 checks passed
@davidmarkclements davidmarkclements deleted the cli-list-bundles branch January 21, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants