# hippius-drive > Python SDK and CLI for Hippius Drive. Files are encrypted on the machine that holds the recovery phrase. The server stores ciphertext. Part of the Hippius docs for agents. Start at https://docs.hippius.com/llms.txt ## What it is and what it does A scriptable client for the same Drive a person sees in the console, the desktop app, and the Android app. It is alpha. The CLI uploads a directory with `hippius-drive put -r LOCAL_DIR REMOTE_DIR`, downloads one with `get -r`, and pushes local changes one way with `hippius-drive sync LOCAL_DIR REMOTE_DIR` (new and changed files only; remote files are deleted only with `--delete`). Two-way sync and recovery bindings are not in this version: for a folder edited in more than one place, use the desktop app. Drive is not S3. A file put through this SDK does not appear in an S3 bucket. ## How to install It is not on PyPI. Install from this repository: ```bash pip install "git+https://github.com/thenervelab/hippius-drive-sdk" ``` Python 3.10 to 3.13. ## How to sign in The caller needs three things that belong together: - An API token from https://console.hippius.com/dashboard/settings - The account address that token belongs to - The recovery phrase for the Drive An agent with its own 12-word access key signs in without a browser: `pip install "hippius-drive[login] @ git+https://github.com/thenervelab/hippius-drive-sdk"`, then `hippius-drive auth login --phrase-file FILE` (or `hippius_drive.auth.login(phrase)` in code). It saves the token and address to `~/.config/hippius-drive/config.toml` (0600) and prints neither. Keep the access key in an owner-only file, never on the command line. Join a shared drive the same way: `hippius-drive drives join --invite-file FILE` (the URL in an owner-only file, or `HIPPIUS_INVITE_URL`). The phrase never leaves the user's machine. Do not ask them to paste it into chat. Read it from their environment if they have already stored it there. ```python from pathlib import Path from hippius_drive import Client, Identity identity = Identity.from_master(master_phrase, "default", account_ss58=account) with Client(token=token, identity=identity) as client: client.folders.register() client.files.put(Path("report.pdf"), "work/report.pdf") ``` A token and an address that do not belong together fail the first request with 403. ## Share link insights and comments A file share's views, viewers, comments and reactions: ```bash hippius-drive share settings TOKEN --insights on --comments on # paid Drive plan hippius-drive share insights TOKEN hippius-drive share comments --url-file link.txt # or HIPPIUS_SHARE_URL hippius-drive share comment-post "see 0:42" --url-file link.txt hippius-drive share reactions TOKEN hippius-drive share react 🔥 TOKEN # unreact, moments, block, unblock, seen ``` Comments are encrypted under the link's key, so reading or posting them needs the share URL (in an owner-only file or `HIPPIUS_SHARE_URL`, never on the command line). For the owner's own console link, `TOKEN` alone works: the URL is rebuilt from the owner wrap. On the Free Drive plan switches stay off (`403 paid_plan_required`) and insights show counts only. A `#p=` link's password goes in `HIPPIUS_SHARE_PASSWORD`. In code: `client.shares.update_settings`, `insights`, `viewer_names`, `comments`, `post_comment`, `delete_comment`, `mention_candidates` (post with `author=CommentAuthor(name, secret)` and `mentions=`), `reactions`, `react`, `unreact`, `react_at`, `reaction_moments`, `block_author`, `unblock_author`, `mark_insights_seen`, `recover_url`. Paying and plans: https://docs.hippius.com/use/console/billing What the console Drive UI does: https://docs.hippius.com/use/console/drive ## Links - Documentation home: https://docs.hippius.com - Console Drive: https://docs.hippius.com/use/console/drive - Desktop Drive: https://docs.hippius.com/use/desktop/drive - Billing: https://docs.hippius.com/use/console/billing - This repository's README: https://raw.githubusercontent.com/thenervelab/hippius-drive-sdk/main/README.md