Metadata-Version: 2.4
Name: slice-gateway
Version: 0.2.0
Summary: Command-line client for slice, the self-hosted LLM gateway.
Author: Jishnu Janardanan
License-Expression: MIT
Project-URL: Homepage, https://sliceapp.dev
Project-URL: Repository, https://github.com/jjk30/slice
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer
Requires-Dist: httpx
Dynamic: license-file

# slice-gateway

Command-line client for slice, a self-hosted LLM gateway that routes, caches, and caps your AI spend.

This package installs the `slice` command. It logs you in through GitHub, then prints the environment lines that point your existing tools at a slice gateway. It has no server dependencies. It needs only typer and httpx, plus the standard library.

## Quickstart

1. Install the CLI:

       pip install slice-gateway

2. Log in through GitHub:

       slice login

3. Point a tool at slice. For Claude Code, set three variables:

       export ANTHROPIC_BASE_URL=https://api.sliceapp.dev
       export ANTHROPIC_API_KEY=sk-ant-api...     # your own Anthropic key
       export ANTHROPIC_AUTH_TOKEN=slk_live_...   # your slice key, from slice login

`ANTHROPIC_AUTH_TOKEN` goes out as `Authorization: Bearer`, which is where slice reads its key. `ANTHROPIC_API_KEY` stays your own Anthropic key in `x-api-key`, and slice forwards it upstream.

Run `slice use anthropic`, `slice use openai`, `slice use curl`, or `slice use claude-code` to print the exact lines for your tool.

## The gateway

This is only the client. The slice gateway itself, the server that does the routing, caching, budgets, and dashboards, lives on GitHub at https://github.com/jjk30/slice.

Homepage: https://sliceapp.dev

## What's new in 0.2.0

`slice login` now names the key after your machine and revokes the previous key from the same machine.
Each device has one live key.
