Account Commands

rn account register

Generate an Ed25519 keypair and register the public key with the server.

rn account register

Keys are saved to the paths configured in ~/.rn/config.toml (defaults: ~/.rn/private.key and ~/.rn/public.key). If keys already exist, the existing public key is re-registered.

The server returns your fingerprint — a SHA-256 hash of your public key that uniquely identifies your account.

rn account login

Authenticate with the server using your private key.

rn account login

The login flow:

  1. Client requests a challenge nonce from the server
  2. Client signs the message rockstar.ninja.v1.auth:{nonce}:{fingerprint} with your private key
  3. Server verifies the signature and issues a JWT

The token is cached at ~/.rn/token (mode 0600) and refreshed automatically when it expires. You rarely need to run this manually — the CLI re-authenticates transparently on 401 responses.

rn login

Authenticate your web browser to view private content on rockstar.ninja.

rn login

Note: This is a top-level command, not rn account login.

The command requests a one-time login code from the server, then opens your default browser to exchange it for a 30-day session cookie. Once logged in, you can view your private sessions, plans, and projects directly on the site.

The login code expires after 5 minutes and can only be used once. If it expires, run rn login again. You can log out at any time via the toolbar on the site.

rn account whoami

Display your current identity.

rn account whoami

Shows your fingerprint, username (if set), and profile URL.

rn account username set

Claim or change your username.

rn account username set <name>

Rules:

  • 3-20 characters
  • Lowercase alphanumeric and hyphens only
  • Cannot start or end with a hyphen
  • Must not be a reserved name

Setting a username gives you a profile page at rockstar.ninja/@name. Your username appears on all sessions and plans you share.

Cooldown: You can only change your username once per year. The server returns a warning with the next available change date.

rn account username release

Release your current username, making it available for others to claim.

rn account username release

rn account export

Download all your data as a ZIP archive. Exports include all sessions (all versions, decompressed JSONL), plans (all versions, raw markdown), projects, and account info.

rn account export request

Request a new data export. The server builds the archive in the background.

rn account export request [--format zip]

The command polls the server and shows a spinner until the export is ready. Only one export per account at a time — requesting a new export replaces any existing one.

Exports expire after 48 hours.

rn account export status

Check the current export status.

rn account export status

Shows status (pending, building, ready, or failed), format, file size, session/plan counts, and time until expiration.

rn account export download

Download a ready export to a local file.

rn account export download [-o file]

Default filename: rockstar-ninja-export.zip. The download URL uses a cryptographic token — no authentication header is needed for the download itself.

rn account export delete

Delete the current export from the server.

rn account export delete

Export archive structure

rockstar-ninja-export/
├── manifest.json              # format version, export timestamp, counts
├── account.json               # fingerprint, username, created_at
├── projects/
   └── {nanoid}.json          # label, privacy, description, timestamps
├── sessions/
   └── {nanoid}/
       ├── metadata.json      # session_id, slug, title, privacy, provider, etc.
       ├── v1.jsonl           # decompressed session transcript
       └── v2.jsonl
└── plans/
    └── {nanoid}/
        ├── metadata.json      # name, title, privacy, timestamps
        ├── v1.md              # plan content (raw markdown)
        └── v2.md

rn account destroy

Permanently delete your account and all associated data.

rn account destroy

This deletes everything: your account, all shared sessions (all versions), all shared plans (all versions), your username, and your key registration. You'll be prompted with a confirmation code before deletion proceeds.

This action is irreversible.