Skip to main content

Reasonwork — CLI + Claude Code plugin

Turn your Claude Code, Codex, or Cursor CLI sessions into reviewed, priced, paid contributions to Reasonwork — automatically, with privacy checks running locally before anything ever leaves your machine.

Your dashboard, settings, and token creation all live on the Reasonwork web app — sign in there to get started and to check your own submissions.

Requirements

  • macOS, Linux, or Windows — the CLI and the background auto-sync timer (reasonwork schedule) are all cross-platform.
  • Python 3.12+.
  • pip, pipx, or uv for installing the CLI.
  • Claude Code, if you want the plugin (hooks + slash commands) instead of running the CLI by hand.
  • Codex, if you want the Codex hook + skill.
  • A current Cursor release, if you want the Cursor hook + skill.
  • A Reasonwork account and an nxc_… contributor token, created from your account's settings page.

1. Install the CLI

python -m pip install reasonwork
reasonwork --help

Updating

reasonwork update

Detects how you installed it (pip/pipx/uv tool, or an editable install from a git checkout) and upgrades accordingly.

2. Log in

Create a contributor token from your account's settings page, then store it locally:

reasonwork login --token nxc_xxxxxxxx

The token is restricted to the current user with mode 0600 on macOS/Linux or a user-only ACL on Windows. Use login --dry-run to verify a token without writing it.

The plugin is what makes this hands-off: it hooks into Claude Code's session lifecycle so you don't have to remember to run sync yourself. It isn't published to a public marketplace — ask your Reasonwork contact for the marketplace source to add.

Once installed, it wires up:

Hook Fires on What it does
SessionEnd Every Claude Code session (and subagent) ending Refreshes the local session index (scan). If sharing_mode=all, also runs sync --yes in the background to submit anything new. Never blocks session exit, never errors if the CLI isn't installed.
SessionStart Every new session If sharing_mode=ask, checks for pending unsynced sessions and nudges you. Uploads nothing on its own.

And two slash commands: /exchange-status (read-only summary of your sharing settings and pending sessions) and /exchange-sync (shows exactly what would be submitted, asks for confirmation, then submits only if you confirm).

4. Codex and Cursor (optional)

Both integrations use the same installed Python hook entry point on macOS, Linux, and Windows. Their installers copy skills instead of creating symlinks, so Windows Developer Mode and administrator privileges are not required.

Turning on auto-capture (sharing_mode)

Mode Behavior
none Nothing is scanned or submitted automatically. Manual upload/sync still works if you run it yourself.
ask (default) Sessions are indexed locally, but nothing uploads without you confirming.
all Full auto-capture: every session, at SessionEnd, is scanned and synced automatically — no prompt.
reasonwork config set --sharing-mode all
reasonwork config exclude --source codex        # exclude a source or --path, add --remove to undo
reasonwork config show                          # check current settings

Optional: scheduled background sync outside of Claude Code

reasonwork schedule install --interval-minutes 30
reasonwork schedule status
reasonwork schedule uninstall

CLI commands

Command Purpose
reasonwork login --token nxc_… Verify and store your contributor token.
reasonwork scan Discover local Claude Code/Codex/Cursor sessions and show metadata-only checks. Never uploads.
reasonwork sync Submit every newly discovered, consented session not already recorded in the local ledger.
reasonwork upload --path … --source … --confirm-rights Manually run the safety checks and upload a single specific file.
reasonwork config show / set / exclude Inspect and adjust local sharing consent.
reasonwork schedule install / status / uninstall Manage the optional background sync timer (macOS/Linux/Windows).
reasonwork update Upgrade to the latest version, however you installed it.

Useful flags across most commands: --dry-run (preview only), --json (stable JSON output for scripting), --yes (skip the confirmation prompt on sync/schedule install).

Features

  • Local-first privacy scanning. Every session is analyzed on your machine before anything uploads: secret detection (private keys, basic-auth URLs, API keys, etc.), email/phone PII counts, and an overall privacy_risk rating. A blocked/high/medium risk session is rejected locally and never uploaded — only a metadata-only rejection report is sent to the server for operator visibility, never the file content.
  • Exact-hash dedup and duplicate-content detection. A session already submitted once is never re-submitted, even across renamed/moved files or when a different file's content turns out to be a byte-exact prefix of something already known (e.g. a session resumed, copied, or exported to a new location).
  • Subagent session recording, across all three sources, each judged, priced, and paid independently of its parent session.
  • Server-side quality scoring and automatic pricing based on privacy risk and content quality — the scoring/pricing logic itself is deliberately not part of this package, so it can't be reverse-engineered from a local install and gamed.
  • Full contributor data controls — export your records, delete unaccepted raw submissions, and file tracked privacy requests (access, correction, deletion, restriction, opt-out) from your dashboard.

