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
-
Install the CLI:
pip install slice-gateway -
Log in through GitHub:
slice login -
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.
Release files for slice-gateway 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slice_gateway-0.2.0.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slice_gateway-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / slice_gateway-0.2.0.tar.gz
| Download URL | slice_gateway-0.2.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f939217efa7d1a3ec6439e51b543b3443e3d478763fcb73fc0527f8991e5258d
|
|
BLAKE2b-256 checksum How to use checksums |
46de450625a96e7337610a664780a5e9d363eb9e27529fb43e7f405fa63030cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Release files / slice_gateway-0.2.0-py3-none-any.whl
| Download URL | slice_gateway-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0ecf8b7124a5ab87a97278473e53ef4ffd63b0702f340a98fa4eed9dabdeb10
|
|
BLAKE2b-256 checksum How to use checksums |
1d319f253eaa8b7c8c1c6b776c683b5be221ac59013c4d4b2a3b7a2ad001623d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|