Skip to content

Commit 0edb943

Browse files
authored
rename variables (#45)
1 parent 2c6b8f9 commit 0edb943

21 files changed

Lines changed: 118 additions & 118 deletions

AGENT.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ metadata:
1010
author: electather
1111
repo: https://github.com/electather/seerr-cli
1212
env:
13-
- name: SEER_SERVER
13+
- name: SEERR_SERVER
1414
description: Full URL of your Seerr instance (e.g. https://seerr.example.com)
1515
required: true
16-
- name: SEER_API_KEY
16+
- name: SEERR_API_KEY
1717
description: API key for authenticating with the Seerr server
1818
required: true
19-
- name: SEER_MCP_AUTH_TOKEN
19+
- name: SEERR_MCP_AUTH_TOKEN
2020
description: Bearer token for authenticating MCP HTTP transport clients (required when running the HTTP server; omit for stdio transport)
2121
required: false
2222
---
@@ -47,9 +47,9 @@ Run the MCP HTTP server in a container next to your Seerr instance:
4747
```bash
4848
# With Bearer token auth
4949
docker run --rm \
50-
-e SEER_SERVER=http://your-seerr-instance:5055 \
51-
-e SEER_API_KEY=your-api-key \
52-
-e SEER_MCP_AUTH_TOKEN=your-secret-token \
50+
-e SEERR_SERVER=http://your-seerr-instance:5055 \
51+
-e SEERR_API_KEY=your-api-key \
52+
-e SEERR_MCP_AUTH_TOKEN=your-secret-token \
5353
-p 8811:8811 \
5454
ghcr.io/electather/seerr-cli:latest
5555
```
@@ -60,37 +60,37 @@ For clients that cannot send custom headers (e.g. claude.ai remote MCP), use a s
6060

6161
```bash
6262
docker run --rm \
63-
-e SEER_SERVER=http://your-seerr-instance:5055 \
64-
-e SEER_API_KEY=your-api-key \
65-
-e SEER_MCP_ROUTE_TOKEN=your-secret-path \
66-
-e SEER_MCP_NO_AUTH=true \
67-
-e SEER_MCP_CORS=true \
63+
-e SEERR_SERVER=http://your-seerr-instance:5055 \
64+
-e SEERR_API_KEY=your-api-key \
65+
-e SEERR_MCP_ROUTE_TOKEN=your-secret-path \
66+
-e SEERR_MCP_NO_AUTH=true \
67+
-e SEERR_MCP_CORS=true \
6868
-p 8811:8811 \
6969
ghcr.io/electather/seerr-cli:latest
7070
```
7171

7272
MCP endpoint: `http://localhost:8811/your-secret-path/mcp` — no auth header required.
7373

74-
At least one of `SEER_MCP_AUTH_TOKEN`, `SEER_MCP_ROUTE_TOKEN`, or `SEER_MCP_NO_AUTH=true` must be set for HTTP transport.
74+
At least one of `SEERR_MCP_AUTH_TOKEN`, `SEERR_MCP_ROUTE_TOKEN`, or `SEERR_MCP_NO_AUTH=true` must be set for HTTP transport.
7575

7676
### docker-compose deployment
7777

7878
Use the included `docker-compose.yml` to deploy alongside Seer:
7979

8080
```bash
81-
SEER_API_KEY=xxx SEER_MCP_AUTH_TOKEN=secret docker compose up -d
81+
SEERR_API_KEY=xxx SEERR_MCP_AUTH_TOKEN=secret docker compose up -d
8282
```
8383

84-
The default `SEER_SERVER` in the compose file points to `http://seer:5055` (the Seerr service name). Override it if your Seerr instance is elsewhere.
84+
The default `SEERR_SERVER` in the compose file points to `http://seer:5055` (the Seerr service name). Override it if your Seerr instance is elsewhere.
8585

8686
### Running CLI commands via Docker
8787

8888
Override the default CMD to run any CLI command:
8989

9090
```bash
9191
docker run --rm \
92-
-e SEER_SERVER=http://your-seerr-instance:5055 \
93-
-e SEER_API_KEY=your-api-key \
92+
-e SEERR_SERVER=http://your-seerr-instance:5055 \
93+
-e SEERR_API_KEY=your-api-key \
9494
ghcr.io/electather/seerr-cli:latest \
9595
status system
9696
```
@@ -102,7 +102,7 @@ seerr-cli config set --server https://your-seerr-instance.com --api-key YOUR_KEY
102102
seerr-cli config show # verify
103103
```
104104

105-
Environment variables also work: `SEER_SERVER`, `SEER_API_KEY`.
105+
Environment variables also work: `SEERR_SERVER`, `SEERR_API_KEY`.
106106

107107
## Global Flags
108108

@@ -331,8 +331,8 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
331331
"command": "/usr/local/bin/seerr-cli",
332332
"args": ["mcp", "serve"],
333333
"env": {
334-
"SEER_SERVER": "https://your-seerr-instance.com",
335-
"SEER_API_KEY": "your-api-key"
334+
"SEERR_SERVER": "https://your-seerr-instance.com",
335+
"SEERR_API_KEY": "your-api-key"
336336
}
337337
}
338338
}
@@ -349,7 +349,7 @@ seerr-cli mcp serve --transport http --addr :8811 --auth-token mysecrettoken
349349

350350
Endpoint: `http://localhost:8811/mcp` — set `Authorization: Bearer mysecrettoken` in your client.
351351

352-
For clients that cannot send custom headers (e.g. claude.ai remote MCP), use a secret path prefix via `--route-token` (or `SEER_MCP_ROUTE_TOKEN`):
352+
For clients that cannot send custom headers (e.g. claude.ai remote MCP), use a secret path prefix via `--route-token` (or `SEERR_MCP_ROUTE_TOKEN`):
353353

354354
```bash
355355
# Add --cors if connecting from a browser-based client (e.g. claude.ai)
@@ -365,18 +365,18 @@ seerr-cli mcp serve --transport http --route-token abc123 --auth-token mysecrett
365365

366366
All flags are configurable via environment variables:
367367

368-
| Flag | Environment variable | Default |
369-
| --------------- | ---------------------- | ------- |
370-
| `--transport` | `SEER_MCP_TRANSPORT` | `stdio` |
371-
| `--addr` | `SEER_MCP_ADDR` | `:8811` |
372-
| `--auth-token` | `SEER_MCP_AUTH_TOKEN` ||
373-
| `--no-auth` | `SEER_MCP_NO_AUTH` | `false` |
374-
| `--route-token` | `SEER_MCP_ROUTE_TOKEN` ||
375-
| `--cors` | `SEER_MCP_CORS` | `false` |
376-
| `--tls-cert` | `SEER_MCP_TLS_CERT` ||
377-
| `--tls-key` | `SEER_MCP_TLS_KEY` ||
378-
379-
> Pass `--cors` (or `SEER_MCP_CORS=true`) to enable CORS headers for browser-based clients (e.g. claude.ai). Disabled by default.
368+
| Flag | Environment variable | Default |
369+
| --------------- | ----------------------- | ------- |
370+
| `--transport` | `SEERR_MCP_TRANSPORT` | `stdio` |
371+
| `--addr` | `SEERR_MCP_ADDR` | `:8811` |
372+
| `--auth-token` | `SEERR_MCP_AUTH_TOKEN` ||
373+
| `--no-auth` | `SEERR_MCP_NO_AUTH` | `false` |
374+
| `--route-token` | `SEERR_MCP_ROUTE_TOKEN` ||
375+
| `--cors` | `SEERR_MCP_CORS` | `false` |
376+
| `--tls-cert` | `SEERR_MCP_TLS_CERT` ||
377+
| `--tls-key` | `SEERR_MCP_TLS_KEY` ||
378+
379+
> Pass `--cors` (or `SEERR_MCP_CORS=true`) to enable CORS headers for browser-based clients (e.g. claude.ai). Disabled by default.
380380
381381
> The HTTP transport does not implement OAuth 2.0. Use stdio for Claude Desktop.
382382

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Global flags (`--server`, `--api-key`, `--verbose`) are bound to Viper keys `ser
8181
### Testing Conventions
8282

8383
- Mock HTTP with `httptest.NewServer()` — no live network calls.
84-
- Set `<group>.OverrideServerURL = ts.URL` and `os.Setenv("SEER_SERVER", ts.URL)`, clean up with `defer`.
84+
- Set `<group>.OverrideServerURL = ts.URL` and `os.Setenv("SEERR_SERVER", ts.URL)`, clean up with `defer`.
8585
- Capture output with `cmd.RootCmd.SetOut(&buf)`, then call `cmd.RootCmd.Execute()`.
8686
- **Do not assert on verbose/log output strings** — only assert on functional data (JSON fields, exit behavior).
8787

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ The image defaults to running the MCP HTTP server on port `8811`. Pass configura
3737
```sh
3838
docker run -d \
3939
-p 8811:8811 \
40-
-e SEER_SERVER=https://your-seerr-instance.com \
41-
-e SEER_API_KEY=your-api-key \
42-
-e SEER_MCP_AUTH_TOKEN=mysecrettoken \
40+
-e SEERR_SERVER=https://your-seerr-instance.com \
41+
-e SEERR_API_KEY=your-api-key \
42+
-e SEERR_MCP_AUTH_TOKEN=mysecrettoken \
4343
ghcr.io/electather/seerr-cli:latest
4444
```
4545

4646
To run CLI commands instead, override the default arguments:
4747

4848
```sh
4949
docker run --rm \
50-
-e SEER_SERVER=https://your-seerr-instance.com \
51-
-e SEER_API_KEY=your-api-key \
50+
-e SEERR_SERVER=https://your-seerr-instance.com \
51+
-e SEERR_API_KEY=your-api-key \
5252
ghcr.io/electather/seerr-cli:latest \
5353
status system
5454
```
@@ -64,8 +64,8 @@ seerr-cli config set --server https://your-seerr-instance.com --api-key YOUR_KEY
6464
Configuration is stored in `~/.seerr-cli.yaml`. You can also use environment variables:
6565

6666
```sh
67-
export SEER_SERVER=https://your-seerr-instance.com
68-
export SEER_API_KEY=YOUR_KEY
67+
export SEERR_SERVER=https://your-seerr-instance.com
68+
export SEERR_API_KEY=YOUR_KEY
6969
```
7070

7171
Or pass them as flags on any command:
@@ -344,8 +344,8 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
344344
"command": "/usr/local/bin/seerr-cli",
345345
"args": ["mcp", "serve"],
346346
"env": {
347-
"SEER_SERVER": "https://your-seerr-instance.com",
348-
"SEER_API_KEY": "your-api-key"
347+
"SEERR_SERVER": "https://your-seerr-instance.com",
348+
"SEERR_API_KEY": "your-api-key"
349349
}
350350
}
351351
}
@@ -397,16 +397,16 @@ seerr-cli mcp serve --transport http --addr :8811 --route-token abc123 --auth-to
397397

