sekura 0.2.0 → 0.3.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 +36 -11
- package/dist/api.js +2 -2
- package/dist/auth.js +46 -19
- package/dist/catalogue.js +20 -0
- package/dist/cli.js +7 -6
- package/dist/commands/init.js +137 -55
- package/dist/commands/login.js +11 -10
- package/dist/device.js +87 -0
- package/dist/guide.js +150 -102
- package/dist/skill.js +6 -4
- package/dist/ui.js +60 -0
- package/dist/writers.js +5 -1
- package/package.json +2 -2
- package/skills/sekura/SKILL.md +79 -38
package/README.md
CHANGED
|
@@ -6,31 +6,51 @@ Connect your coding tool to [Sekura](https://sekura.ai) in one command.
|
|
|
6
6
|
npx sekura@latest init
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Sekura is an AI red team as a service: it scans a GitHub repository you have granted it, exploits what it finds to prove each finding, and delivers a report. Its MCP server is remote, at `https://sekura.ai/mcp`, so this package runs no server. It writes that address into the coding tools on your machine and installs a skill that teaches the agent the quote-then-confirm rule. Then it finishes getting started right in the terminal: it signs you in once,
|
|
9
|
+
Sekura is an AI red team as a service: it scans a GitHub repository you have granted it, exploits what it finds to prove each finding, and delivers a report. Its MCP server is remote, at `https://sekura.ai/mcp`, so this package runs no server. It writes that address into the coding tools on your machine and installs a skill that teaches the agent the quote-then-confirm rule. Then it finishes getting started right in the terminal: it signs you in once, waits while you accept the Terms and install the GitHub App, and lets you pick a repository. When you open your coding tool, Sekura already works.
|
|
10
|
+
|
|
11
|
+
`npx sekura@latest` on its own runs `init` too.
|
|
10
12
|
|
|
11
13
|
## What `init` does
|
|
12
14
|
|
|
13
15
|
1. **Detects** the tools on this machine: Claude Code, Cursor, GitHub Copilot in VS Code, OpenAI Codex, Kiro, Cline, Zed, Antigravity, OpenCode, JetBrains Junie, Factory Droid, Tabnine, Devin and Goose.
|
|
14
|
-
2. **Asks
|
|
15
|
-
3. **
|
|
16
|
-
4. **
|
|
17
|
-
5. **Applies** it, one step at a time, and says what each did. Files that are not plain JSON (Zed's `settings.json` with comments, for one) are never rewritten; you are shown the lines to add instead.
|
|
16
|
+
2. **Asks one question**, with every detected tool, your user configuration, the skill and the sign-in as the defaults: `Connect Claude Code, Cursor and OpenAI Codex for every project, with the skill, and sign in to Sekura?` Answer **Yes**, **No**, or **Edit** to choose the tools, every project or this project only, the skill, and the sign-in one by one. A flag answers its own question and skips it.
|
|
17
|
+
3. **Shows the plan** before anything happens: each file and the exact entry, or the tool's own command. The key isn't there yet, so the plan shows `Authorization: Bearer <your key, after sign-in>` where it will go (a key you already have is shown as `sek_live_…abcd`). Then it asks **Apply?**
|
|
18
|
+
4. **Signs you in** once you've said yes. You sign in with GitHub on sekura.ai and approve, and the CLI receives a Sekura key. On a machine whose browser is somewhere else (over SSH, in a devcontainer or Codespace, with `--device`, or when no browser opens), it prints a code instead: open `https://sekura.ai/connect/device` on any device and enter it. If the sign-in doesn't finish, the same plan is applied without a key, and each tool signs in the first time it uses Sekura.
|
|
19
|
+
5. **Applies** the plan with the key in it, one step at a time, and says what each step did. Files that are not plain JSON (Zed's `settings.json` with comments, for one) are never rewritten; you are shown the lines to add instead. Codex and Devin can't take a key in their configuration, so the CLI runs their own `mcp login`; since your browser is already signed in, that's one click.
|
|
18
20
|
6. **Checks** that the Sekura server answers.
|
|
19
21
|
7. **Gets you to a first scan**:
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
+
- If your account still needs the Terms or email verification, it opens sekura.ai and carries on by itself once they are done.
|
|
23
|
+
- If nothing can be scanned yet, or the repository in the current folder isn't covered, it offers to open the GitHub App install and carries on by itself once the repository shows up.
|
|
22
24
|
- It lets you pick a repository, with the current folder's first.
|
|
23
|
-
- If your free first scan is still available, it opens sekura.ai so you can start it there.
|
|
24
|
-
8. **Tells you what to type** in each tool, such as `/sekura scan owner/repo` in Claude Code (`/sekura help` lists every command).
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Each wait shows a one-line spinner, stops after five minutes, and Enter skips it.
|
|
27
|
+
8. **Tells you the next step in each tool**, such as "Cursor: restart Cursor (or reload MCP servers in Settings → MCP)" or "Claude Code: start a new Claude Code session, then type /sekura", and what to type to scan, such as `/sekura scan owner/repo` (`/sekura help` lists every command).
|
|
28
|
+
|
|
29
|
+
Every scan you then ask for in your coding tool is quoted first, with the price and the authorization wording, and starts only after you agree.
|
|
30
|
+
|
|
31
|
+
## Flags
|
|
32
|
+
|
|
33
|
+
| Flag | What it does |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `-y, --yes` | No questions: every detected tool, user scope, the skill, and the key in `SEKURA_API_KEY` or the one `sekura login` saved. Signs in nowhere. |
|
|
36
|
+
| `--tools <ids>` | Only these, comma-separated: `claude`, `cursor`, `copilot`, `codex`, `kiro`, `cline`, `zed`, `antigravity`, `opencode`, `jetbrains`, `factory`, `tabnine`, `devin`, `goose`. |
|
|
37
|
+
| `--scope <user\|project>` | `user` (every project, the default) or `project` (this directory). |
|
|
38
|
+
| `--no-skill` | The MCP server only: no skill, no guidance block. |
|
|
39
|
+
| `--no-login` | No sign-in here; each tool opens a sekura.ai sign-in page the first time it uses Sekura. This is how 0.1.x worked. |
|
|
40
|
+
| `--device` | Sign in with a code on another device. The default over SSH (`SSH_CONNECTION`, `SSH_TTY`), in Codespaces, devcontainers (`REMOTE_CONTAINERS`) and Gitpod. `sekura login` takes it too. |
|
|
41
|
+
| `--dry-run` | Show the plan and change nothing. Never signs in and needs no key. |
|
|
42
|
+
| `--no-verify` | Don't check that the Sekura server answers. |
|
|
43
|
+
|
|
44
|
+
Project scope never writes the key, because project files get committed.
|
|
27
45
|
|
|
28
46
|
```bash
|
|
47
|
+
npx sekura@latest # the same as init
|
|
29
48
|
npx sekura@latest init --yes # every detected tool, user scope, with the skill, no questions
|
|
30
49
|
npx sekura@latest init --dry-run # show the plan and change nothing
|
|
31
50
|
npx sekura@latest init --scope project # this project only: .mcp.json, .cursor/mcp.json, AGENTS.md …
|
|
32
51
|
npx sekura@latest init --tools claude,cursor --no-skill
|
|
33
52
|
npx sekura@latest init --no-login # no sign-in here; each tool signs in on first use
|
|
53
|
+
npx sekura@latest init --device # sign in with a code, for a terminal on another machine
|
|
34
54
|
npx sekura@latest login # sign in again, give connected tools the key, pick a repository
|
|
35
55
|
npx sekura@latest status # what is connected, and who is signed in
|
|
36
56
|
npx sekura@latest logout # forget the saved key
|
|
@@ -64,7 +84,12 @@ The skill goes to `~/.agents/skills/sekura/SKILL.md` and, when Claude Code is pr
|
|
|
64
84
|
|
|
65
85
|
## Your key
|
|
66
86
|
|
|
67
|
-
Signing in creates one Sekura key, named "Sekura CLI (your computer's name)"
|
|
87
|
+
Signing in creates one Sekura key, named "Sekura CLI (your computer's name)", whichever way you signed in (browser or code). The CLI saves it in `~/.config/sekura/credentials.json` (under `$XDG_CONFIG_HOME` when that is set), readable by you only, and writes it as an `Authorization: Bearer` header into each tool's user configuration. `SEKURA_API_KEY` in the environment is used instead of the saved file when it is set. Nothing printed ever shows the whole key.
|
|
88
|
+
|
|
89
|
+
- **See or revoke it** at [sekura.ai/app/settings](https://sekura.ai/app/settings) → Agents and API keys. Revoking it there ends it everywhere at once; run `sekura login` for a new one.
|
|
90
|
+
- **`sekura logout`** removes the saved copy. Tools that were given the key keep it.
|
|
91
|
+
- **`sekura uninstall`** removes the entries (with their key), the skill, the guidance block and the saved copy.
|
|
92
|
+
- **`--no-login`** writes no key anywhere, as 0.1.x did.
|
|
68
93
|
|
|
69
94
|
Review before running: the source is this repository, the package is [`sekura` on npm](https://www.npmjs.com/package/sekura), and `--dry-run` prints every write the wizard would make.
|
|
70
95
|
|
package/dist/api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// The few Sekura tools the CLI calls itself, over the same MCP endpoint the
|
|
2
2
|
// coding tools use. The server is stateless JSON-RPC over POST and answers
|
|
3
3
|
// in plain JSON, so no session and no MCP library: one request per call.
|
|
4
|
-
// Only tools that read are called here; every scan is
|
|
5
|
-
//
|
|
4
|
+
// Only tools that read are called here; every scan is quoted and agreed in
|
|
5
|
+
// the coding tool.
|
|
6
6
|
import { ENDPOINT } from './catalogue.js';
|
|
7
7
|
export class SignedOut extends Error {
|
|
8
8
|
constructor(detail) { super(detail); this.name = 'SignedOut'; }
|
package/dist/auth.js
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
// on 127.0.0.1 for a client that registered a loopback URI). What comes back
|
|
7
7
|
// is an ordinary `sek_live_` key with no expiry, listed and revocable under
|
|
8
8
|
// Settings → Agents and API keys, bound to the MCP address (RFC 8707).
|
|
9
|
+
// Where the browser is on another machine (SSH, a container, --device, or
|
|
10
|
+
// none to open here), the same client signs in with a code instead
|
|
11
|
+
// (device.ts, RFC 8628).
|
|
9
12
|
//
|
|
10
13
|
// The key is kept in ~/.config/sekura/credentials.json, readable by the
|
|
11
14
|
// person only, so a rerun of `init` or `login` does not sign in again.
|
|
@@ -16,7 +19,8 @@ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync, chmodSync }
|
|
|
16
19
|
import { hostname, platform } from 'node:os';
|
|
17
20
|
import { dirname, join } from 'node:path';
|
|
18
21
|
import { spawn } from 'node:child_process';
|
|
19
|
-
import { ENDPOINT, home } from './catalogue.js';
|
|
22
|
+
import { ENDPOINT, home, onPath } from './catalogue.js';
|
|
23
|
+
import { DEVICE_GRANT, deviceSignIn, remoteSession } from './device.js';
|
|
20
24
|
export const ISSUER = new URL(ENDPOINT).origin;
|
|
21
25
|
export const credentialsPath = () => join(process.env.XDG_CONFIG_HOME || join(home(), '.config'), 'sekura', 'credentials.json');
|
|
22
26
|
export function readKey() {
|
|
@@ -62,8 +66,18 @@ export function pkce() {
|
|
|
62
66
|
return { verifier, challenge: b64url(createHash('sha256').update(verifier).digest()) };
|
|
63
67
|
}
|
|
64
68
|
// ── the browser ────────────────────────────────────────────────────────────
|
|
69
|
+
/** Whether this machine has a browser to open. On Linux that takes a
|
|
70
|
+
* display and xdg-open; a bare server or container has neither, and the
|
|
71
|
+
* spawn's failure would only arrive after the URL was promised. */
|
|
72
|
+
export function hasBrowser(env = process.env) {
|
|
73
|
+
if (platform() === 'darwin' || platform() === 'win32')
|
|
74
|
+
return true;
|
|
75
|
+
return !!(env.DISPLAY || env.WAYLAND_DISPLAY) && onPath('xdg-open');
|
|
76
|
+
}
|
|
65
77
|
/** Opens a URL in the default browser; false when there is none to ask. */
|
|
66
78
|
export function openBrowser(url) {
|
|
79
|
+
if (!hasBrowser())
|
|
80
|
+
return false;
|
|
67
81
|
const [cmd, args] = platform() === 'darwin' ? ['open', [url]]
|
|
68
82
|
: platform() === 'win32' ? ['cmd', ['/c', 'start', '""', url.replace(/&/g, '^&')]]
|
|
69
83
|
: ['xdg-open', [url]];
|
|
@@ -114,7 +128,9 @@ export async function listen(state, timeoutMs) {
|
|
|
114
128
|
const port = server.address().port;
|
|
115
129
|
const timer = setTimeout(() => settle({ error: 'no answer from the browser in time' }), timeoutMs);
|
|
116
130
|
timer.unref();
|
|
117
|
-
|
|
131
|
+
let closed = false;
|
|
132
|
+
const close = () => { if (closed)
|
|
133
|
+
return; closed = true; clearTimeout(timer); server.close(); server.closeAllConnections?.(); };
|
|
118
134
|
return { redirectUri: `http://127.0.0.1:${port}/callback`, result, close };
|
|
119
135
|
}
|
|
120
136
|
// ── the flow ───────────────────────────────────────────────────────────────
|
|
@@ -125,26 +141,34 @@ async function post(path, body, type) {
|
|
|
125
141
|
throw new Error(`sekura.ai refused the sign-in (${path}): ${data.error_description || data.error || r.status}`);
|
|
126
142
|
return data;
|
|
127
143
|
}
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
144
|
+
/** One public client for both ways in: the loopback redirect and the
|
|
145
|
+
* device code. sekura.ai accepts any port on the registered loopback URI. */
|
|
146
|
+
export async function register() {
|
|
147
|
+
const reg = await post('/oauth/register', JSON.stringify({
|
|
148
|
+
client_name: `Sekura CLI (${hostname().slice(0, 60)})`,
|
|
149
|
+
redirect_uris: ['http://127.0.0.1/callback'],
|
|
150
|
+
token_endpoint_auth_method: 'none',
|
|
151
|
+
grant_types: ['authorization_code', DEVICE_GRANT],
|
|
152
|
+
response_types: ['code'],
|
|
153
|
+
}), 'application/json');
|
|
154
|
+
const clientId = String(reg.client_id ?? '');
|
|
155
|
+
if (!clientId)
|
|
156
|
+
throw new Error('sekura.ai did not register the CLI');
|
|
157
|
+
return clientId;
|
|
158
|
+
}
|
|
159
|
+
/** Signs in and returns the key. */
|
|
133
160
|
export async function signIn(opts = {}) {
|
|
161
|
+
const clientId = await register();
|
|
162
|
+
const remote = remoteSession();
|
|
163
|
+
const why = opts.device ? '--device' : remote ? `${remote} is set` : opts.open !== false && !hasBrowser() ? 'there is no browser to open here' : null;
|
|
164
|
+
if (why) {
|
|
165
|
+
opts.onDevice?.(why);
|
|
166
|
+
return deviceSignIn(clientId, opts);
|
|
167
|
+
}
|
|
134
168
|
const state = b64url(randomBytes(16));
|
|
135
169
|
const { verifier, challenge } = pkce();
|
|
136
170
|
const cb = await listen(state, opts.timeoutMs ?? 300_000);
|
|
137
171
|
try {
|
|
138
|
-
const reg = await post('/oauth/register', JSON.stringify({
|
|
139
|
-
client_name: `Sekura CLI (${hostname().slice(0, 60)})`,
|
|
140
|
-
redirect_uris: ['http://127.0.0.1/callback'],
|
|
141
|
-
token_endpoint_auth_method: 'none',
|
|
142
|
-
grant_types: ['authorization_code'],
|
|
143
|
-
response_types: ['code'],
|
|
144
|
-
}), 'application/json');
|
|
145
|
-
const clientId = String(reg.client_id ?? '');
|
|
146
|
-
if (!clientId)
|
|
147
|
-
throw new Error('sekura.ai did not register the CLI');
|
|
148
172
|
const url = new URL(`${ISSUER}/oauth/authorize`);
|
|
149
173
|
for (const [k, v] of Object.entries({
|
|
150
174
|
response_type: 'code', client_id: clientId, redirect_uri: cb.redirectUri, state,
|
|
@@ -152,8 +176,11 @@ export async function signIn(opts = {}) {
|
|
|
152
176
|
}))
|
|
153
177
|
url.searchParams.set(k, v);
|
|
154
178
|
opts.onUrl?.(url.href);
|
|
155
|
-
if (opts.open !== false)
|
|
156
|
-
|
|
179
|
+
if (opts.open !== false && !openBrowser(url.href)) {
|
|
180
|
+
cb.close();
|
|
181
|
+
opts.onDevice?.('the browser did not open');
|
|
182
|
+
return deviceSignIn(clientId, opts);
|
|
183
|
+
}
|
|
157
184
|
const r = await cb.result;
|
|
158
185
|
if ('error' in r)
|
|
159
186
|
throw new Error(`Sekura sign-in: ${r.error}`);
|
package/dist/catalogue.js
CHANGED
|
@@ -66,11 +66,18 @@ export function onPath(bin) {
|
|
|
66
66
|
}
|
|
67
67
|
return false;
|
|
68
68
|
}
|
|
69
|
+
/** Stands in for the key in the plan shown before the sign-in. Not a key
|
|
70
|
+
* shape (no sek_ prefix), so it is never redacted into one, and writers.ts
|
|
71
|
+
* refuses to write a target that carries it. */
|
|
72
|
+
export const PENDING_KEY = '<your key, after sign-in>';
|
|
69
73
|
const SIGN_IN = 'the first time the tool uses Sekura, a sekura.ai page opens in your browser: sign in with GitHub and approve.';
|
|
70
74
|
const url = { url: ENDPOINT };
|
|
71
75
|
const http = { type: 'http', url: ENDPOINT };
|
|
72
76
|
/** The header a key is sent in, as JSON configurations spell it. */
|
|
73
77
|
const auth = (key) => (key ? { headers: { Authorization: `Bearer ${key}` } } : {});
|
|
78
|
+
/** The generic next step, for a tool with nothing more specific. */
|
|
79
|
+
export const NEXT = (name) => `restart ${name} so it loads the sekura server.`;
|
|
80
|
+
export const nextStep = (t) => t.next ?? NEXT(t.name);
|
|
74
81
|
/** True when a target sends a key, so its tool needs no sign-in. */
|
|
75
82
|
export const carriesKey = (t) => JSON.stringify(t).includes('Bearer sek_');
|
|
76
83
|
export const TOOLS = [
|
|
@@ -83,6 +90,7 @@ export const TOOLS = [
|
|
|
83
90
|
],
|
|
84
91
|
project: (cwd) => [{ kind: 'json', path: join(cwd, '.mcp.json'), key: 'mcpServers', entry: http }],
|
|
85
92
|
signIn: `type /mcp in Claude Code, choose ${SERVER_NAME}, and sign in with GitHub.`,
|
|
93
|
+
next: `start a new Claude Code session, then type /${SERVER_NAME}.`,
|
|
86
94
|
},
|
|
87
95
|
{
|
|
88
96
|
id: 'tools-cursor', name: 'Cursor',
|
|
@@ -90,6 +98,7 @@ export const TOOLS = [
|
|
|
90
98
|
user: (h, key) => [{ kind: 'json', path: join(h, '.cursor', 'mcp.json'), key: 'mcpServers', entry: { ...url, ...auth(key) } }],
|
|
91
99
|
project: (cwd) => [{ kind: 'json', path: join(cwd, '.cursor', 'mcp.json'), key: 'mcpServers', entry: url }],
|
|
92
100
|
signIn: SIGN_IN,
|
|
101
|
+
next: `restart Cursor (or reload MCP servers in Settings → MCP).`,
|
|
93
102
|
},
|
|
94
103
|
{
|
|
95
104
|
id: 'tools-copilot', name: 'GitHub Copilot in VS Code',
|
|
@@ -97,6 +106,7 @@ export const TOOLS = [
|
|
|
97
106
|
user: (h, key) => [{ kind: 'json', path: join(codeUserDir(h), 'mcp.json'), key: 'servers', entry: { ...http, ...auth(key) } }],
|
|
98
107
|
project: (cwd) => [{ kind: 'json', path: join(cwd, '.mcp.json'), key: 'mcpServers', entry: http }],
|
|
99
108
|
signIn: SIGN_IN,
|
|
109
|
+
next: `reload the VS Code window (Command Palette → Developer: Reload Window), then use Copilot Chat in Agent mode.`,
|
|
100
110
|
},
|
|
101
111
|
{
|
|
102
112
|
id: 'tools-codex', name: 'OpenAI Codex',
|
|
@@ -106,6 +116,7 @@ export const TOOLS = [
|
|
|
106
116
|
{ kind: 'toml', path: join(h, '.codex', 'config.toml'), table: `mcp_servers.${SERVER_NAME}`, lines: [`url = "${ENDPOINT}"`] },
|
|
107
117
|
],
|
|
108
118
|
signIn: `run codex mcp login ${SERVER_NAME}, or sign in when Codex first uses Sekura.`,
|
|
119
|
+
next: `start a new codex session.`,
|
|
109
120
|
login: ['mcp', 'login', SERVER_NAME],
|
|
110
121
|
},
|
|
111
122
|
{
|
|
@@ -114,6 +125,7 @@ export const TOOLS = [
|
|
|
114
125
|
user: (h, key) => [{ kind: 'json', path: join(h, '.kiro', 'settings', 'mcp.json'), key: 'mcpServers', entry: { ...url, ...auth(key) } }],
|
|
115
126
|
project: (cwd) => [{ kind: 'json', path: join(cwd, '.kiro', 'settings', 'mcp.json'), key: 'mcpServers', entry: url }],
|
|
116
127
|
signIn: SIGN_IN,
|
|
128
|
+
next: `restart Kiro (or reconnect ${SERVER_NAME} in the MCP servers view of the Kiro panel).`,
|
|
117
129
|
},
|
|
118
130
|
{
|
|
119
131
|
id: 'tools-cline', name: 'Cline',
|
|
@@ -122,12 +134,14 @@ export const TOOLS = [
|
|
|
122
134
|
detect: (h) => existsSync(join(h, '.cline')) || hasExtension(h, 'saoudrizwan.claude-dev') || existsSync(join(codeUserDir(h), 'globalStorage', 'saoudrizwan.claude-dev')),
|
|
123
135
|
user: (h, key) => [{ kind: 'json', path: clineSettingsPath(h), key: 'mcpServers', entry: { type: 'streamableHttp', url: ENDPOINT, ...auth(key) } }],
|
|
124
136
|
signIn: SIGN_IN,
|
|
137
|
+
next: `reload the VS Code window, or start a new session in the Cline CLI; Cline's MCP Servers view should show ${SERVER_NAME}.`,
|
|
125
138
|
},
|
|
126
139
|
{
|
|
127
140
|
id: 'tools-zed', name: 'Zed',
|
|
128
141
|
detect: (h) => existsSync(join(xdg(h), 'zed')) || onPath('zed'),
|
|
129
142
|
user: (h, key) => [{ kind: 'json', path: join(xdg(h), 'zed', 'settings.json'), key: 'context_servers', entry: { ...url, ...auth(key) } }],
|
|
130
143
|
signIn: `${SIGN_IN} Zed keeps the sign-in in your system keychain.`,
|
|
144
|
+
next: `Zed reads settings.json again by itself; start a new thread in the Agent Panel.`,
|
|
131
145
|
},
|
|
132
146
|
{
|
|
133
147
|
id: 'tools-antigravity', name: 'Antigravity',
|
|
@@ -135,6 +149,7 @@ export const TOOLS = [
|
|
|
135
149
|
user: (h, key) => [{ kind: 'json', path: join(h, '.gemini', 'config', 'mcp_config.json'), key: 'mcpServers', entry: { serverUrl: ENDPOINT, ...auth(key) } }],
|
|
136
150
|
project: (cwd) => [{ kind: 'json', path: join(cwd, '.agents', 'mcp_config.json'), key: 'mcpServers', entry: { serverUrl: ENDPOINT } }],
|
|
137
151
|
signIn: SIGN_IN,
|
|
152
|
+
next: `restart Antigravity (or refresh in Manage MCP servers).`,
|
|
138
153
|
},
|
|
139
154
|
{
|
|
140
155
|
id: 'tools-opencode', name: 'OpenCode',
|
|
@@ -142,6 +157,7 @@ export const TOOLS = [
|
|
|
142
157
|
user: (h, key) => [{ kind: 'json', path: join(xdg(h), 'opencode', 'opencode.json'), key: 'mcp', entry: { type: 'remote', url: ENDPOINT, ...auth(key) } }],
|
|
143
158
|
project: (cwd) => [{ kind: 'json', path: join(cwd, 'opencode.json'), key: 'mcp', entry: { type: 'remote', url: ENDPOINT } }],
|
|
144
159
|
signIn: `OpenCode registers itself with Sekura and opens the sign-in on first use; ${SIGN_IN}`,
|
|
160
|
+
next: `start a new opencode session.`,
|
|
145
161
|
},
|
|
146
162
|
{
|
|
147
163
|
id: 'tools-jetbrains', name: 'JetBrains Junie',
|
|
@@ -158,18 +174,21 @@ export const TOOLS = [
|
|
|
158
174
|
{ kind: 'link', href: `${DOCS}#tools-factory`, note: 'droid is not on PATH; run the command from the page in a terminal where it is.' },
|
|
159
175
|
],
|
|
160
176
|
signIn: `type /mcp in Droid and sign in to ${SERVER_NAME}.`,
|
|
177
|
+
next: `start a new droid session.`,
|
|
161
178
|
},
|
|
162
179
|
{
|
|
163
180
|
id: 'tools-tabnine', name: 'Tabnine CLI',
|
|
164
181
|
detect: () => onPath('tabnine'),
|
|
165
182
|
user: () => [{ kind: 'command', bin: 'tabnine', add: ['mcp', 'add', SERVER_NAME, ENDPOINT, '--type', 'http'], remove: ['mcp', 'remove', SERVER_NAME] }],
|
|
166
183
|
signIn: 'run /mcp auth in the Tabnine CLI.',
|
|
184
|
+
next: `start a new tabnine session.`,
|
|
167
185
|
},
|
|
168
186
|
{
|
|
169
187
|
id: 'tools-devin', name: 'Devin Desktop and CLI',
|
|
170
188
|
detect: () => onPath('devin'),
|
|
171
189
|
user: () => [{ kind: 'command', bin: 'devin', add: ['mcp', 'add', SERVER_NAME, ENDPOINT], remove: ['mcp', 'remove', SERVER_NAME] }],
|
|
172
190
|
signIn: `run devin mcp login ${SERVER_NAME}.`,
|
|
191
|
+
next: `start a new devin session, or restart Devin Desktop.`,
|
|
173
192
|
login: ['mcp', 'login', SERVER_NAME],
|
|
174
193
|
},
|
|
175
194
|
{
|
|
@@ -182,6 +201,7 @@ export const TOOLS = [
|
|
|
182
201
|
'envs: {}', 'env_keys: []', key ? `headers: { Authorization: "Bearer ${key}" }` : 'headers: {}', 'timeout: 300', 'bundled: null', 'available_tools: []',
|
|
183
202
|
] }],
|
|
184
203
|
signIn: SIGN_IN,
|
|
204
|
+
next: `start a new goose session, or restart Goose Desktop.`,
|
|
185
205
|
},
|
|
186
206
|
];
|
|
187
207
|
export const toolById = (id) => TOOLS.find((t) => t.id === id);
|
package/dist/cli.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// sekura: connect your coding tool to Sekura in one command.
|
|
3
3
|
//
|
|
4
|
-
// npx sekura@latest init
|
|
4
|
+
// npx sekura@latest init (a bare `npx sekura@latest` runs init too)
|
|
5
5
|
//
|
|
6
6
|
// Sekura's MCP server is remote (https://sekura.ai/mcp), so this package
|
|
7
7
|
// runs no server: it writes the server's address into the tools on this
|
|
8
8
|
// machine, installs the skill that teaches an agent the quote-then-confirm
|
|
9
|
-
// rule, and then finishes getting started in the terminal.
|
|
10
|
-
// on a sekura.ai page
|
|
11
|
-
//
|
|
9
|
+
// rule, and then finishes getting started in the terminal. Once the plan is
|
|
10
|
+
// agreed it signs in on a sekura.ai page (or with a code, where the browser
|
|
11
|
+
// is on another device) and gives the resulting key to each tool, so none
|
|
12
|
+
// of them asks, then helps with the Terms, the GitHub App and a repository.
|
|
12
13
|
import { Command } from 'commander';
|
|
13
14
|
import { createRequire } from 'node:module';
|
|
14
15
|
import { initCommand } from './commands/init.js';
|
|
@@ -20,9 +21,9 @@ const { version } = createRequire(import.meta.url)('../package.json');
|
|
|
20
21
|
const program = new Command();
|
|
21
22
|
program
|
|
22
23
|
.name('sekura')
|
|
23
|
-
.description(`Connect your coding tool to Sekura.\n\n npx sekura@latest init\n\nDocumentation: ${DOCS}`)
|
|
24
|
+
.description(`Connect your coding tool to Sekura.\n\n npx sekura@latest init (a bare npx sekura@latest runs init too)\n\nDocumentation: ${DOCS}`)
|
|
24
25
|
.version(version)
|
|
25
|
-
.addCommand(initCommand, { isDefault:
|
|
26
|
+
.addCommand(initCommand, { isDefault: true })
|
|
26
27
|
.addCommand(loginCommand)
|
|
27
28
|
.addCommand(statusCommand)
|
|
28
29
|
.addCommand(uninstallCommand)
|