feat: add keeply export command#4
Conversation
New keeply export command downloads all bookmarks to stdout (default) or a file via --output. Supports --format json (default) and --format html for browser-importable Netscape format. Composable with pipes: keeply export | jq '.[].url'. Closes Keeply-link/docs#3
RolfKoenders
left a comment
There was a problem hiding this comment.
Overall solid implementation with good test coverage. One issue:\n\n****: The entire file was reformatted from single quotes to double quotes, creating a noisy diff. This makes it hard to see the actual functional change (adding ). Please revert the quote-style changes to match the existing file style, or split the formatting into a separate commit.\n\nOther minor notes:\n- Consider adding a timeout on the call for large exports.\n- The mutation pattern in tests works but is slightly fragile if tests ever run in parallel.\n\nPlease fix the quote churn in and I'll approve.
|
Review: Needs minor fix\n\nOverall solid implementation with good test coverage. One issue:\n\n****: The entire file was reformatted from single quotes to double quotes, creating a noisy diff. This makes it hard to see the actual functional change (adding ). Please revert the quote-style changes to match the existing file style, or split the formatting into a separate commit.\n\nOther minor notes:\n- Consider adding a timeout on the call for large exports.\n- The mutation pattern in tests works but is slightly fragile if tests ever run in parallel.\n\nPlease fix the quote churn in and this will be good to go. |
The CLI project had no prettier config, so the pre-commit hook reformatted index.ts from single quotes (existing style) to double quotes (prettier default). Added .prettierrc matching the project standard (singleQuote: true) so future changes stay consistent. Now the only diff in index.ts vs main is the registerExportCommand import and call.
|
Fixed in 6b87383. Root cause: the CLI project had no |
Summary
keeply exportcommand — no equivalent existed before--format json(default) and--format htmlfor Netscape browser importkeeply export | jq '.[].url')--output <file>writes to disk and printsSaved to <file>to stderr--include-trashedflag to include soft-deleted bookmarksfetchwithApiKeyauth header (rather thanKeeplyApi.request()which always calls.json())keeply config set-keyexport.spec.tscovering all flags, stdout/file modes, API errors, and missing configTest plan
npx tsc --noEmit— cleannpm test— all 59 tests pass including 9 new export testskeeply export— streams JSON to terminalkeeply export --format html --output bookmarks.html— writes file, prints "Saved to bookmarks.html"keeply export | jq '.[].url'— works as pipeCloses Keeply-link/docs#3