straylight-ai 0.1.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,188 @@
1
+ # Straylight-AI
2
+
3
+ **Keep your API keys safe when using Claude Code, Cursor, and Windsurf.**
4
+
5
+ Straylight-AI is a self-hosted credential proxy that sits between your AI coding assistant and external APIs. Your keys are stored in an encrypted vault and injected at the HTTP transport layer — they never appear in the AI's context window, prompts, logs, or responses.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx straylight-ai
11
+ ```
12
+
13
+ This will:
14
+ 1. Pull and start the Straylight-AI container (Docker or Podman)
15
+ 2. Open the dashboard at http://localhost:9470
16
+ 3. Register the MCP server with Claude Code (if installed)
17
+
18
+ ### Prerequisites
19
+
20
+ - Docker or Podman
21
+ - Node.js 18+
22
+
23
+ ## Add a Service
24
+
25
+ 1. Open http://localhost:9470
26
+ 2. Click "Add Service"
27
+ 3. Select a template (GitHub, Stripe, OpenAI, AWS, and more) or create a custom service
28
+ 4. Paste your API key — it goes straight into the encrypted vault
29
+
30
+ ## Connect to Your AI Coding Assistant
31
+
32
+ ### Claude Code
33
+
34
+ If not auto-registered during setup:
35
+
36
+ ```bash
37
+ claude mcp add straylight-ai --transport stdio -- npx straylight-ai mcp
38
+ ```
39
+
40
+ ### Cursor / Windsurf
41
+
42
+ Any MCP-compatible AI coding assistant works. The MCP server speaks the standard protocol over stdio.
43
+
44
+ ## CLI Commands
45
+
46
+ | Command | Description |
47
+ |---------|-------------|
48
+ | `npx straylight-ai` | Full setup (pull, start, register) |
49
+ | `npx straylight-ai start` | Start the container |
50
+ | `npx straylight-ai stop` | Stop the container |
51
+ | `npx straylight-ai status` | Check health and service status |
52
+ | `npx straylight-ai logs` | View container logs |
53
+
54
+ ## MCP Tools
55
+
56
+ Once registered, your AI coding assistant has access to:
57
+
58
+ | Tool | What It Does |
59
+ |------|-------------|
60
+ | `straylight_api_call` | Make an authenticated HTTP request. Credentials injected automatically. |
61
+ | `straylight_exec` | Run a command with credentials as environment variables. Output sanitized. |
62
+ | `straylight_db_query` | Query a database with dynamic temporary credentials. |
63
+ | `straylight_scan` | Scan project files for exposed secrets. |
64
+ | `straylight_read_file` | Read a file with secrets automatically redacted. |
65
+ | `straylight_check` | Check whether a credential is available for a service. |
66
+ | `straylight_services` | List all configured services and their status. |
67
+
68
+ ## How It Works
69
+
70
+ ```
71
+ AI Coding Assistant --> straylight-mcp (stdio) --> Straylight Container
72
+ |
73
+ OpenBao Vault (encrypted)
74
+ |
75
+ HTTP Proxy (injects credentials)
76
+ |
77
+ External API (Stripe, GitHub, ...)
78
+ ```
79
+
80
+ Your AI assistant calls a Straylight MCP tool. The container fetches the credential from the vault, injects it into the outbound HTTP request, and returns the sanitized API response. The AI gets the data it needs without ever seeing the key.
81
+
82
+ ## Database Credentials
83
+
84
+ Configure a database once in the dashboard. When your AI coding assistant needs data, it calls `straylight_db_query` — Straylight provisions a temporary database user, runs the query, and returns the results. The AI never sees the password.
85
+
86
+ ```
87
+ // AI calls:
88
+ straylight_db_query(service="my-postgres", query="SELECT id, name FROM users LIMIT 10")
89
+ ```
90
+
91
+ - Credentials are read-only by default and auto-expire (5–15 min TTL)
92
+ - Supported: PostgreSQL, MySQL/MariaDB, Redis
93
+ - [Full documentation](https://aj-geddes.github.io/straylight-ai/docs/database-credentials)
94
+
95
+ ## Cloud Credentials
96
+
97
+ Configure an AWS, GCP, or Azure account in the dashboard. When the AI needs to run a cloud CLI command, it calls `straylight_exec` with a named service — Straylight generates short-lived temporary credentials, injects them as environment variables, and returns the sanitized output.
98
+
99
+ ```
100
+ // AI calls:
101
+ straylight_exec(service="aws-prod", command="aws s3 ls s3://my-bucket")
102
+ ```
103
+
104
+ - AWS: STS AssumeRole with inline session policies
105
+ - GCP: Workload Identity Federation tokens
106
+ - Azure: short-lived access tokens
107
+ - [Full documentation](https://aj-geddes.github.io/straylight-ai/docs/cloud-credentials)
108
+
109
+ ## Secret Scanner
110
+
111
+ Scan your project for exposed secrets before the AI reads them. Straylight checks files against 14 pattern categories and reports findings by file, line, and type.
112
+
113
+ ```
114
+ // AI calls:
115
+ straylight_scan(path="/home/user/my-project")
116
+ ```
117
+
118
+ - Detects AWS keys, GitHub PATs, Stripe keys, connection strings, private keys, and more
119
+ - Returns file paths, line numbers, secret types, and severity
120
+ - [Full documentation](https://aj-geddes.github.io/straylight-ai/docs/secret-scanner)
121
+
122
+ ## File Firewall
123
+
124
+ Let the AI read files it needs without exposing secrets. `straylight_read_file` serves file contents with credentials redacted. Blocked files (`.env`, `.pem`, `credentials.json`) return guidance to use the vault instead.
125
+
126
+ ```
127
+ // AI calls:
128
+ straylight_read_file(path="docker-compose.yml")
129
+ // Returns: file structure with passwords replaced by [STRAYLIGHT:service-name]
130
+ ```
131
+
132
+ - Blocked file patterns: `.env*`, `*credentials*`, `*secret*`, `*.pem`, SSH keys
133
+ - Legitimate files served clean — structure intact, secrets masked
134
+ - [Full documentation](https://aj-geddes.github.io/straylight-ai/docs/file-firewall)
135
+
136
+ ## Audit Trail
137
+
138
+ Every credential access, API call, and command execution is logged with a timestamp, service name, tool used, and session ID. No credentials appear in the log.
139
+
140
+ View the audit log in the dashboard at http://localhost:9470 or query it via the API.
141
+
142
+ - Append-only local log, no retention cap on the free tier
143
+ - [Full documentation](https://aj-geddes.github.io/straylight-ai/docs/audit-trail)
144
+
145
+ ## Supported Services
146
+
147
+ 16+ pre-configured templates including GitHub, Stripe, OpenAI, Anthropic, AWS, Google Cloud, Azure, PostgreSQL, MySQL, Redis, Slack, GitLab, and more. Custom services supported via base URL and auth method configuration.
148
+
149
+ ## Security
150
+
151
+ - **Encrypted at rest** — OpenBao (open-source HashiCorp Vault fork)
152
+ - **Transport-layer injection** — credentials never exposed to the AI
153
+ - **Output sanitization** — credential patterns stripped from all responses
154
+ - **Dynamic database credentials** — temporary users with automatic revocation
155
+ - **Non-root container** — UID 10001, minimal Alpine image
156
+
157
+ ## Optional: Claude Code Hooks
158
+
159
+ For extra protection, add hooks that block credential-accessing commands and sanitize output:
160
+
161
+ ```json
162
+ {
163
+ "hooks": {
164
+ "PreToolUse": [{
165
+ "matcher": "Bash|Write|Edit",
166
+ "hooks": [{ "type": "command", "command": "straylight-mcp hook pretooluse" }]
167
+ }],
168
+ "PostToolUse": [{
169
+ "matcher": "Bash",
170
+ "hooks": [{ "type": "command", "command": "straylight-mcp hook posttooluse" }]
171
+ }]
172
+ }
173
+ }
174
+ ```
175
+
176
+ ## Links
177
+
178
+ - [Documentation](https://aj-geddes.github.io/straylight-ai/docs/quickstart)
179
+ - [GitHub](https://github.com/aj-geddes/straylight-ai)
180
+ - [Issues](https://github.com/aj-geddes/straylight-ai/issues)
181
+
182
+ ## License
183
+
184
+ Apache-2.0
185
+
186
+ ---
187
+
188
+ Built by [High Velocity Solutions LLC](https://highvelocitysolutions.com)
package/dist/docker.d.ts CHANGED
@@ -4,8 +4,8 @@ export declare const CONTAINER_NAME = "straylight-ai";
4
4
  export declare const CONTAINER_IMAGE = "ghcr.io/aj-geddes/straylight-ai:latest";
5
5
  /** Host port mapped to container port 9470 */
6
6
  export declare const CONTAINER_PORT = 9470;
7
- /** Host data directory mounted at /data inside the container */
8
- export declare const DATA_DIR: string;
7
+ /** Named Docker volume mounted at /data inside the container */
8
+ export declare const VOLUME_NAME = "straylight-ai-data";
9
9
  /** Container status values */
10
10
  export type ContainerStatus = "running" | "stopped" | "not_found";
11
11
  /** Supported container runtimes */
@@ -1 +1 @@
1
- {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../src/docker.ts"],"names":[],"mappings":"AAIA,oCAAoC;AACpC,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,mCAAmC;AACnC,eAAO,MAAM,eAAe,2CAA2C,CAAC;AAExE,8CAA8C;AAC9C,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,gEAAgE;AAChE,eAAO,MAAM,QAAQ,QAAoD,CAAC;AAE1E,8B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AAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,CAAC,CAe1B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE1E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUvD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C"}
package/dist/docker.js CHANGED
@@ -1,39 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.DATA_DIR = exports.CONTAINER_PORT = exports.CONTAINER_IMAGE = exports.CONTAINER_NAME = void 0;
3
+ exports.VOLUME_NAME = exports.CONTAINER_PORT = exports.CONTAINER_IMAGE = exports.CONTAINER_NAME = void 0;
37
4
  exports.detectRuntime = detectRuntime;
38
5
  exports.getContainerStatus = getContainerStatus;
39
6
  exports.isContainerRunning = isContainerRunning;
@@ -42,16 +9,14 @@ exports.buildStartCommand = buildStartCommand;
42
9
  exports.buildStopCommand = buildStopCommand;
43
10
  exports.pullImage = pullImage;
44
11
  const child_process_1 = require("child_process");
45
- const os = __importStar(require("os"));
46
- const path = __importStar(require("path"));
47
12
  /** Name of the managed container */
48
13
  exports.CONTAINER_NAME = "straylight-ai";
49
14
  /** Docker image to pull and run */
50
15
  exports.CONTAINER_IMAGE = "ghcr.io/aj-geddes/straylight-ai:latest";
51
16
  /** Host port mapped to container port 9470 */
52
17
  exports.CONTAINER_PORT = 9470;
53
- /** Host data directory mounted at /data inside the container */
54
- exports.DATA_DIR = path.join(os.homedir(), ".straylight-ai", "data");
18
+ /** Named Docker volume mounted at /data inside the container */
19
+ exports.VOLUME_NAME = "straylight-ai-data";
55
20
  /**
56
21
  * Detect whether docker or podman is available on the host.
57
22
  * Returns the first available runtime, or null if neither is found.
@@ -100,7 +65,7 @@ function buildRunCommand(runtime) {
100
65
  "-d",
101
66
  `--name ${exports.CONTAINER_NAME}`,
102
67
  `-p ${exports.CONTAINER_PORT}:${exports.CONTAINER_PORT}`,
103
- `-v ${exports.DATA_DIR}:/data`,
68
+ `-v ${exports.VOLUME_NAME}:/data`,
104
69
  "--restart unless-stopped",
105
70
  exports.CONTAINER_IMAGE,
106
71
  ].join(" ");
@@ -1 +1 @@
1
- {"version":3,"file":"docker.js","sourceRoot":"","sources":["../src/docker.ts"],"names":[],"m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AAC;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,OAAO,GAAG,OAAO,SAAS,sBAAc,EAAE,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,IAAA,wBAAQ,EAAC,GAAG,OAAO,SAAS,uBAAe,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AACvE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "straylight-ai",
3
- "version": "0.1.0",
3
+ "version": "0.5.0",
4
4
  "description": "Zero-knowledge credential proxy for AI agents",
5
5
  "bin": {
6
6
  "straylight-ai": "bin/cli.js",
@@ -20,7 +20,8 @@
20
20
  "files": [
21
21
  "bin/",
22
22
  "dist/",
23
- "src/"
23
+ "src/",
24
+ "README.md"
24
25
  ],
25
26
  "keywords": [
26
27
  "mcp",
package/src/docker.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import { execSync } from "child_process";
2
- import * as os from "os";
3
- import * as path from "path";
4
2
 
5
3
  /** Name of the managed container */
6
4
  export const CONTAINER_NAME = "straylight-ai";
@@ -11,8 +9,8 @@ export const CONTAINER_IMAGE = "ghcr.io/aj-geddes/straylight-ai:latest";
11
9
  /** Host port mapped to container port 9470 */
12
10
  export const CONTAINER_PORT = 9470;
13
11
 
14
- /** Host data directory mounted at /data inside the container */
15
- export const DATA_DIR = path.join(os.homedir(), ".straylight-ai", "data");
12
+ /** Named Docker volume mounted at /data inside the container */
13
+ export const VOLUME_NAME = "straylight-ai-data";
16
14
 
17
15
  /** Container status values */
18
16
  export type ContainerStatus = "running" | "stopped" | "not_found";
@@ -74,7 +72,7 @@ export function buildRunCommand(runtime: string): string {
74
72
  "-d",
75
73
  `--name ${CONTAINER_NAME}`,
76
74
  `-p ${CONTAINER_PORT}:${CONTAINER_PORT}`,
77
- `-v ${DATA_DIR}:/data`,
75
+ `-v ${VOLUME_NAME}:/data`,
78
76
  "--restart unless-stopped",
79
77
  CONTAINER_IMAGE,
80
78
  ].join(" ");