398398
All `mcp serve` flags can be set via environment variables, which is especially useful for Docker deployments:
399399

400-
| Flag | Environment variable | Default |
401-
| --------------- | ---------------------- | ------- |
402-
| `--transport` | `SEER_MCP_TRANSPORT` | `stdio` |
403-
| `--addr` | `SEER_MCP_ADDR` | `:8811` |
404-
| `--auth-token` | `SEER_MCP_AUTH_TOKEN` ||
405-
| `--no-auth` | `SEER_MCP_NO_AUTH` | `false` |
406-
| `--route-token` | `SEER_MCP_ROUTE_TOKEN` ||
407-
| `--cors` | `SEER_MCP_CORS` | `false` |
408-
| `--tls-cert` | `SEER_MCP_TLS_CERT` ||
409-
| `--tls-key` | `SEER_MCP_TLS_KEY` ||
400+
| Flag | Environment variable | Default |
401+
| --------------- | ----------------------- | ------- |
402+
| `--transport` | `SEERR_MCP_TRANSPORT` | `stdio` |
403+
| `--addr` | `SEERR_MCP_ADDR` | `:8811` |
404+
| `--auth-token` | `SEERR_MCP_AUTH_TOKEN` ||
405+
| `--no-auth` | `SEERR_MCP_NO_AUTH` | `false` |
406+
| `--route-token` | `SEERR_MCP_ROUTE_TOKEN` ||
407+
| `--cors` | `SEERR_MCP_CORS` | `false` |
408+
| `--tls-cert` | `SEERR_MCP_TLS_CERT` ||
409+
| `--tls-key` | `SEERR_MCP_TLS_KEY` ||
410410

