@aman_asmuei/aman 0.4.0 → 0.5.1
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 +80 -0
- package/dist/index.js +75 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,8 +92,13 @@ Each package works independently. `aman` is the front door.
|
|
|
92
92
|
| `aman` | First run: setup. After that: show status |
|
|
93
93
|
| `aman setup` | Set up the full ecosystem |
|
|
94
94
|
| `aman status` | View ecosystem status (all layers) |
|
|
95
|
+
| `aman here` | Write a project context card (`.acore/context.md`) for the current directory |
|
|
95
96
|
| `aman deploy` | Deploy your AI anywhere (Docker, Ollama, systemd) |
|
|
96
97
|
|
|
98
|
+
### `aman here` — project context cards
|
|
99
|
+
|
|
100
|
+
Run `aman here` in any repo to create a `.acore/context.md` with the detected stack and today's date. The file is read by [aman-claude-code](https://github.com/amanasmuei/aman-claude-code) on every session start and embedded into [aman-copilot](https://github.com/amanasmuei/aman-copilot)'s `copilot-instructions.md` at `init` time — so both surfaces know which project you're in. Use `--force` to overwrite an existing card non-interactively.
|
|
101
|
+
|
|
97
102
|
After setup, use the individual CLIs for detailed management:
|
|
98
103
|
|
|
99
104
|
```bash
|
|
@@ -219,6 +224,81 @@ https://amanasmuei.github.io/acore/
|
|
|
219
224
|
|
|
220
225
|
ChatGPT, Claude, Claude Code, Cursor, Windsurf, Gemini, Ollama, and any AI that accepts a system prompt.
|
|
221
226
|
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Full install (all surfaces)
|
|
230
|
+
|
|
231
|
+
The one-command setup creates your global ecosystem. To light up every surface:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# 1. Ecosystem (identity + rules + eval)
|
|
235
|
+
npx @aman_asmuei/aman@latest
|
|
236
|
+
|
|
237
|
+
# 2. Persistent memory (MCP) — required for cross-surface memory sync
|
|
238
|
+
npx @aman_asmuei/amem
|
|
239
|
+
|
|
240
|
+
# 3a. Claude Code — plugin + live MCP tools
|
|
241
|
+
claude plugin marketplace add amanasmuei/aman-claude-code
|
|
242
|
+
claude plugin install aman-claude-code@aman
|
|
243
|
+
# Plugin auto-installs the MCP tools on first session start. To install manually:
|
|
244
|
+
# node ~/.claude/plugins/cache/aman/aman-claude-code/*/bin/install-mcp.mjs
|
|
245
|
+
|
|
246
|
+
# 3b. VS Code Copilot Chat — per project
|
|
247
|
+
cd /path/to/your/project
|
|
248
|
+
npx @aman_asmuei/aman-copilot init
|
|
249
|
+
npx @aman_asmuei/aman-copilot install-mcp --all
|
|
250
|
+
# Then: reload VS Code window, switch Copilot Chat to Agent mode
|
|
251
|
+
|
|
252
|
+
# 4. Per-project context card (optional, per repo)
|
|
253
|
+
cd /path/to/your/project
|
|
254
|
+
npx @aman_asmuei/aman here
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Every step is idempotent — safe to re-run. The plugin + copilot auto-load identity/rules/memory from the global ecosystem; you only need to personalise once.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Uninstall / reset
|
|
262
|
+
|
|
263
|
+
### Soft reset — keep packages, wipe content, re-run setup
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
rm -rf ~/.acore ~/.arules ~/.aeval
|
|
267
|
+
npx @aman_asmuei/aman@latest
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Useful when your identity drifts and you want a clean slate without fully uninstalling.
|
|
271
|
+
|
|
272
|
+
### Full uninstall — nothing aman-related on disk
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# 1. Global ecosystem data
|
|
276
|
+
rm -rf ~/.acore ~/.arules ~/.aeval ~/.aflow ~/.akit ~/.askill ~/.amem
|
|
277
|
+
|
|
278
|
+
# 2. Claude Code plugin + MCP entry
|
|
279
|
+
claude plugin uninstall aman-claude-code@aman
|
|
280
|
+
claude plugin marketplace remove aman
|
|
281
|
+
claude mcp remove aman 2>/dev/null || true
|
|
282
|
+
|
|
283
|
+
# 3. VS Code + Copilot CLI MCP entries
|
|
284
|
+
npx @aman_asmuei/aman-copilot uninstall-mcp --all
|
|
285
|
+
|
|
286
|
+
# 4. Per-project files — find every .acore folder you opted in to
|
|
287
|
+
find ~ -maxdepth 4 -type d -name .acore 2>/dev/null
|
|
288
|
+
# Review the list, then delete by hand or:
|
|
289
|
+
# find ~/Projects -maxdepth 4 -type d -name .acore -exec rm -rf {} +
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Per-project only — remove aman from one repo
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# From the project root
|
|
296
|
+
rm -rf .acore .github/copilot-instructions.md
|
|
297
|
+
rm -f .github/prompts/{identity,rules,eval,remember,session-narrative}.prompt.md
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
The package `npx` binaries (`aman`, `amem`, `aman-copilot`, etc.) live in npm's cache — `npm cache clean --force` if you want those gone too, but they're tiny and usually not worth the trouble.
|
|
301
|
+
|
|
222
302
|
## License
|
|
223
303
|
|
|
224
304
|
[MIT](LICENSE)
|
package/dist/index.js
CHANGED
|
@@ -32,8 +32,8 @@ function detectPlatform(cwd) {
|
|
|
32
32
|
const raw = fs.readFileSync(configPath, "utf-8");
|
|
33
33
|
const parsed = JSON.parse(raw);
|
|
34
34
|
if (typeof parsed.platform === "string") {
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
35
|
+
const p6 = parsed.platform;
|
|
36
|
+
if (p6 === "claude-code" || p6 === "cursor" || p6 === "windsurf") return p6;
|
|
37
37
|
}
|
|
38
38
|
} catch {
|
|
39
39
|
}
|
|
@@ -447,6 +447,10 @@ async function setupCommand() {
|
|
|
447
447
|
fs4.writeFileSync(path3.join(localDir, "context.md"), contextContent, "utf-8");
|
|
448
448
|
const configContent = JSON.stringify({ platform: platform || "other" }, null, 2) + "\n";
|
|
449
449
|
fs4.writeFileSync(path3.join(localDir, "config.json"), configContent, "utf-8");
|
|
450
|
+
} else {
|
|
451
|
+
p.log.info(
|
|
452
|
+
`No project detected here \u2014 run ${pc.bold("aman here")} later from inside any repo to add per-project context.`
|
|
453
|
+
);
|
|
450
454
|
}
|
|
451
455
|
const platformFile = getPlatformFile(platform);
|
|
452
456
|
if (platformFile) {
|
|
@@ -546,6 +550,7 @@ async function setupCommand() {
|
|
|
546
550
|
` ${pc.green("\u2714")} Your AI companion is ready.`,
|
|
547
551
|
"",
|
|
548
552
|
` ${pc.bold("aman status")} See your full ecosystem`,
|
|
553
|
+
` ${pc.bold("aman here")} Add per-project context (.acore/context.md)`,
|
|
549
554
|
` ${pc.bold("acore customize")} Change personality`,
|
|
550
555
|
` ${pc.bold("askill add testing")} Install skills`,
|
|
551
556
|
` ${pc.bold("npx @aman_asmuei/amem")} Enable automated memory`,
|
|
@@ -959,9 +964,75 @@ async function showcaseCommand(nameArg, opts = {}) {
|
|
|
959
964
|
p4.outro(`${pc4.green("\u2713")} ${entry.title} is ready!`);
|
|
960
965
|
}
|
|
961
966
|
|
|
967
|
+
// src/commands/here.ts
|
|
968
|
+
import * as p5 from "@clack/prompts";
|
|
969
|
+
import pc5 from "picocolors";
|
|
970
|
+
import fs7 from "fs";
|
|
971
|
+
import path5 from "path";
|
|
972
|
+
async function hereCommand(opts = {}) {
|
|
973
|
+
const cwd = process.cwd();
|
|
974
|
+
const acoreDir = path5.join(cwd, ".acore");
|
|
975
|
+
const contextPath = path5.join(acoreDir, "context.md");
|
|
976
|
+
const configPath = path5.join(acoreDir, "config.json");
|
|
977
|
+
if (fs7.existsSync(contextPath) && !opts.force) {
|
|
978
|
+
p5.intro(pc5.bold("aman here") + " \u2014 project context card");
|
|
979
|
+
const overwrite = await p5.confirm({
|
|
980
|
+
message: `${pc5.dim(".acore/context.md")} already exists. Overwrite?`,
|
|
981
|
+
initialValue: false
|
|
982
|
+
});
|
|
983
|
+
if (p5.isCancel(overwrite) || overwrite === false) {
|
|
984
|
+
p5.outro(pc5.yellow("Skipped. Use --force to overwrite without prompt."));
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
const stack = detectStack() || "unknown";
|
|
989
|
+
const platform = detectPlatform();
|
|
990
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
991
|
+
fs7.mkdirSync(acoreDir, { recursive: true });
|
|
992
|
+
const contextContent = `## Work
|
|
993
|
+
- Stack: ${stack}
|
|
994
|
+
- Domain:
|
|
995
|
+
- Focus:
|
|
996
|
+
|
|
997
|
+
## Session
|
|
998
|
+
- Last updated: ${today}
|
|
999
|
+
- Resume: [starting fresh]
|
|
1000
|
+
- Active topics: []
|
|
1001
|
+
- Recent decisions: []
|
|
1002
|
+
- Temp notes: []
|
|
1003
|
+
|
|
1004
|
+
## Project Patterns
|
|
1005
|
+
- [observations specific to this project \u2014 built over time]
|
|
1006
|
+
`;
|
|
1007
|
+
fs7.writeFileSync(contextPath, contextContent, "utf-8");
|
|
1008
|
+
if (fs7.existsSync(configPath)) {
|
|
1009
|
+
try {
|
|
1010
|
+
const existing = JSON.parse(fs7.readFileSync(configPath, "utf-8"));
|
|
1011
|
+
if (typeof existing.platform !== "string" || existing.platform === "") {
|
|
1012
|
+
existing.platform = platform || "other";
|
|
1013
|
+
fs7.writeFileSync(configPath, JSON.stringify(existing, null, 2) + "\n", "utf-8");
|
|
1014
|
+
}
|
|
1015
|
+
} catch {
|
|
1016
|
+
const fresh = { platform: platform || "other" };
|
|
1017
|
+
fs7.writeFileSync(configPath, JSON.stringify(fresh, null, 2) + "\n", "utf-8");
|
|
1018
|
+
}
|
|
1019
|
+
} else {
|
|
1020
|
+
const fresh = { platform: platform || "other" };
|
|
1021
|
+
fs7.writeFileSync(configPath, JSON.stringify(fresh, null, 2) + "\n", "utf-8");
|
|
1022
|
+
}
|
|
1023
|
+
if (opts.force) {
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
p5.intro(pc5.bold("aman here") + " \u2014 project context card");
|
|
1027
|
+
p5.log.success(`Wrote ${pc5.dim(".acore/context.md")} (stack: ${stack})`);
|
|
1028
|
+
p5.log.info("Edit it as you work. It is read by aman-claude-code on every session start,");
|
|
1029
|
+
p5.log.info(`and embedded into copilot-instructions.md when you run ${pc5.bold("aman-copilot init")}.`);
|
|
1030
|
+
p5.outro(pc5.green("Done."));
|
|
1031
|
+
}
|
|
1032
|
+
|
|
962
1033
|
// src/index.ts
|
|
963
1034
|
var program = new Command();
|
|
964
|
-
program.name("aman").description("Your complete AI companion \u2014 identity, memory, and tools in one command").version("0.
|
|
1035
|
+
program.name("aman").description("Your complete AI companion \u2014 identity, memory, and tools in one command").version("0.5.1").action(() => {
|
|
965
1036
|
const ecosystem = detectEcosystem();
|
|
966
1037
|
if (ecosystem.acore.installed) {
|
|
967
1038
|
statusCommand();
|
|
@@ -975,4 +1046,5 @@ program.command("deploy").description("Deploy your AI companion (Docker, systemd
|
|
|
975
1046
|
program.command("showcase [name]").description("Set up a showcase AI companion (rutin, kedai, monitor, ...)").option("--dry-run", "preview files without installing").option("--list", "list all available showcases").action(
|
|
976
1047
|
(name, opts) => showcaseCommand(name, opts)
|
|
977
1048
|
);
|
|
1049
|
+
program.command("here").description("Write a project context card (.acore/context.md) for the current directory").option("--force", "overwrite existing card without prompt").action((opts) => hereCommand(opts));
|
|
978
1050
|
program.parse();
|