Skip to content

Conversation

@lukechi1219
Copy link

Summary

  • Add happy export command to export archived sessions to markdown files
  • Decrypt sessions using backup key from mobile app
  • Support incremental export with status tracking
  • Generate readable markdown with conversation history

Changes

  • src/commands/export.ts: New export command implementation
  • src/api/encryption.ts: Add libsodiumKeyPairFromSeed and decryptBox for session key unwrapping
  • src/utils/backupKey.ts: Add base32 decoding and parseBackupKey
  • src/index.ts: Wire up export command
  • README.md: Document new command and environment variable

Usage

# Using environment variable
export HAPPY_BACKUP_KEY="XXXXX-XXXXX-..."
happy export

# Or pass as argument
happy export "XXXXX-XXXXX-..."

# Show help
happy export help

Test plan

- Build passes
- happy export help shows usage
- Export successfully decrypts and exports sessions
- Incremental export skips already-exported sessions

🤖 Generated with https://claude.ai/code

Add `happy export` command to export archived sessions to markdown files.

Features:
- Decrypt sessions using backup key from mobile app
- Incremental export with status tracking
- Generate readable markdown with conversation history

Files:
- src/commands/export.ts: New export command implementation
- src/api/encryption.ts: Add libsodiumKeyPairFromSeed and decryptBox
- src/utils/backupKey.ts: Add base32 decoding and parseBackupKey
- src/index.ts: Wire up export command

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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.

1 participant