411411
### Docker (HTTP transport)
412412

@@ -417,9 +417,9 @@ The published container image runs the MCP HTTP server by default. This is the r
417417
docker run -d \
418418
--name seerr-mcp \
419419
-p 8811:8811 \
420-
-e SEER_SERVER=https://your-seerr-instance.com \
421-
-e SEER_API_KEY=your-api-key \
422-
-e SEER_MCP_AUTH_TOKEN=mysecrettoken \
420+
-e SEERR_SERVER=https://your-seerr-instance.com \
421+
-e SEERR_API_KEY=your-api-key \
422+
-e SEERR_MCP_AUTH_TOKEN=mysecrettoken \
423423
ghcr.io/electather/seerr-cli:latest
424424
```
425425

@@ -434,11 +434,11 @@ For clients that cannot send custom headers (e.g. claude.ai remote MCP), use a s
434434
docker run -d \
435435
--name seerr-mcp \
436436
-p 8811:8811 \
437-
-e SEER_SERVER=https://your-seerr-instance.com \
438-
-e SEER_API_KEY=your-api-key \
439-
-e SEER_MCP_ROUTE_TOKEN=abc123 \
440-
-e SEER_MCP_NO_AUTH=true \
441-
-e SEER_MCP_CORS=true \
437+
-e SEERR_SERVER=https://your-seerr-instance.com \
438+
-e SEERR_API_KEY=your-api-key \
439+
-e SEERR_MCP_ROUTE_TOKEN=abc123 \
440+
-e SEERR_MCP_NO_AUTH=true \
441+
-e SEERR_MCP_CORS=true \
442442
ghcr.io/electather/seerr-cli:latest
443443
```
444444

