Skip to main content

rathflow-cli

PyPI Python npm License: MIT

The RathFlow command line client. It talks to the RathFlow northbound REST API and covers sessions, memory, sandboxes, agents, assets, projects, billing and workflows. Two implementations ship from this repository — Python (rathflow_cli/) and Node.js (node/) — with the same commands, options, output and exit codes. They share one config file, so you can switch between them freely.

Install

Python (3.10+):

uv tool install rathflow-cli
# or
pipx install rathflow-cli
# or
pip install rathflow-cli

Node.js (20+):

npm install -g rathflow-cli

Both install a rathflow command; install only one globally, or call the other by path. The two packages are released together from the same v* tag.

Releasing both packages is documented in RELEASING.md.

Quick start

# Log in with your email and password (the password prompt does not echo).
rathflow auth login -e you@example.com

# Who am I, what can I reach.
rathflow whoami

# Pick a project scope; every later command carries it.
rathflow project list
rathflow project use <project_id>

# Read something.
rathflow session list

The default gateway is https://rathflow.lynwe.com. Point it elsewhere with --base-url, RATHFLOW_BASE_URL, or rathflow config set base_url <url>.

Commands

Group What it covers
auth log in / out, register, profile (profile, profile-update, change-password, set-email, set-avatar), API keys
config local profiles (list, show, set, use)
org organizations (list, create, invite, accept)
project projects, scope switching, project config, share links
session sessions, blocks, events
memory memory entries, search, commit tasks
sandbox sandboxes, exec, code, files, logs
agent agent definitions, versions, prompts, runs, attachments
asset assets, versions, credentials, publish
billing subscription, usage, invoices
workflow workflows (list, get, create, delete, counts)
admin platform administration (platform admins only)
mcp an MCP server on stdio, for Codex / Claude and other MCP clients

Two more entry points sit at the root:

  • rathflow whoami — identity, scope and reachable projects.
  • rathflow api <Key> — call any endpoint directly; rathflow api --list prints the whole table. Streaming endpoints stream.

Every group has --help, e.g. rathflow session --help.

MCP

rathflow mcp serve runs an MCP server on stdio so an MCP client can drive RathFlow through the tools instead of a shell. Register it with the client, for example in .mcp.json:

{ "mcpServers": { "rathflow": { "command": "rathflow", "args": ["mcp", "serve"] } } }

It exposes 14 read tools, plus 5 write tools once RATHFLOW_MCP_WRITE=1 is set in the server's environment. Anything without a named tool is still reachable via rathflow_endpoints (the endpoint table) and rathflow_api_call. Authentication is the same as the CLI's: run rathflow auth login once, and the server refreshes the token as it goes.

mcp serve is available in the Python package only for now — the Node CLI has not been ported yet.

Authentication

rathflow auth login exchanges your email and password for a JWT, stored in the CLI config file (mode 0600). The CLI sends it as a Bearer token and never touches cookies, so it is unaffected by the browser CSRF rules.

For unattended use, issue a long-lived API key and pass it through the environment:

rathflow auth key-create          # prints the key once, right here
export RATHFLOW_TOKEN=rf_...      # or: rathflow config set token rf_...

Configuration

Precedence, highest first: command-line flag > environment variable > active profile > built-in default. Profiles live in ~/.config/rathflow/config.json (override the directory with RATHFLOW_CONFIG_DIR).

Variable Meaning
RATHFLOW_BASE_URL Gateway address
RATHFLOW_PROJECT Project scope
RATHFLOW_TOKEN Bearer token / API key
RATHFLOW_CONFIG_DIR Config directory

Output

  • Default: human-readable tables.
  • --json: one stable JSON document, for scripts.
  • --quiet / -q: primary keys only.

Exit codes are stable: 0 success, and non-zero for usage errors, API errors and remote command failures (a sandbox exec returns the remote exit code).

Proxies

The CLI respects the standard proxy variables (ALL_PROXY, HTTPS_PROXY, …). SOCKS proxies need socksio, which ships in the socks extra:

uv tool install 'rathflow-cli[socks]'

Clash and similar desktop setups often export ALL_PROXY=socks://.... httpx only understands socks5:///socks5h://, so the CLI rewrites that scheme for you (and maps socks4:// to socks5h://, because httpx has no SOCKS4). Nothing to configure — just install the extra.

Development

uv venv --python 3.12 .venv
uv pip install -e .
.venv/bin/rathflow --help
.venv/bin/python -m rathflow_cli.selftest

selftest checks that no command hard-codes a URL and, when the upstream generated endpoint table is available (RATHFLOW_ENDPOINTS_TS), that rathflow_cli/endpoints.py still matches it.

License

MIT — see LICENSE.

Metadata

Release files for rathflow-cli 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rathflow-cli 0.1.5
File Size Uploaded
rathflow_cli-0.1.5.tar.gz 62.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rathflow-cli 0.1.5
File Interpreter ABI Platform
rathflow_cli-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 139.0 kB

Release files / rathflow_cli-0.1.5.tar.gz

Download URL rathflow_cli-0.1.5.tar.gz
Size 62.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2209a49d660363fa3f1ef6f281f79182a5d47b3747178b3932c53193c711c6e3
BLAKE2b-256 checksum
How to use checksums
2cc7472786e66690e40b16d3259fe90ef62f530063b9f038db02975b4fabf852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / rathflow_cli-0.1.5-py3-none-any.whl

Download URL rathflow_cli-0.1.5-py3-none-any.whl
Size 76.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11acb3126bb67f6d948fb52f27c1cabd01725df35f0edf652be6a5aebbd564d4
BLAKE2b-256 checksum
How to use checksums
c6bfeb6fd93db3da94e44cbbb9d6bb8700a2bdbac6c71d178f66e11bd9664ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page