CLI for friends.fyi
Project description
ffyi
CLI and Python client for friends.fyi.
Install
uv tool install ffyi
Installed commands: ffyi and fyi (alias).
CLI usage
fyi auth fyi_xxx
fyi whoami
fyi send alice "hello"
echo '{"status":"ok"}' | fyi send alice --sender "Deploy Bot"
fyi send alice '{"status":"ok"}' --type alert -H "X-Env: prod"
fyi send alice "anonymous ping" --no-auth
fyi inbox
fyi inbox --sender "Deploy Bot" --user-agent fyi-cli --type alert
fyi inbox 1d48f7c0-...
fyi inbox --json
Config is stored at:
~/.config/fyi/token~/.config/fyi/server
Python usage
from fyi import FyiClient
client = FyiClient(api_key="fyi_xxx", base_url="https://friends.fyi")
client.send("alice", body='{"status":"ok"}', content_type="application/json", sender="Deploy Bot")
client.send("alice", body="hello", headers={"X-Type": "alert"}, authenticated=False)
messages = client.inbox(limit=20, sender="Deploy Bot")
API Surface (friends.fyi)
Public endpoints (no auth)
These are safe to call without session cookies or API keys. Bearer auth is optional on write endpoints and only affects sender identity/rate limits.
GET /healthGET /homeGET /docsGET /api/docsPOST /inbox/{username}(path-based inbox write)POST /(subdomain-based inbox write; host likealice.friends.fyi)
Private web/session endpoints (cookie-auth, browser)
These are browser endpoints. Use GitHub login + session cookie auth here, not API keys.
GET /auth/loginGET /auth/callbackGET /auth/logoutGET /(inbox page when logged in; landing page when logged out)GET /inbox/more(HTMX pagination partial)
Token-auth API endpoints (for CLI/agents)
These are private JSON endpoints for CLI/agents and should use Authorization: Bearer fyi_*.
GET /api/meGET /api/tokenPOST /api/token/rotateGET /inboxGET /inbox/{item_id}
Development
uv sync --extra dev
uv run pytest
uv build --clear
Publish
export UV_PUBLISH_TOKEN='pypi-...'
uv publish --check-url https://pypi.org/simple --publish-url https://upload.pypi.org/legacy/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ffyi-0.2.0.tar.gz.
File metadata
- Download URL: ffyi-0.2.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0431d908428432e7bc1770979e9bbb4fbc16437e07688c68e322285996f284d3
|
|
| MD5 |
445ca4d4168bd019f8969f54b4c954ec
|
|
| BLAKE2b-256 |
4c05a019d241157b73a7b07b90e4d09738e7f75f9ce155ea004a45133d9b1e42
|
File details
Details for the file ffyi-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ffyi-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60887bf7f2b5df25938f3ca47c4eb3714274ba92e44c9400277f0871626e4b6d
|
|
| MD5 |
ae7e934b7f37aa702142a0a7291b4ac7
|
|
| BLAKE2b-256 |
4f40270d43db0d52a6748f2126faece86a40115678ef408174a1f03935956658
|