How it works end-to-end

  1. Discover — scan/sync find Claude Code, Codex, and Cursor session files (.jsonl) locally, including subagent transcripts.
  2. Analyze locally — for each new/changed file: parse JSONL, count messages/tool calls/tool results, run secret + PII detection, and decide a privacy risk level. Quality scoring itself happens server-side only.
  3. Local gate — if privacy risk is medium/high/blocked, or the file's content is a duplicate/contained-duplicate of something already known, it's rejected/skipped before upload, with only metadata reported to the server.
  4. Upload — anything that passes the local gate is uploaded.
  5. Worker intake — a backend worker re-runs the same deterministic analysis server-side, optionally adds an LLM ("semantic") quality judgment, and finalizes the record's status and price.
  6. Review — an operator reviews priced/quarantined items and accepts or rejects.
  7. Payout — accepted items get queued and paid out.

How scoring and pricing actually work

Quality scoring and pricing are computed server-side only, from a fresh re-download of what you actually uploaded — never trusted from anything this CLI reports about itself. That's deliberate: the exact formula (score weights, anti-gaming thresholds, price bands) lives only in the private backend, specifically so it can't be reverse-engineered and gamed by anyone who's installed this package.

At a high level, without exact numbers: a session earns credit for genuine tool diversity, real code edits (not just reads), substantive messages, and recovering from tool errors; sessions that look padded or that loop the same trivial tool call with no real edits score worse. An optional LLM pass can add a small bonus on top for sessions that clear every check, but it can never rescue a below-floor score or exceed the overall offer cap. New contributors' first few submissions are price-capped regardless of computed score, to limit the blast radius while an operator builds confidence in the account.

Things to keep in mind

  • Nothing uploads while your machine is off or asleep with no active session. Auto-capture only runs at SessionEnd (live hook) or on the scheduled timer (requires your machine to be on). There's no queued/replay-on-wake behavior for missed intervals.
  • A "rejected" privacy verdict only grows, never shrinks. Once a path is recorded as rejected-for-privacy or a duplicate, the CLI stops re-scanning and re-reporting that exact path on later syncs.
  • The scanner can false-positive on its own source code. If a session's transcript includes reading the analyzer's own source, the scanner can flag its pattern literals themselves as a match. Always worth a quick manual look at rejection_codes/secret_findings before assuming a block means a real leaked credential.
  • Subagents are scored completely independently of their parent. A rejected/quarantined parent session's subagent transcripts can still be scanned clean, uploaded, priced, and accepted on their own.
  • Exclusions and sharing mode are local-only settings — they don't retroactively affect anything already submitted.

Metadata

Release files for reasonwork 0.6.4

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

Source distribution (sdist)

Source distribution for reasonwork 0.6.4
File Size Uploaded Provenance Actions
reasonwork-0.6.4.tar.gz 47.8 kB With provenance Details for reasonwork-0.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reasonwork 0.6.4
File Interpreter ABI Platform Actions
reasonwork-0.6.4-py3-none-any.whl Python 3 none any Details for reasonwork-0.6.4-py3-none-any.whl

Total release size: 104.6 kB

Release files / reasonwork-0.6.4.tar.gz

Download URL reasonwork-0.6.4.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5e8b6ae1e496e1a8387de81a055565adcdc8ad2f49e42fb41c6efeb922211545
BLAKE2b-256 checksum
How to use checksums
2b55c4c670608721603b7ac9995a5359a4a49836185dd159a6996d13a3b8d3dc
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 Oct 20, 2026.

Transparency log

Release files / reasonwork-0.6.4-py3-none-any.whl

Download URL reasonwork-0.6.4-py3-none-any.whl
Size 56.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83db89e06784dc4f38ee1f4d8d4c16c63c77e516cc3d2a474dbebae1812e7892
BLAKE2b-256 checksum
How to use checksums
dcce27eb505934590205029f23bd2d4915ee1a835675c1b5d2a6829a192dde8b
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 Oct 20, 2026.

Transparency log

Security for reasonwork 0.6.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for reasonwork-0.6.4.tar.gz

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 Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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