@@ -451,9 +451,9 @@ To bind to a different port or address, pass `--addr` explicitly:
451451
```sh
452452
docker run -d \
453453
-p 9000:9000 \
454-
-e SEER_SERVER=https://your-seerr-instance.com \
455-
-e SEER_API_KEY=your-api-key \
456-
-e SEER_MCP_AUTH_TOKEN=mysecrettoken \
454+
-e SEERR_SERVER=https://your-seerr-instance.com \
455+
-e SEERR_API_KEY=your-api-key \
456+
-e SEERR_MCP_AUTH_TOKEN=mysecrettoken \
457457
ghcr.io/electather/seerr-cli:latest \
458458
mcp serve --transport http --addr :9000
459459
```

cmd/mcp/flags.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,51 +28,51 @@ var ServeFlags = []FlagDef{
2828
Name: "transport",
2929
ViperKey: "mcp.transport",
3030
Default: "stdio",
31-
Usage: "Transport protocol: stdio or http (env: SEER_MCP_TRANSPORT)",
31+
Usage: "Transport protocol: stdio or http (env: SEERR_MCP_TRANSPORT)",
3232
},
3333
{
3434
Name: "addr",
3535
ViperKey: "mcp.addr",
3636
Default: ":8811",
37-
Usage: "HTTP bind address (http transport only) (env: SEER_MCP_ADDR)",
37+
Usage: "HTTP bind address (http transport only) (env: SEERR_MCP_ADDR)",
3838
},
3939
{
4040
Name: "auth-token",
4141
ViperKey: "mcp.auth_token",
4242
Default: "",
43-
Usage: "Bearer token required for HTTP transport (env: SEER_MCP_AUTH_TOKEN)",
43+
Usage: "Bearer token required for HTTP transport (env: SEERR_MCP_AUTH_TOKEN)",
4444
},
4545
{
4646
Name: "no-auth",
4747
ViperKey: "mcp.no_auth",
4848
Default: "false",
4949
IsBool: true,
50-
Usage: "Disable authentication (insecure — must be explicit) (env: SEER_MCP_NO_AUTH)",
50+
Usage: "Disable authentication (insecure — must be explicit) (env: SEERR_MCP_NO_AUTH)",
5151
},
5252
{
5353
Name: "route-token",
5454
ViperKey: "mcp.route_token",
5555
Default: "",
56-
Usage: "Secret path prefix for the MCP endpoint (e.g. 'abc123' → /abc123/mcp) (env: SEER_MCP_ROUTE_TOKEN)",
56+
Usage: "Secret path prefix for the MCP endpoint (e.g. 'abc123' → /abc123/mcp) (env: SEERR_MCP_ROUTE_TOKEN)",
5757
},
5858
{
5959
Name: "tls-cert",
6060
ViperKey: "mcp.tls_cert",
6161
Default: "",
62-
Usage: "Path to TLS certificate file (env: SEER_MCP_TLS_CERT)",
62+
Usage: "Path to TLS certificate file (env: SEERR_MCP_TLS_CERT)",
6363
},
6464
{
6565
Name: "tls-key",
6666
ViperKey: "mcp.tls_key",
6767
Default: "",
68-
Usage: "Path to TLS private key file (env: SEER_MCP_TLS_KEY)",
68+
Usage: "Path to TLS private key file (env: SEERR_MCP_TLS_KEY)",
6969
},
7070
{
7171
Name: "cors",
7272
ViperKey: "mcp.cors",
7373
Default: "false",
7474
IsBool: true,
75-
Usage: "Enable CORS headers (required for browser-based clients such as claude.ai) (env: SEER_MCP_CORS)",
75+
Usage: "Enable CORS headers (required for browser-based clients such as claude.ai) (env: SEERR_MCP_CORS)",
7676
},
7777
{
7878
Name: "multi-tenant",
@@ -85,19 +85,19 @@ var ServeFlags = []FlagDef{
8585
Name: "log-file",
8686
ViperKey: "mcp.log_file",
8787
Default: "",
88-
Usage: "Path to log file; required for stdio transport to capture logs (env: SEER_MCP_LOG_FILE)",
88+
Usage: "Path to log file; required for stdio transport to capture logs (env: SEERR_MCP_LOG_FILE)",
8989
},
9090
{
9191
Name: "log-level",
9292
ViperKey: "mcp.log_level",
9393
Default: "info",
94-
Usage: "Log level: debug, info, warn, error (env: SEER_MCP_LOG_LEVEL)",
94+
Usage: "Log level: debug, info, warn, error (env: SEERR_MCP_LOG_LEVEL)",
9595
},
9696
{
9797
Name: "log-format",
9898
ViperKey: "mcp.log_format",
9999
Default: "text",
100-
Usage: "Log format: text or json (env: SEER_MCP_LOG_FORMAT)",
100+
Usage: "Log format: text or json (env: SEERR_MCP_LOG_FORMAT)",
101101
},
102102
}
103103

