@2cmddev/2cmd 0.0.0-stage → 0.1.2
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/.opencode/command/2cmd-audit.md +5 -0
- package/.opencode/command/2cmd-debt.md +5 -0
- package/.opencode/command/2cmd-gain.md +5 -0
- package/.opencode/command/2cmd-help.md +5 -0
- package/.opencode/command/2cmd-review.md +5 -0
- package/.opencode/command/2cmd.md +5 -0
- package/.opencode/plugins/2cmd-frontmatter.cjs +63 -0
- package/.opencode/plugins/2cmd.mjs +206 -0
- package/.opencode/plugins/index.js +4 -0
- package/.qoder/rules/2cmd.md +31 -0
- package/.qoder-plugin/plugin.json +16 -0
- package/.zcode-plugin/plugin.json +13 -0
- package/AGENTS.md +33 -0
- package/LICENSE +22 -0
- package/README.md +133 -2
- package/codex/answer.mjs +164 -0
- package/codex/data.mjs +31 -0
- package/codex/pty.py +80 -0
- package/codex/stats.mjs +105 -0
- package/codex/terminal.mjs +388 -0
- package/dsh/LICENSE +22 -0
- package/dsh/board.js +782 -0
- package/dsh/build.mjs +47 -0
- package/dsh/bundle.json +2104 -0
- package/dsh/client.js +877 -0
- package/dsh/cordis.patch.yml +3 -0
- package/dsh/index.js +185 -0
- package/dsh/ledger.js +50 -0
- package/dsh/market.js +152 -0
- package/dsh/package.json +24 -0
- package/dsh/prices.json +1812 -0
- package/dsh/settings-text.mjs +520 -0
- package/dsh/settings.js +42 -0
- package/dsh/stats.js +106 -0
- package/dsh/store.js +32 -0
- package/dsh/update-prices.mjs +9 -0
- package/dsh/update.js +27 -0
- package/dsh/voice-helper/Info.plist +13 -0
- package/dsh/voice-helper/Transcript.swift +21 -0
- package/dsh/voice-helper/build.sh +10 -0
- package/dsh/voice-helper/main.swift +70 -0
- package/dsh/voice-helper/test.swift +17 -0
- package/dsh/voice.js +63 -0
- package/hooks/2cmd-activate.js +219 -0
- package/hooks/2cmd-antigravity.js +64 -0
- package/hooks/2cmd-band-import.js +305 -0
- package/hooks/2cmd-config.js +186 -0
- package/hooks/2cmd-instructions.js +104 -0
- package/hooks/2cmd-map.js +200 -0
- package/hooks/2cmd-mode-tracker.js +248 -0
- package/hooks/2cmd-runtime.js +245 -0
- package/hooks/2cmd-statusline.ps1 +24 -0
- package/hooks/2cmd-statusline.sh +18 -0
- package/hooks/2cmd-subagent.js +100 -0
- package/hooks/band/board.ts +720 -0
- package/hooks/band/buttons.ts +60 -0
- package/hooks/band/i18n/de.ts +149 -0
- package/hooks/band/i18n/en.ts +150 -0
- package/hooks/band/i18n/es.ts +149 -0
- package/hooks/band/i18n/fr.ts +149 -0
- package/hooks/band/i18n/index.ts +42 -0
- package/hooks/band/i18n/ja.ts +149 -0
- package/hooks/band/i18n/ko.ts +149 -0
- package/hooks/band/i18n/pt.ts +149 -0
- package/hooks/band/i18n/ru.ts +149 -0
- package/hooks/band/i18n/vi.ts +149 -0
- package/hooks/band/i18n/zh-Hans.ts +149 -0
- package/hooks/band/i18n/zh-Hant.ts +149 -0
- package/hooks/band/logo.ts +3 -0
- package/hooks/band/metrics.ts +373 -0
- package/hooks/band/register.tsx +681 -0
- package/hooks/band/types.d.ts +45 -0
- package/hooks/band/windows-board.mjs +20 -0
- package/hooks/claude-band.json +6 -0
- package/hooks/claude-codex-hooks.json +41 -0
- package/hooks/codebuddy-hooks.json +20 -0
- package/hooks/copilot-hooks.json +21 -0
- package/hooks/cursor-hooks.json +17 -0
- package/hooks/qoder-hooks.json +26 -0
- package/hooks/zcode-hooks.json +26 -0
- package/package.json +56 -4
- package/pi-extension/index.js +258 -0
- package/pi-extension/names.js +19 -0
- package/pi-extension/package.json +8 -0
- package/scripts/cursor-hooks.js +145 -0
- package/scripts/uninstall.js +92 -0
- package/skills/2cmd/SKILL.md +55 -0
- package/skills/2cmd-audit/SKILL.md +105 -0
- package/skills/2cmd-debt/SKILL.md +46 -0
- package/skills/2cmd-gain/SKILL.md +53 -0
- package/skills/2cmd-help/SKILL.md +87 -0
- package/skills/2cmd-review/SKILL.md +143 -0
- package/skills/plugin.json +5 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quality audit of the whole repo: bugs, security, load, tests, speed, bloat
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Audit the whole repository (or the folder the user names) like the senior developer who just inherited it. Map first: README, deploy and build config, dependencies, entry points, tests; find the expected load (one person or many users and processes); trace the main flows and read fully the paths with user input, money, auth, data writes, background jobs and shared state. Look for, in this order: bugs, risk (security holes, data loss), scale (races, the same work done by every process, memory that only grows, a query per item, O(n^2)), risky logic without a test, slow code (big = problem, small = suggestion), lean (dead code, duplicate helpers, stdlib or native instead of custom code or a dependency, abstractions with one implementation, near-copies to merge, a function doing several unrelated jobs to split, never split by line count). Before calling code unused, grep the whole tree including tests, fixtures, config and string references. Every finding needs a concrete case. A shortcut marked with a shortcut: (or older 2cmd:) comment that names its limit is a decision, not a finding. Propose the smallest fix, prefer deleting code, never add layers. Very simple words. Start with 'What this repo does:' and the load you assumed. Then at most 20 numbered findings grouped Must fix / Should fix / Nice to have, most important first; each: a bold title with file:lines, then four bullets: What this is, Problem, Fix, If we skip it. End with 'Verdict:', 'Lean: -N lines, -M dependencies possible.' and 'Not checked:' for the parts you did not read. Change no code. Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Harvest shortcut: comments into a tracked debt ledger"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Harvest every `shortcut:` comment (and older `2cmd:` ones) in this repository into a debt ledger so deferrals do not rot into 'later means never'. Grep the whole tree for comment markers (git grep --no-index --exclude-standard -nE '(#|//|/[*]) ?(shortcut|2cmd):', skipping .git and everything .gitignore ignores; if the user names their own marker word, grep for that instead; skip hits that are not a deferral, like a keyboard-shortcut note). One row per marker, grouped by file: <file>:<line>, <what was simplified>. ceiling: <the limit named in the comment>. upgrade: <the trigger to revisit>. Tag any marker that names no upgrade path or trigger as no-trigger, those rot silently. End with the count of markers and how many lack a trigger. If none: 'No shortcut debt. Clean ledger.' Report only, change nothing. Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show 2cmd's measured impact scoreboard (less code, cost, time)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Show the 2cmd gain scoreboard. One shot, change nothing: do not switch mode, write flag files, or persist anything. Render 2Cmd's agentic benchmark (44 tasks: feature tickets in a real FastAPI + React repo, bug fixes, security and privacy cases, changes that must reach every caller and small apps; headless Claude Code, Opus 5.5, 3 runs each, against the same agent without the skill; geometric mean of per-task medians; source benchmarks/results/2026-12-04-agentic-2cmd-0.0.6.md) as plain ASCII bars, 2cmd as a share of the no-skill baseline (100%): Lines of code 36% (down 64%); Output tokens 46% (down 54%); Cost 68% (down 32%); Time 49% (down 51%); Hidden checks passed 54 of 54 (no-skill 52 of 54; 18 of the tasks have hidden checks for correctness and safety). The bar length shows the share, the label carries the exact figure. These are benchmark averages, not this repo. NEVER print a per-repo savings number: the unbuilt version was never written, so there is no real baseline to subtract from in a live repo. For real per-repo figures, point to /2cmd-debt (the counted shortcut ledger) and /2cmd-audit (what is still cuttable). Report only. Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quick reference for 2cmd levels, skills, and commands
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Show the 2cmd quick reference. One shot, change nothing: do not switch mode, write flag files, or persist anything. Levels: /2cmd hindsight (work as usual, without the rules, then suggest improvements; the user decides), /2cmd (reuse, the default ladder: YAGNI then stdlib then native then one line then minimum), /2cmd pushback (deletion before addition, challenges the requirement before building), /2cmd scout (for new features, pages and technology choices, show up to 3 outside references and wait for the user to choose; needs web search). Commands: /2cmd-review (over-engineering review of the current changes), /2cmd-audit (whole-repo over-engineering audit), /2cmd-debt (harvest shortcut: comments into a tracked ledger), /2cmd-gain (measured-impact scoreboard from the benchmark), /2cmd-help (this card). Deactivate with 'stop 2cmd', 'normal mode', or /2cmd off; resume anytime with /2cmd. Default mode is reuse; change it with the TWOCMD_DEFAULT_MODE environment variable (off|hindsight|reuse|pushback|scout) or a config file at ~/.config/2cmd/config.json (Windows: %APPDATA%\2cmd\config.json) with {"defaultMode": "hindsight"}. Resolution order: env var, then config file, then reuse. Update by running the install command from https://2cmd.dev again; turn off or remove 2Cmd with the tool's own plugin or extension command (in Claude Code, /plugin). Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quality review of the current changes: bugs, security, load, tests, speed, bloat
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Review the current code changes like the senior developer who will be paged when they break. Review what the user names (uncommitted or staged changes, a branch, a PR link, files); nothing named: the uncommitted changes, or the last commit if there are none. First read the code the change touches: callers of every changed function, the functions it calls, the tests, the README (find the expected load: one person or many users and processes). A change can break code it does not touch. Look for, in this order: bugs (wrong result, crash, missed edge case, a caller broken by the change, a fix in one caller while the shared function stays broken), risk (security holes, data loss), scale (check-then-write races, the same work done by every process, memory that only grows, a query per item, O(n^2) on big input), risky logic without a test, slow code (big = problem, small = suggestion), lean (dead code, a helper the repo already has, stdlib or native instead of custom code or a new dependency, abstractions with one implementation, near-copies to merge, a function doing several unrelated jobs to split, never split by line count). Every finding needs a concrete case; re-read the lines to confirm it. A shortcut marked with a shortcut: (or older 2cmd:) comment that names its limit is a decision, not a finding. Propose the smallest fix, prefer deleting code, never add layers. No style taste, no vague worries. Very simple words, explain technical terms. Start with 'What this change does:' in two or three sentences and the load you assumed. Then numbered findings grouped Must fix / Should fix / Nice to have; each finding: a bold title with file:lines, then four bullets: What this is, Problem, Fix, If we skip it (one or two short sentences each). End with 'Verdict:', 'Lean: -N lines possible.' when lean findings exist, and 'Not checked:' if something mattered and you could not check it. Nothing found: 'Looks good. Ship.' Change no code. Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Switch 2cmd intensity level (hindsight/reuse/pushback/scout/off)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Switch to 2cmd $ARGUMENTS mode. With no level, keep the current level, or switch on at the default level if 2cmd was off. Lazy senior dev mode, before any code: does it need to exist at all (YAGNI)? Does the standard library do it? A native platform feature? Can it be one line? Build the minimum that works. No unrequested abstractions, no avoidable dependencies, no boilerplate. Mark deliberate simplifications that cut a real corner with a known ceiling using a shortcut: comment that names the ceiling and upgrade path. For hindsight, ignore the rules above and follow only this: Do not use the other rules of this skill, including any loaded earlier in this session. Do the task the way you would without this skill. When it is done, briefly list improvements worth making and any leaner option. Do not apply them: the user decides. If nothing is worth changing, say nothing. Subagents only do the task and make no suggestions. Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// 2cmd command-file and SKILL.md frontmatter parser.
|
|
4
|
+
//
|
|
5
|
+
// Pulled out of 2cmd.mjs so the plugin module's only top-level export is
|
|
6
|
+
// the plugin definition itself. OpenCode's legacy plugin loader (the one that
|
|
7
|
+
// runs before v1 plugins are detected) treats every function exported from a
|
|
8
|
+
// plugin module as a plugin; calling the frontmatter parser as one threw
|
|
9
|
+
// "path must be a string or a file descriptor" because it got the plugin
|
|
10
|
+
// context object as its first argument. Keeping the parser in its own module
|
|
11
|
+
// leaves exactly one plugin-shaped export on 2cmd.mjs.
|
|
12
|
+
|
|
13
|
+
function parseCommandFile(filePath) {
|
|
14
|
+
const fs = require('fs');
|
|
15
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
16
|
+
// Tolerate CRLF: a Windows checkout (autocrlf) delivers \r\n, npm ships \n.
|
|
17
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);
|
|
18
|
+
if (!match) return null;
|
|
19
|
+
const description = match[1].match(/description:\s*(.+)/)?.[1]?.trim();
|
|
20
|
+
return { description, template: match[2].trim() };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 2cmd: flat frontmatter only — the shape every shipped SKILL.md uses. A
|
|
24
|
+
// nested key or an anchor is not interpreted, and a real YAML parser is the
|
|
25
|
+
// upgrade path if a skill ever needs one.
|
|
26
|
+
function frontmatterField(frontmatter, key) {
|
|
27
|
+
const lines = frontmatter.split(/\r?\n/);
|
|
28
|
+
const at = lines.findIndex((line) => line.startsWith(key + ':'));
|
|
29
|
+
if (at === -1) return undefined;
|
|
30
|
+
const value = lines[at].slice(key.length + 1).trim();
|
|
31
|
+
if (value[0] !== '>' && value[0] !== '|') return value;
|
|
32
|
+
|
|
33
|
+
// Block scalar: `>` folds the lines into one, `|` keeps them. Indented lines
|
|
34
|
+
// continue the block, the next unindented key ends it (skills/2cmd has
|
|
35
|
+
// `argument-hint` after its description), and a trailing `-` drops the
|
|
36
|
+
// newline YAML would otherwise close the scalar with.
|
|
37
|
+
const block = [];
|
|
38
|
+
for (const line of lines.slice(at + 1)) {
|
|
39
|
+
if (line.trim() && !/^\s/.test(line)) break;
|
|
40
|
+
block.push(line.trim());
|
|
41
|
+
}
|
|
42
|
+
while (block.length && !block[block.length - 1]) block.pop();
|
|
43
|
+
const joined = block.join(value[0] === '|' ? '\n' : ' ');
|
|
44
|
+
return value.endsWith('-') ? joined : joined + '\n';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// OpenCode's V2 skill transform takes the resolved fields, not the file: the
|
|
48
|
+
// skill id is the directory name, and `content` is the body with its
|
|
49
|
+
// frontmatter stripped. Matches what OpenCode itself derives from a discovered
|
|
50
|
+
// .opencode/skills/<id>/SKILL.md.
|
|
51
|
+
function parseSkillFile(filePath) {
|
|
52
|
+
const fs = require('fs');
|
|
53
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
54
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---[^\S\n]*\r?\n?([\s\S]*)$/);
|
|
55
|
+
if (!match) return null;
|
|
56
|
+
return {
|
|
57
|
+
name: frontmatterField(match[1], 'name'),
|
|
58
|
+
description: frontmatterField(match[1], 'description'),
|
|
59
|
+
body: match[2],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
module.exports = { parseCommandFile, parseSkillFile };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// 2cmd — OpenCode plugin.
|
|
2
|
+
//
|
|
3
|
+
// Injects the 2cmd ruleset into every chat's system prompt at the active
|
|
4
|
+
// intensity, persists /2cmd mode switches, and registers the /2cmd
|
|
5
|
+
// commands and skills so they work when the package is installed from npm.
|
|
6
|
+
// Reuses the shared instruction builder so Claude Code, Codex, pi, and OpenCode
|
|
7
|
+
// all read one source of truth.
|
|
8
|
+
//
|
|
9
|
+
// OpenCode loads this as a server plugin — add it to your opencode.json:
|
|
10
|
+
// { "plugins": ["@2cmddev/2cmd"] }
|
|
11
|
+
//
|
|
12
|
+
// One default export serves both plugin APIs: V2 reads `id` + `setup`, V1 calls
|
|
13
|
+
// `server()`.
|
|
14
|
+
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
import fs from 'node:fs';
|
|
17
|
+
import os from 'node:os';
|
|
18
|
+
import path from 'node:path';
|
|
19
|
+
import { fileURLToPath } from 'node:url';
|
|
20
|
+
|
|
21
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
22
|
+
|
|
23
|
+
// The shared instruction builder is CommonJS; bridge to it from this ES module.
|
|
24
|
+
const require = createRequire(import.meta.url);
|
|
25
|
+
const { get2CmdInstructions } = require('../../hooks/2cmd-instructions');
|
|
26
|
+
const { getDefaultMode, normalizeMode, writeDefaultMode } = require('../../hooks/2cmd-config');
|
|
27
|
+
const { parseCommandFile, parseSkillFile } = require('./2cmd-frontmatter.cjs');
|
|
28
|
+
|
|
29
|
+
// OpenCode has no flag-file convention of its own; keep mode beside its config.
|
|
30
|
+
// Shared with the V1 path, so a level set under either API is read by both.
|
|
31
|
+
const statePath = path.join(
|
|
32
|
+
process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'),
|
|
33
|
+
'opencode',
|
|
34
|
+
'.2cmd-active',
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
function readMode() {
|
|
38
|
+
try {
|
|
39
|
+
// review is a one-shot command, never a level (#736); an old saved review falls back.
|
|
40
|
+
return normalizeMode(fs.readFileSync(statePath, 'utf8')) || getDefaultMode();
|
|
41
|
+
} catch (e) {
|
|
42
|
+
return getDefaultMode();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function writeMode(mode) {
|
|
47
|
+
fs.mkdirSync(path.dirname(statePath), { recursive: true });
|
|
48
|
+
fs.writeFileSync(statePath, mode);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// `off` is persisted like any mode; the injection reads it and stays silent.
|
|
52
|
+
// An unrecognized level leaves the current one alone. The write lands before
|
|
53
|
+
// the next turn's injection, not the current one — good enough; switch to a
|
|
54
|
+
// synchronous store if same-turn switching ever matters.
|
|
55
|
+
function persistMode(args) {
|
|
56
|
+
const wanted = String(args == null ? '' : args).trim();
|
|
57
|
+
// `/2cmd default <level>` saves the default for new sessions, like the Claude hook.
|
|
58
|
+
const [first, second] = wanted.toLowerCase().split(/\s+/);
|
|
59
|
+
if (first === 'default') {
|
|
60
|
+
const saved = writeDefaultMode(second);
|
|
61
|
+
if (saved) console.log('2cmd default ' + saved);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Bare /2cmd switches 2cmd on, or keeps the level when it already is (#639).
|
|
65
|
+
if (!wanted && readMode() !== 'off') return;
|
|
66
|
+
const mode = wanted ? normalizeMode(wanted) : (getDefaultMode() === 'off' ? 'reuse' : getDefaultMode());
|
|
67
|
+
if (!mode) return;
|
|
68
|
+
writeMode(mode);
|
|
69
|
+
console.log('2cmd ' + mode);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// V2 has no `config` hook: the domains that own these definitions own them now,
|
|
73
|
+
// so the command and skill files are read once here and handed to the
|
|
74
|
+
// transforms that register them.
|
|
75
|
+
function readCommands() {
|
|
76
|
+
const dir = path.join(__dirname, '..', 'command');
|
|
77
|
+
try {
|
|
78
|
+
return fs.readdirSync(dir)
|
|
79
|
+
.filter((file) => file.endsWith('.md'))
|
|
80
|
+
.map((file) => {
|
|
81
|
+
const parsed = parseCommandFile(path.join(dir, file));
|
|
82
|
+
return parsed && { name: path.basename(file, '.md'), ...parsed };
|
|
83
|
+
})
|
|
84
|
+
.filter(Boolean);
|
|
85
|
+
} catch (e) {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function readSkills() {
|
|
91
|
+
const dir = path.resolve(__dirname, '../../skills');
|
|
92
|
+
try {
|
|
93
|
+
return fs.readdirSync(dir, { withFileTypes: true })
|
|
94
|
+
.filter((entry) => entry.isDirectory())
|
|
95
|
+
.map((entry) => {
|
|
96
|
+
const file = path.join(dir, entry.name, 'SKILL.md');
|
|
97
|
+
const parsed = parseSkillFile(file);
|
|
98
|
+
return parsed && {
|
|
99
|
+
id: entry.name,
|
|
100
|
+
name: parsed.name || entry.name,
|
|
101
|
+
description: parsed.description,
|
|
102
|
+
path: file,
|
|
103
|
+
content: parsed.body,
|
|
104
|
+
};
|
|
105
|
+
})
|
|
106
|
+
.filter(Boolean);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Templates without $ARGUMENTS would drop what the user typed after the
|
|
113
|
+
// command (/2cmd-review feature/login), so append it instead.
|
|
114
|
+
function withArguments(template, input) {
|
|
115
|
+
const text = String(input == null ? '' : input);
|
|
116
|
+
if (template.includes('$ARGUMENTS')) return template.replaceAll('$ARGUMENTS', text);
|
|
117
|
+
return text.trim() ? template + '\n\n' + text.trim() : template;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export default {
|
|
121
|
+
id: '2cmd',
|
|
122
|
+
|
|
123
|
+
async setup(ctx) {
|
|
124
|
+
const commands = readCommands();
|
|
125
|
+
const skills = readSkills();
|
|
126
|
+
|
|
127
|
+
await ctx.skill.transform((editor) => {
|
|
128
|
+
for (const skill of skills) editor.add(skill);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
await ctx.command.transform((editor) => {
|
|
132
|
+
for (const command of commands) {
|
|
133
|
+
editor.add({
|
|
134
|
+
name: command.name,
|
|
135
|
+
description: command.description,
|
|
136
|
+
execute: async ({ sessionID, prompt, delivery }) => {
|
|
137
|
+
if (command.name === '2cmd') persistMode(prompt.text);
|
|
138
|
+
const withoutMentions = (items) => items?.map(({ mention, ...item }) => item);
|
|
139
|
+
await ctx.session.prompt({
|
|
140
|
+
...prompt,
|
|
141
|
+
sessionID,
|
|
142
|
+
text: withArguments(command.template, prompt.text),
|
|
143
|
+
files: withoutMentions(prompt.files),
|
|
144
|
+
agents: withoutMentions(prompt.agents),
|
|
145
|
+
skills: withoutMentions(prompt.skills),
|
|
146
|
+
delivery,
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// Append the ruleset to the system prompt every turn. V2 hands over owned
|
|
154
|
+
// system parts, so push one instead of rewriting the tail of another.
|
|
155
|
+
// Summary compaction runs its own hook with the same event shape; without
|
|
156
|
+
// it the compaction request misses the ruleset and the provider prompt cache.
|
|
157
|
+
const addRuleset = (event) => {
|
|
158
|
+
const mode = readMode();
|
|
159
|
+
if (mode === 'off') return;
|
|
160
|
+
event.system.push({ type: 'text', text: get2CmdInstructions(mode) });
|
|
161
|
+
};
|
|
162
|
+
await ctx.session.hook('context', addRuleset);
|
|
163
|
+
await ctx.session.hook('compaction', addRuleset);
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
// OpenCode V1: same three behaviors, as hooks on the V1 hook names.
|
|
167
|
+
async server({ client } = {}) {
|
|
168
|
+
const log = (level, message) => {
|
|
169
|
+
try { client && client.app && client.app.log({ body: { service: '2cmd', level, message } }); } catch (e) {}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
// Register slash commands + skills directory.
|
|
174
|
+
config: async (config) => {
|
|
175
|
+
if (!config.command) config.command = {};
|
|
176
|
+
for (const command of readCommands()) {
|
|
177
|
+
config.command[command.name] = { description: command.description, template: command.template };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
config.skills = config.skills || {};
|
|
181
|
+
config.skills.paths = config.skills.paths || [];
|
|
182
|
+
const twoCmdSkillsDir = path.resolve(__dirname, '../../skills');
|
|
183
|
+
if (!config.skills.paths.includes(twoCmdSkillsDir)) {
|
|
184
|
+
config.skills.paths.push(twoCmdSkillsDir);
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
'experimental.chat.system.transform': async (_input, output) => {
|
|
189
|
+
const mode = readMode();
|
|
190
|
+
if (mode === 'off') return;
|
|
191
|
+
const instructions = get2CmdInstructions(mode);
|
|
192
|
+
if (output.system.length > 0) {
|
|
193
|
+
output.system[output.system.length - 1] += '\n\n' + instructions;
|
|
194
|
+
} else {
|
|
195
|
+
output.system.push(instructions);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
'command.execute.before': async (input) => {
|
|
200
|
+
if (!input || input.command !== '2cmd') return;
|
|
201
|
+
persistMode(input.arguments);
|
|
202
|
+
log('info', '2cmd ' + readMode());
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 2Cmd, lazy senior dev mode
|
|
2
|
+
|
|
3
|
+
You are a lazy senior developer. The best code is the code never written. You solve the whole problem with the least new code. End your reply with one or two lines: what you skipped or did not check, and any risk the user must know.
|
|
4
|
+
|
|
5
|
+
Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
6
|
+
|
|
7
|
+
## Before you write
|
|
8
|
+
|
|
9
|
+
Read the task and the code it touches. List every place your change must reach: callers, tests, fixtures, config, exports. Check what your change could break for users: data it would destroy or expose, callers that stop working. That is scope. Extra features are not.
|
|
10
|
+
|
|
11
|
+
If the session start gave a snapshot (Git, Checks, Top level, codebase map), use it instead of running `ls` or `git status` again. Reads, searches and checks that do not depend on each other go in one turn; checks that write the same files or use the same port run one after another.
|
|
12
|
+
|
|
13
|
+
## The smallest complete change
|
|
14
|
+
|
|
15
|
+
Take the first option that fully works:
|
|
16
|
+
|
|
17
|
+
1. Does it need to exist? Skip features, options and flexibility nobody asked for, and name them in one line. A vague request ("build me X") gets the smallest version that does the core job.
|
|
18
|
+
2. Already in this codebase (a helper, component, service, pattern)? Use it the way the surrounding code does.
|
|
19
|
+
3. Standard library or a platform feature? Use it, unless the project has its own. A house component beats a native widget.
|
|
20
|
+
4. An installed dependency? Use it. Never add a dependency for a few lines.
|
|
21
|
+
5. Can it be one line a reader gets at a glance? One line.
|
|
22
|
+
6. Otherwise: the minimum code that works.
|
|
23
|
+
|
|
24
|
+
- No abstraction, wrapper, type conversion, option, config, boilerplate or "for later" code nobody asked for. Keep values in the form the platform already gives you. Deletion beats addition. Keep the structure the codebase already has: its layers, interfaces and conventions.
|
|
25
|
+
- The shortest working diff wins, once you know everything it must touch. A one-liner that needs decoding is not short.
|
|
26
|
+
- Comment only the why the code cannot show, in one line.
|
|
27
|
+
- Lazy code without its check is unfinished: new non-trivial logic (a branch, a loop, a parser, money or security, or a whole new script or app) leaves one small test or an assert-based self-check. Trivial changes need none.
|
|
28
|
+
- A shortcut with a known limit gets a code comment in this form: `shortcut: <the limit>, <when to upgrade>`.
|
|
29
|
+
- A subagent may not see these rules: when you hand it coding work, put them in its brief: the smallest complete change, reuse what the codebase has, nothing nobody asked for.
|
|
30
|
+
|
|
31
|
+
Never cut: validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs, anything the user asked for.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "2cmd",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "2cmddev",
|
|
7
|
+
"url": "https://github.com/2cmddev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/2cmddev/2Cmd",
|
|
10
|
+
"repository": "https://github.com/2cmddev/2Cmd",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": ["yagni", "minimalism", "code-review", "productivity"],
|
|
13
|
+
"skills": "./skills/",
|
|
14
|
+
"rules": "./.qoder/rules/",
|
|
15
|
+
"hooks": "./hooks/qoder-hooks.json"
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "2cmd",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "2Cmd: less unnecessary code, reuse first. 让 AI 少写多余代码,优先复用。",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "2cmddev",
|
|
7
|
+
"url": "https://github.com/2cmddev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/2cmddev/2Cmd",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"skills": "./skills/",
|
|
12
|
+
"hooks": "./hooks/zcode-hooks.json"
|
|
13
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 2Cmd, lazy senior dev mode
|
|
2
|
+
|
|
3
|
+
You are a lazy senior developer. The best code is the code never written. You solve the whole problem with the least new code. End your reply with one or two lines: what you skipped or did not check, and any risk the user must know.
|
|
4
|
+
|
|
5
|
+
Reply in the user's language, including reports and their headings. Keep code, commands and file names as they are.
|
|
6
|
+
|
|
7
|
+
## Before you write
|
|
8
|
+
|
|
9
|
+
Read the task and the code it touches. List every place your change must reach: callers, tests, fixtures, config, exports. Check what your change could break for users: data it would destroy or expose, callers that stop working. That is scope. Extra features are not.
|
|
10
|
+
|
|
11
|
+
If the session start gave a snapshot (Git, Checks, Top level, codebase map), use it instead of running `ls` or `git status` again. Reads, searches and checks that do not depend on each other go in one turn; checks that write the same files or use the same port run one after another.
|
|
12
|
+
|
|
13
|
+
## The smallest complete change
|
|
14
|
+
|
|
15
|
+
Take the first option that fully works:
|
|
16
|
+
|
|
17
|
+
1. Does it need to exist? Skip features, options and flexibility nobody asked for, and name them in one line. A vague request ("build me X") gets the smallest version that does the core job.
|
|
18
|
+
2. Already in this codebase (a helper, component, service, pattern)? Use it the way the surrounding code does.
|
|
19
|
+
3. Standard library or a platform feature? Use it, unless the project has its own. A house component beats a native widget.
|
|
20
|
+
4. An installed dependency? Use it. Never add a dependency for a few lines.
|
|
21
|
+
5. Can it be one line a reader gets at a glance? One line.
|
|
22
|
+
6. Otherwise: the minimum code that works.
|
|
23
|
+
|
|
24
|
+
- No abstraction, wrapper, type conversion, option, config, boilerplate or "for later" code nobody asked for. Keep values in the form the platform already gives you. Deletion beats addition. Keep the structure the codebase already has: its layers, interfaces and conventions.
|
|
25
|
+
- The shortest working diff wins, once you know everything it must touch. A one-liner that needs decoding is not short.
|
|
26
|
+
- Comment only the why the code cannot show, in one line.
|
|
27
|
+
- Lazy code without its check is unfinished: new non-trivial logic (a branch, a loop, a parser, money or security, or a whole new script or app) leaves one small test or an assert-based self-check. Trivial changes need none.
|
|
28
|
+
- A shortcut with a known limit gets a code comment in this form: `shortcut: <the limit>, <when to upgrade>`.
|
|
29
|
+
- A subagent may not see these rules: when you hand it coding work, put them in its brief: the smallest complete change, reuse what the codebase has, nothing nobody asked for.
|
|
30
|
+
|
|
31
|
+
Never cut: validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs, anything the user asked for.
|
|
32
|
+
|
|
33
|
+
(Yes, this file also applies to agents working on the 2cmd repo itself. Especially to them.)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DietrichGebert
|
|
4
|
+
Copyright (c) 2026 2Cmd contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,134 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- Built by site/build.js from site/texts/ and site/support.js. Edit those, then run: node site/build.js -->
|
|
2
|
+
<p align="center"><img src="assets/icon.svg" width="120" alt="2Cmd"></p>
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
<h1 align="center">2Cmd</h1>
|
|
5
|
+
|
|
6
|
+
<p align="center"><b>Your AI writes 64% less code and costs 32% less, with the same correct result.</b></p>
|
|
7
|
+
|
|
8
|
+
<p align="center">2Cmd means “second command console”.A second console right above your message box.</p>
|
|
9
|
+
|
|
10
|
+
<div align="center">
|
|
11
|
+
<table>
|
|
12
|
+
<tr>
|
|
13
|
+
<td align="center"><b>−64%</b><br><sub>Lines of code</sub></td>
|
|
14
|
+
<td align="center"><b>−32%</b><br><sub>Cost</sub></td>
|
|
15
|
+
<td align="center"><b>−54%</b><br><sub>Output tokens</sub></td>
|
|
16
|
+
<td align="center"><b>−51%</b><br><sub>Time</sub></td>
|
|
17
|
+
</tr>
|
|
18
|
+
</table>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<p align="center"><a href="https://2cmd.dev">2cmd.dev</a></p>
|
|
22
|
+
|
|
23
|
+
<p align="center"><b>English</b> · <a href="docs/i18n/README.zh-CN.md">简体中文</a> · <a href="docs/i18n/README.zh-Hant.md">繁體中文</a> · <a href="docs/i18n/README.ja.md">日本語</a> · <a href="docs/i18n/README.ko.md">한국어</a> · <a href="docs/i18n/README.es.md">Español</a> · <a href="docs/i18n/README.pt.md">Português</a> · <a href="docs/i18n/README.de.md">Deutsch</a> · <a href="docs/i18n/README.fr.md">Français</a> · <a href="docs/i18n/README.ru.md">Русский</a> · <a href="docs/i18n/README.vi.md">Tiếng Việt</a></p>
|
|
24
|
+
|
|
25
|
+
<p align="center"><img src="assets/screenshot-en.png" width="800" alt="2Cmd"></p>
|
|
26
|
+
|
|
27
|
+
<h3 align="center">Works with</h3>
|
|
28
|
+
|
|
29
|
+
<div align="center">
|
|
30
|
+
<table>
|
|
31
|
+
<tr>
|
|
32
|
+
<td align="center"><b>Desktop</b></td>
|
|
33
|
+
<td align="center"><a href="INSTALL.md#claude-code"><img src="assets/tools/claude-desktop.svg" width="36" height="36" alt=""><br><sub>Claude</sub></a></td>
|
|
34
|
+
<td align="center"><a href="INSTALL.md#codex"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tools/codex-dark.svg"><img src="assets/tools/codex.svg" width="36" height="36" alt=""></picture><br><sub>Codex</sub></a></td>
|
|
35
|
+
<td align="center"><a href="INSTALL.md#zcode"><img src="assets/tools/zcode.svg" width="36" height="36" alt=""><br><sub>ZCode</sub></a></td>
|
|
36
|
+
<td align="center"><a href="INSTALL.md#deepseek-harness-dsh"><img src="assets/tools/dsh.svg" width="36" height="36" alt=""><br><sub>DeepSeek Harness</sub></a></td>
|
|
37
|
+
<td align="center"><a href="INSTALL.md#antigravity"><img src="assets/tools/antigravity.svg" width="36" height="36" alt=""><br><sub>Antigravity</sub></a></td>
|
|
38
|
+
<td align="center"><a href="INSTALL.md#workbuddy"><img src="assets/tools/workbuddy.svg" width="36" height="36" alt=""><br><sub>WorkBuddy</sub></a></td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td align="center"><b>ADE</b></td>
|
|
42
|
+
<td align="center"><a href="INSTALL.md#orca"><img src="assets/tools/orca.svg" width="36" height="36" alt=""><br><sub>Orca</sub></a></td>
|
|
43
|
+
<td align="center"><a href="INSTALL.md#t3-code"><img src="assets/tools/t3.svg" width="36" height="36" alt=""><br><sub>T3 Code</sub></a></td>
|
|
44
|
+
<td align="center"><a href="INSTALL.md#paseo"><img src="assets/tools/paseo.svg" width="36" height="36" alt=""><br><sub>Paseo</sub></a></td>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr>
|
|
47
|
+
<td align="center"><b>CLI</b></td>
|
|
48
|
+
<td align="center"><a href="INSTALL.md#claude-code"><img src="assets/tools/claude-code.svg" width="36" height="36" alt=""><br><sub>Claude Code</sub></a></td>
|
|
49
|
+
<td align="center"><a href="INSTALL.md#codex"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tools/codex-dark.svg"><img src="assets/tools/codex.svg" width="36" height="36" alt=""></picture><br><sub>Codex CLI</sub></a></td>
|
|
50
|
+
<td align="center"><a href="INSTALL.md" title="Copilot CLI, Gemini CLI, OpenCode, Cursor, Kimi Code">…</a></td>
|
|
51
|
+
</tr>
|
|
52
|
+
</table>
|
|
53
|
+
<sub><a href="INSTALL.md">20-odd more →</a></sub>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
2Cmd is a free, open-source plugin for Claude Code, Codex, ZCode, DeepSeek Harness and 20-odd AI coding tools. Four modes make the AI reuse your project's own code: 64% less code, 54% fewer output tokens, 32% lower cost, every hidden check passed.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
**Claude Code** <sub>send the two commands separately</sub>
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/plugin marketplace add 2cmddev/2Cmd
|
|
64
|
+
/plugin install 2cmd@2cmd
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Codex**
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
codex plugin marketplace add 2cmddev/2Cmd
|
|
71
|
+
codex plugin add 2cmd@2cmd
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
[Full install guide →](INSTALL.md)
|
|
75
|
+
|
|
76
|
+
## Four modes
|
|
77
|
+
|
|
78
|
+
| Mode | Command | What it does |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| **Hindsight** | `/2cmd hindsight` | Does the work, then suggests improvements |
|
|
81
|
+
| **Reuse First** (default) | `/2cmd reuse` | Reuses what the project has; new code only when needed |
|
|
82
|
+
| **Pushback** | `/2cmd pushback` | Questions needless work first, then builds |
|
|
83
|
+
| **Scout** | `/2cmd scout` | Finds outside references for you to pick (needs web search) |
|
|
84
|
+
|
|
85
|
+
`/2cmd off` turns it off · `/2cmd-review` reviews a change; add fix, commit or push to go on (the panel's Fix · Commit · Push buttons put these in the box) · `/2cmd-audit` reviews the whole project
|
|
86
|
+
|
|
87
|
+
## One example
|
|
88
|
+
|
|
89
|
+
> Add a date picker component to the frontend.
|
|
90
|
+
|
|
91
|
+
| No plugin | 2Cmd |
|
|
92
|
+
|---|---|
|
|
93
|
+
| 6 files, 569 lines: a hand-drawn calendar, a popover and a new dependency | **1 file, 10 lines: the project's own `Input` and the browser's date input** |
|
|
94
|
+
|
|
95
|
+
[More examples →](docs/showcase.md)
|
|
96
|
+
|
|
97
|
+
## Supported tools
|
|
98
|
+
|
|
99
|
+
Tools with a panel show it above the message box; the others get the four modes and the review commands.
|
|
100
|
+
|
|
101
|
+
| Tool | Add | Use | Support |
|
|
102
|
+
|---|---|---|---|
|
|
103
|
+
| <img src="assets/tools/claude-desktop.svg" width="20" height="20" alt=""> [Claude](INSTALL.md#claude-code) <sub>Desktop</sub> | `/plugin install` | Panel · /2cmd | Enhanced panel |
|
|
104
|
+
| <img src="assets/tools/claude-code.svg" width="20" height="20" alt=""> [Claude Code](INSTALL.md#claude-code) <sub>CLI</sub> | `/plugin install` | Panel · /2cmd | Enhanced panel |
|
|
105
|
+
| <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tools/codex-dark.svg"><img src="assets/tools/codex.svg" width="20" height="20" alt=""></picture> [Codex](INSTALL.md#codex) <sub>Desktop</sub> | `codex plugin add` | /2cmd · enhanced panel | Enhanced panel |
|
|
106
|
+
| <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tools/codex-dark.svg"><img src="assets/tools/codex.svg" width="20" height="20" alt=""></picture> [Codex CLI](INSTALL.md#codex) <sub>CLI</sub> | `codex plugin add` | /2cmd · enhanced panel | Enhanced panel |
|
|
107
|
+
| <img src="assets/tools/zcode.svg" width="20" height="20" alt=""> [ZCode](INSTALL.md#zcode) <sub>Desktop</sub> | Plugins → Add marketplace | /2cmd · enhanced panel | Enhanced panel |
|
|
108
|
+
| <img src="assets/tools/dsh.svg" width="20" height="20" alt=""> [DeepSeek Harness](INSTALL.md#deepseek-harness-dsh) <sub>Desktop</sub> | `dsh plugin add` | Panel · /2cmd | Enhanced panel |
|
|
109
|
+
| <img src="assets/tools/orca.svg" width="20" height="20" alt=""> [Orca](INSTALL.md#orca) <sub>ADE</sub> | Clone the repo, then run its launcher | /2cmd · enhanced panel | Enhanced panel |
|
|
110
|
+
| <img src="assets/tools/t3.svg" width="20" height="20" alt=""> [T3 Code](INSTALL.md#t3-code) <sub>ADE</sub> | Clone the repo, then run its launcher | /2cmd · enhanced panel | Enhanced panel |
|
|
111
|
+
| <img src="assets/tools/paseo.svg" width="20" height="20" alt=""> [Paseo](INSTALL.md#paseo) <sub>ADE</sub> | `paseo plugin install` | Panel · /2cmd | Enhanced panel |
|
|
112
|
+
| <img src="assets/tools/antigravity.svg" width="20" height="20" alt=""> [Antigravity](INSTALL.md#antigravity) <sub>Desktop</sub> | `agy plugin install` | /2cmd · enhanced panel | Enhanced panel |
|
|
113
|
+
| <img src="assets/tools/workbuddy.svg" width="20" height="20" alt=""> [WorkBuddy](INSTALL.md#workbuddy) <sub>Desktop</sub> | Skills → Bundles → + | /2cmd · enhanced panel | Enhanced panel |
|
|
114
|
+
| <img src="assets/tools/copilot.svg" width="20" height="20" alt=""> <img src="assets/tools/gemini.svg" width="20" height="20" alt=""> <img src="assets/tools/opencode.svg" width="20" height="20" alt=""> <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tools/cursor-dark.svg"><img src="assets/tools/cursor.svg" width="20" height="20" alt=""></picture> <img src="assets/tools/kimi.svg" width="20" height="20" alt=""> [20-odd more](INSTALL.md)<br><sub>Copilot CLI, Gemini CLI, OpenCode, Cursor, Kimi Code and others</sub> | Each in its own way: see the install guide | /2cmd | Commands |
|
|
115
|
+
|
|
116
|
+
[Full install guide →](INSTALL.md)
|
|
117
|
+
|
|
118
|
+
## Measured
|
|
119
|
+
|
|
120
|
+
| Measure | 2Cmd vs no plugin |
|
|
121
|
+
|---|--:|
|
|
122
|
+
| Lines of code | **−64%** |
|
|
123
|
+
| Cost | **−32%** |
|
|
124
|
+
| Output tokens | **−54%** |
|
|
125
|
+
| Time | **−51%** |
|
|
126
|
+
| Correct & safe | **+4%** |
|
|
127
|
+
|
|
128
|
+
Same model, 44 tasks, against no plugin. Hidden checks: 2Cmd passed all of them in each of the three runs; no plugin passed 96%, 100% and 96%. [See the tests →](docs/showcase.md)
|
|
129
|
+
|
|
130
|
+
## Credits
|
|
131
|
+
|
|
132
|
+
2Cmd began as our own tuning of [Ponytail](https://github.com/DietrichGebert/ponytail). After deep changes, support for more desktop apps, more languages and a better workflow, it became its own brand. Thanks to its author! Ponytail is by DietrichGebert under the MIT license; its copyright notice is kept in [LICENSE](LICENSE).
|
|
133
|
+
|
|
134
|
+
[MIT](LICENSE)
|