Reference

Command Line Interface

Use the Arivu CLI to save, search, import, preview, resurface, and operate a local Arivu stack from the terminal.

The Arivu CLI is a terminal client bundled with the backend package. It uses the same API as the web app, so saved bookmarks still run through AI processing, semantic search, resurfacing, analytics, and knowledge graph behavior.

Arivu CLI command map

Install

The backend and CLI require Python 3.11 or newer.

git clone https://github.com/glnarayanan/arivu.git
cd arivu/backend
pip install -r requirements.txt
pip install -e .

Verify the command is available:

arivu --help

You can also run the CLI without installing the console entrypoint:

python -m app.cli --help

Profiles and Auth

Profiles store API base URLs and CLI credentials.

arivu profile add local --url http://localhost
arivu profile use local
arivu auth login --profile local
arivu auth whoami
arivu auth logout

Notes:

  • arivu auth login signs in an existing Arivu user. Create the account in the web app first.
  • Browser auth stays cookie-based. CLI auth uses bearer tokens returned by /api/auth/cli/login.
  • Remote profile URLs must use HTTPS. HTTP is allowed only for localhost and loopback development.

Save and Read

arivu save https://example.com/article
arivu save https://example.com/article --collection Inbox
arivu save https://example.com/one https://example.com/two --collection Research

List and inspect bookmarks:

arivu list
arivu list --unread
arivu list --collection Research
arivu list --since 2026-01-01
arivu list --limit 50
arivu show <bookmark-id>
arivu open <bookmark-id>

Delete a bookmark:

arivu delete <bookmark-id>
arivu delete <bookmark-id> --force
arivu search "python embeddings"
arivu search "memory systems" --limit 20
arivu search "authentication patterns" --json

Search supports semantic and keyword matching by default. Use --no-semantic or --no-keyword when you need to narrow behavior.

Import

arivu import pocket pocket_export.html
arivu import raindrop raindrop_export.json

Import behavior:

  • Pocket imports use HTML export files.
  • Raindrop imports use JSON export files.
  • CLI and backend both enforce a 50MB import limit.
  • Unsafe URLs are skipped before bookmark placeholders are created.

Stats, Preview, Collections, and Graph

arivu stats
arivu stats --weekly
arivu stats --monthly

arivu preview https://example.com/article
arivu preview https://example.com/article --collection Inbox

arivu collections list
arivu collections create Research
arivu collections add Research <bookmark-id>

arivu resurface list
arivu resurface snooze <bookmark-id> --days 14
arivu resurface archive <bookmark-id>

arivu graph search "memory systems"
arivu graph overview

Preview uses the authenticated API endpoint /api/bookmarks/preview. The same server-side URL safety checks used by bookmark ingestion apply before metadata is fetched.

Local Stack Commands

Run local stack commands from inside an Arivu repo checkout that contains the root docker-compose.yml.

arivu local up
arivu local status
arivu local logs backend
arivu local down

Behavior:

  • Finds the repo root from the current directory.
  • Validates that the root .env exists.
  • Requires a real 32+ character SECRET_KEY.
  • Creates or updates a local profile pointing at http://localhost/api.
  • Boots the frontend, backend, MongoDB, and Redis stack.

CLI-first local workflow:

cd arivu/backend
pip install -r requirements.txt
pip install -e .

cd ..
arivu local up
arivu auth login --profile local
arivu save https://example.com/article
arivu search "example topic"

Shell Completion

arivu --install-completion
arivu --show-completion

After installing completion, restart your shell or source your shell config file.

Environment Variables

Variable Purpose
ARIVU_PROFILE Default CLI profile to use when --profile is omitted
ARIVU_CONFIG_DIR Custom directory for CLI config and token storage

Examples:

ARIVU_PROFILE=production arivu search "vector databases"
ARIVU_CONFIG_DIR=/tmp/arivu-test-config arivu profile list

Security Notes

  • CLI tokens are stored locally with restrictive file permissions.
  • Logout removes stored CLI credentials from the local profile.
  • Preview and bookmark ingestion reject embedded credentials, private IPs, loopback, link-local, multicast, reserved, and unresolved unsafe hosts.
  • Server-side fetches revalidate the URL before each redirect hop.
  • Import parsing skips unsafe URLs before creating bookmark placeholders.
← Keyboard Shortcuts