cmd/mcp/serve.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func runServe(_ *cobra.Command, args []string) error {
106106
case "stdio":
107107
mcpLog.Info("starting MCP server",
108108
"transport", "stdio",
109-
"seer_api", seerServer,
109+
"seerr_api", seerServer,
110110
"tools", 44,
111111
)
112112
mcpLog.Debug("stdio transport ready, waiting for MCP client on stdin")
@@ -132,7 +132,7 @@ func runServe(_ *cobra.Command, args []string) error {
132132
mcpLog.Info("starting MCP server",
133133
"transport", "http",
134134
"endpoint", endpoint,
135-
"seer_api", seerServer,
135+
"seerr_api", seerServer,
136136
"tools", 44,
137137
"tls", tlsCert != "",
138138
"auth_token", authToken != "",

cmd/root.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var RootCmd = &cobra.Command{
5757
return nil
5858
}
5959
if viper.GetString("seerr.server") == "" {
60-
return fmt.Errorf("server URL is required. Set it via --server flag, SEER_SERVER env var, or in the config file")
60+
return fmt.Errorf("server URL is required. Set it via --server flag, SEERR_SERVER env var, or in the config file")
6161
}
6262
return nil
6363
},
@@ -119,13 +119,13 @@ func initConfig() {
119119

120120
viper.SetEnvPrefix("SEER")
121121
// Replace dots and hyphens so nested keys like "mcp.transport" map to
122-
// env vars like "SEER_MCP_TRANSPORT".
122+
// env vars like "SEERR_MCP_TRANSPORT".
123123
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
124124
viper.AutomaticEnv()
125-
// AutomaticEnv with the SEERR prefix would construct "SEER_SEER_SERVER" for
125+
// AutomaticEnv with the SEERR prefix would construct "SEERR_SEERR_SERVER" for
126126
// the "seerr.server" key, so we bind those explicitly instead.
127-
viper.BindEnv("seerr.server", "SEER_SERVER")
128-
viper.BindEnv("seerr.api_key", "SEER_API_KEY")
127+
viper.BindEnv("seerr.server", "SEERR_SERVER")
128+
viper.BindEnv("seerr.api_key", "SEERR_API_KEY")
129129

130130
if err := viper.ReadInConfig(); err == nil {
131131
if viper.GetBool("verbose") {

0 commit comments

Comments
 (0)