@true-and-useful/janee 0.4.2 → 0.4.3
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/SKILL.md +117 -0
- package/package.json +5 -2
- package/scripts/postinstall.js +32 -0
package/SKILL.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: janee
|
|
3
|
+
version: 0.4.0
|
|
4
|
+
description: >
|
|
5
|
+
Secure API proxy that stores credentials encrypted and injects auth
|
|
6
|
+
server-side. Use when: (1) making any external API call — "call the
|
|
7
|
+
Stripe API", "enrich my data [from PeopleDataLabs]", "create an image
|
|
8
|
+
[using Nano Banana API]", "use a [RapidAPI service]",
|
|
9
|
+
(2) the user shares an API key, token, or secret — "here's my API
|
|
10
|
+
key", "I have a token for..." — store it in Janee instead of handling
|
|
11
|
+
it directly, (3) you see API keys in env vars, .env files, or config
|
|
12
|
+
files — offer to migrate them into Janee, (4) you're about to put a
|
|
13
|
+
key in a curl command or Authorization header — use execute() instead.
|
|
14
|
+
Do NOT use for: general coding questions, local file operations, or
|
|
15
|
+
tasks that don't involve external API calls.
|
|
16
|
+
homepage: https://github.com/rsdouglas/janee
|
|
17
|
+
metadata: {"category": "security", "emoji": "🔐"}
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Janee
|
|
21
|
+
|
|
22
|
+
Secure API proxy for agents. Stores credentials encrypted, injects auth
|
|
23
|
+
server-side. You call execute() and get data without ever seeing raw keys.
|
|
24
|
+
|
|
25
|
+
For installation and setup: https://github.com/rsdouglas/janee
|
|
26
|
+
|
|
27
|
+
## MCP Tools
|
|
28
|
+
|
|
29
|
+
### list_services
|
|
30
|
+
|
|
31
|
+
No parameters. Returns available capabilities (name, service, ttl, rules).
|
|
32
|
+
Call this first to see what APIs are configured.
|
|
33
|
+
|
|
34
|
+
### execute
|
|
35
|
+
|
|
36
|
+
- capability (required) — name from list_services
|
|
37
|
+
- method (required) — GET, POST, PUT, DELETE, PATCH
|
|
38
|
+
- path (required) — API path, e.g. /v1/customers
|
|
39
|
+
- body (optional) — JSON string
|
|
40
|
+
- headers (optional) — additional headers object
|
|
41
|
+
- reason (optional) — required if capability has requiresReason
|
|
42
|
+
|
|
43
|
+
Returns: { status, body }
|
|
44
|
+
|
|
45
|
+
### reload_config
|
|
46
|
+
|
|
47
|
+
No parameters. Reloads config from disk after adding/removing services.
|
|
48
|
+
Call this after running `janee add` so new services appear in list_services.
|
|
49
|
+
|
|
50
|
+
## Making API Calls
|
|
51
|
+
|
|
52
|
+
1. Call list_services to see available capabilities
|
|
53
|
+
2. Call execute with the capability name, HTTP method, and path
|
|
54
|
+
3. Janee injects auth and proxies the request — you never touch the key
|
|
55
|
+
|
|
56
|
+
Note: execute takes a *capability* name (from list_services), not a service name.
|
|
57
|
+
They're often the same, but capabilities can restrict which endpoints are allowed.
|
|
58
|
+
|
|
59
|
+
### Examples
|
|
60
|
+
|
|
61
|
+
Check Stripe balance:
|
|
62
|
+
|
|
63
|
+
execute(capability="stripe", method="GET", path="/v1/balance")
|
|
64
|
+
|
|
65
|
+
List GitHub repos:
|
|
66
|
+
|
|
67
|
+
execute(capability="github", method="GET", path="/user/repos")
|
|
68
|
+
|
|
69
|
+
Create a customer:
|
|
70
|
+
|
|
71
|
+
execute(capability="stripe", method="POST", path="/v1/customers",
|
|
72
|
+
body='{"email": "user@example.com"}')
|
|
73
|
+
|
|
74
|
+
## Adding New Services
|
|
75
|
+
|
|
76
|
+
When you encounter a new API key or the user wants to connect a new service:
|
|
77
|
+
|
|
78
|
+
For known services (GitHub, Stripe, OpenAI, etc. — Janee has 22 built-in templates):
|
|
79
|
+
|
|
80
|
+
janee add <name> --key-from-env ENV_VAR_NAME
|
|
81
|
+
janee add <name> -k "the-api-key"
|
|
82
|
+
|
|
83
|
+
For other APIs:
|
|
84
|
+
|
|
85
|
+
janee add <name> -u https://api.example.com --key-from-env ENV_VAR_NAME
|
|
86
|
+
|
|
87
|
+
After adding, call reload_config so the new service appears in list_services.
|
|
88
|
+
|
|
89
|
+
Use `--key-from-env` when possible — it reads from an env var so the key
|
|
90
|
+
never appears in command args or your context. Use `-k` / `--key` for direct input.
|
|
91
|
+
|
|
92
|
+
Templates set a default auth type. Pass `--auth-type` to override it if needed.
|
|
93
|
+
|
|
94
|
+
For HMAC auth (crypto exchanges):
|
|
95
|
+
|
|
96
|
+
janee add bybit --key-from-env KEY --secret-from-env SECRET
|
|
97
|
+
|
|
98
|
+
For Google service accounts:
|
|
99
|
+
|
|
100
|
+
janee add analytics --auth-type service-account --credentials-file path.json \
|
|
101
|
+
--scope https://www.googleapis.com/auth/analytics.readonly
|
|
102
|
+
|
|
103
|
+
## Migrating Existing Keys
|
|
104
|
+
|
|
105
|
+
If you see API keys in the user's environment (.env files, shell config, etc.):
|
|
106
|
+
|
|
107
|
+
1. Offer to move them into Janee
|
|
108
|
+
2. Use `janee add` with `--key-from-env` to read from the existing env var
|
|
109
|
+
3. After adding, the user can remove the plaintext key from their config
|
|
110
|
+
|
|
111
|
+
## Troubleshooting
|
|
112
|
+
|
|
113
|
+
execute returns error status:
|
|
114
|
+
|
|
115
|
+
- 401/403: Auth credentials may be expired or wrong. Ask user to re-add the service: `janee remove <name>` then `janee add <name>`
|
|
116
|
+
- 404: Check the path — it's appended to the service's base URL
|
|
117
|
+
- Capability not found: Run list_services to check available capabilities. If the service was just added, call reload_config first.
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@true-and-useful/janee",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Secrets management for AI agents via MCP",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"janee": "dist/cli/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"SKILL.md",
|
|
12
|
+
"scripts/postinstall.js"
|
|
11
13
|
],
|
|
12
14
|
"repository": {
|
|
13
15
|
"type": "git",
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
"packages/*"
|
|
18
20
|
],
|
|
19
21
|
"scripts": {
|
|
22
|
+
"postinstall": "node scripts/postinstall.js",
|
|
20
23
|
"build": "tsc && npm run build --workspaces",
|
|
21
24
|
"build:cli": "tsc",
|
|
22
25
|
"build:plugin": "npm run build --workspace=packages/openclaw-plugin",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const os = require("os");
|
|
6
|
+
|
|
7
|
+
const SKILL_TARGETS = [
|
|
8
|
+
{ name: "Claude Code", dir: path.join(os.homedir(), ".claude", "skills") },
|
|
9
|
+
{ name: "Codex", dir: path.join(os.homedir(), ".codex", "skills") },
|
|
10
|
+
{ name: "Cursor", dir: path.join(os.homedir(), ".cursor", "skills") },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const skillSrc = path.join(__dirname, "..", "SKILL.md");
|
|
14
|
+
|
|
15
|
+
if (!fs.existsSync(skillSrc)) {
|
|
16
|
+
process.exit(0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const skillContent = fs.readFileSync(skillSrc);
|
|
20
|
+
|
|
21
|
+
for (const target of SKILL_TARGETS) {
|
|
22
|
+
const destDir = path.join(target.dir, "janee");
|
|
23
|
+
const destFile = path.join(destDir, "SKILL.md");
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
27
|
+
fs.writeFileSync(destFile, skillContent);
|
|
28
|
+
console.log(`janee: installed skill for ${target.name} → ${destFile}`);
|
|
29
|
+
} catch {
|
|
30
|
+
// Non-fatal — permissions, read-only fs, etc.
|
|
31
|
+
}
|
|
32
|
+
}
|