Metadata-Version: 2.4
Name: crowe-sweep
Version: 0.1.1
Summary: Crowe Sweep. Moves cleared Stripe revenue into your financial account or bank the minute Stripe releases it, on instant rails when your account has them.
Author-email: "Crowe Logic, Inc" <support@crowelogic.com>
License: Crowe Sweep
        
        Copyright (c) 2026 Crowe Logic, Inc. All rights reserved.
        
        This software and its source code are the proprietary and confidential property
        of Crowe Logic, Inc. They are made available for the sole purpose of installing
        and running Crowe Sweep as distributed by Crowe Logic, Inc.
        
        Permitted, without a separate written agreement:
        
          1. Downloading and installing the distributed package.
          2. Running the software for your own business purposes, including against
             Stripe accounts you own or are authorized to operate.
          3. Reading the source code, and modifying your own local copy for the purpose
             of running or debugging it in your own environment.
        
        Not permitted without prior written permission from Crowe Logic, Inc:
        
          1. Redistributing the software, in source or compiled form, whether modified
             or unmodified, including as part of another product or service.
          2. Selling, sublicensing, renting, or offering the software as a hosted or
             managed service to third parties.
          3. Creating derivative works for distribution to third parties.
          4. Removing or altering this notice or any copyright or attribution notice.
        
        Paid plans are governed by the subscription terms at
        https://crowelogic.com/sweep, which take precedence where they conflict with
        this notice.
        
        NO WARRANTY. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
        
        LIMITATION OF LIABILITY. IN NO EVENT SHALL CROWE LOGIC, INC. BE LIABLE FOR ANY
        CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR
        OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE
        OR OTHER DEALINGS IN THE SOFTWARE.
        
        THE SOFTWARE MOVES MONEY. It creates Stripe payouts and outbound transfers on
        accounts whose credentials you supply. You are responsible for the keys you
        give it, for the policy you configure, and for reviewing every movement it
        makes. Crowe Logic, Inc. is not liable for funds moved, delayed, or held as a
        result of your configuration, your Stripe account state, or Stripe's own rails.
        
        Contact: support@crowelogic.com
        
Project-URL: Homepage, https://crowelogic.com/sweep
Project-URL: Documentation, https://crowelogic.com/sweep/docs
Keywords: stripe,payouts,treasury,financial account,mcp,agent
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: mcp
Requires-Dist: mcp<2,>=1.2; extra == "mcp"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Dynamic: license-file

# Crowe Sweep

Cleared Stripe revenue, moved into your financial account or bank the minute Stripe releases it.

Stripe holds card money for its settlement delay, then pays it out once a day on its own schedule.
Crowe Sweep watches the balance and pays it out the moment it turns available. If your payout
destination is a Stripe financial account, the money is there the same second, spendable on your
Stripe card. If it is a bank, the instant rail is used whenever your account has it.

Built by Crowe Logic, Inc. See `SPEC.md` for the product decisions and `stripe-app/`, `worker/` for
the Dashboard app and the hosted service.

## The self-hosted tool

```
uv tool install crowe-sweep            # or: pip install crowe-sweep
crowe-sweep doctor                     # key, endpoints, payout method, log
crowe-sweep status
crowe-sweep preview                    # what run would do, moves nothing
crowe-sweep run                        # sweep, then the bank leg if enabled
```

Key resolution: `CROWE_SWEEP_STRIPE_KEY`, then `STRIPE_MONEY_KEY` in `~/.config/crowe/secrets.env`,
then `STRIPE_SECRET_KEY` in `~/.config/crowe/control-plane.env`, then `STRIPE_SECRET_KEY` in the
environment. Use a restricted key: Balance read, Payouts write, and (for the bank leg) Money
Management financial accounts read, payout methods read, outbound transfers write.

Policy lives in `~/.config/crowe/sweep.json`:

```json
{ "bank_leg": false, "float_cents": 0, "min_cents": 100,
  "financial_account": null, "payout_method": null }
```

`bank_leg: false` keeps money in the financial account (the default, and what Crowe Logic runs).
`bank_leg: true` adds a v2 OutboundTransfer to the first instant-capable bank payout method,
trying explicit RTP first and falling back to Stripe's `automatic` delivery, in chunks of at most
$9,999. `float_cents` is what stays behind for card spend. Every `CROWE_SWEEP_*` env var overrides
the file (`CROWE_SWEEP_DRY_RUN=1` moves nothing and logs what would).

Every action is one JSON line in `~/.local/state/crowe-sweep/sweep.log`; `crowe-sweep history`
reads it back.

### Run it every ten minutes

```
cp launchd/com.crowelogic.crowe-sweep.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.crowelogic.crowe-sweep.plist
```

The agent also fires at 17:00 and 17:03 local time, which is 00:00 UTC, when Stripe releases the
day's settled card money for US accounts.

## The MCP server

`crowe-sweep-mcp` is a stdio MCP server with `sweep_status`, `sweep_preview`, `sweep_now`,
`instant_payout`, `sweep_run`, `sweep_history`, `sweep_policy`. Reads are free; anything that moves
money takes `confirm=true` and otherwise returns a preview. Any MCP host can launch it:

```json
{ "mcpServers": { "crowe-sweep": { "command": "crowe-sweep-mcp" } } }
```

In the Crowe Logic Foundry CLI the same tools are native (`tools/crowe_sweep.py`), and the server is
also reachable as `mcp_list_tools("crowe_sweep.mcp_server", package_type="pypi")`.

## Pricing

| Plan | Price | Includes |
| --- | --- | --- |
| Starter | $0 | Balance view in the Stripe Dashboard, one-click sweep, history |
| Pro | $19/month, $190/year | Automatic sweeps every 10 minutes, instant rail when available, landing notifications, one account |
| Business | $59/month, $590/year | Up to 5 accounts, float/minimum/quiet-hour policies, audit export, MCP and API access, priority support |

No per-transfer fee. Stripe's own rail fees are the merchant's and are shown, never hidden.
Crowe Logic Pro customers get Business included. `scripts/create_prices.sh` creates the product
and prices on the Crowe Logic, Inc account.

## Development

```
uv venv .venv --python 3.12 && uv pip install -e ".[dev,mcp]" --python .venv/bin/python
.venv/bin/python -m pytest -q
```

The core has no third-party dependencies and runs on Python 3.9, so a stock macOS LaunchAgent can
run it. The MCP server needs `mcp>=1.2,<2`.
