Observed since 20 Oct, 22:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0xanand/coremap
Pack a repo into one AI-friendly file — or pass --task to keep only the lines that matter, with a verification receipt.
Pack your repository into one AI-friendly file — or pass a task and keep only the lines that matter.
npx @0xanand/coremap .
Writes coremap.md: directory tree, source files, and a short summary. Secrets are excluded.
| Mode | Command | Output |
|---|---|---|
| Pack | coremap . | Full repo → one file (coremap.md) |
| Task | coremap . --task "fix …" | Exact spans → coremap-context.md + coremap-receipt.json |
Pack is the everyday path. Task mode selects a small evidence set and can verify it by applying a patch and running your tests.
No install (recommended):
npx @0xanand/coremap .
Global:
npm install -g @0xanand/coremap
coremap .
Requires Node.js 20+.
coremap . # → coremap.md
coremap . --out-file context.md # custom name
coremap . --max-tokens 200000 # raise whole-file budget
coremap . --out-dir ./out # write elsewhere
coremap . --task "fix the tax bug" --budget-lines 25
# Optional: prove the context was enough
coremap . --task "fix the tax bug" --verify
coremap . --task "…" --verify --no-llm # offline (no API key)
Pinned demo (included in this repo):
npm run demo
Example output:
Full Compress CoreMap
-------------------- -------- -------- --------
Context tokens 432 81 192
HitFile — — 1.00
HitRegion≈ — — 0.71
Patch produced no no yes
Tests (original repo) no no yes
coremap: GREEN DELTA tokens 432→192 | HitFile=1.00 | HitRegion≈0.71 | tests=PASS
Tests (original repo) is the same baseline for the Full and Compress columns; CoreMap applies the demo oracle patch only in an isolated temporary copy.
.gitignore and optional .coremapignoreo200k_base--verify)Usage: coremap [options] [path]
Arguments:
path repository path (default: ".")
Options:
--task <text> issue / change request (enables task mode)
--budget-lines <n> max source lines in the context pack (default: 200)
--verify run one patch attempt + tests
--no-llm offline selection; skip LLM patch
--ground-truth <patch> unified diff for HitFile / HitRegion scoring only
--max-tokens <n> pack mode whole-file token budget (default: 50000)
--out-file <name> pack mode output filename (default: coremap.md)
--out-dir <dir> output directory (default: .)
-V, --version output version number
-h, --help display help
| Flag | Mode | Notes |
|---|---|---|
--task | task | Turns on span selection + receipt |
--budget-lines | task | Hard line budget for selected source |
--verify | task | Patch attempt + test run |
--no-llm | task | Never call OpenAI; use oracle if --ground-truth is set |
--ground-truth | task | Eval only — never used as selection input |
--max-tokens | pack | Skip huge files once the budget is hit |
--out-file / --out-dir | both | Control where artifacts land |
Pack: walk the tree (gitignore-aware) → filter secrets → emit tree + files + summary with token counts.
Task: parse the task → gather candidates (terms, symbols, imports, tests) → rank → select exact spans under the line budget → write pack + receipt → optionally verify.

src/
cli.ts # CLI entry
index.ts # library exports
coremap/ # pack, select, receipt, verify, …
bin/coremap # npm bin wrapper (optional; published bin is dist/cli.js)
fixtures/ # mini-repo + tax-bug eval fixture
evals/tax-bug/ # issue text + ground-truth patch
specs/coremap/ # product spec / plan / tasks
tests/ # vitest
git clone https://github.com/Anand-0037/coremap.git
cd coremap
npm install
npm test # 22 tests
npm run build
npm run lint
npm run pack # dogfood: pack this repo → repomap.txt
npm run demo # GREEN DELTA on the pinned eval
| Script | Purpose |
|---|---|
npm test | Run vitest |
npm run build | Compile TypeScript → dist/ |
npm run coremap | Run CLI via tsx |
npm run pack | Full pack of this repo |
npm run demo | Pinned task + verify demo |
CoreMap respects .gitignore. Add a .coremapignore (gitignore syntax) for extra exclusions.
.env*, keys, PEMs, credential filenames, and similarsk-…, AKIA…, high-entropy secret-like assignmentsReport security issues via GitHub Issues (or privately if you prefer).
strict TypeScript)npm test && npm run build before opening a PRBug reports and PRs are welcome.
Built for the OpenAI Codex Build Week hackathon (Delhi NCR). See CODEX.md. Agent rules: AGENTS.md.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
ignoreEnvironment{
"local_name": "ignore",
"alias": false,
"peer_metadata": null
} | ^7.0.4 | runtime |
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ^13.1.0 | runtime |
js-tiktokenEnvironment{
"local_name": "js-tiktoken",
"alias": false,
"peer_metadata": null
} | ^1.0.19 | runtime |
web-tree-sitterEnvironment{
"local_name": "web-tree-sitter",
"alias": false,
"peer_metadata": null
} | ^0.25.10 | runtime |
tree-sitter-wasmsEnvironment{
"local_name": "tree-sitter-wasms",
"alias": false,
"peer_metadata": null
} | ^0.1.13 | runtime |
tsxEnvironment{
"local_name": "tsx",
"alias": false,
"peer_metadata": null
} | ^4.19.3 | development |
vitestEnvironment{
"local_name": "vitest",
"alias": false,
"peer_metadata": null
} | ^3.1.1 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.8.3 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.14.1 | development |
openaiEnvironment{
"local_name": "openai",
"alias": false,
"peer_metadata": null
} | ^4.96.0 | optional |
Source distribution
{
"shasum": "45e0fc48746e76acd4a8fb4c752da8c041cda1d7",
"tarball": "https://registry.npmjs.org/@0xanand/coremap/-/coremap-0.1.0.tgz",
"fileCount": 40,
"integrity": "sha512-DbOU+69oulk2g0Nq+fhP83iGpCvCyQVQS64JG7XPfDtw8aoo0cdW6hheQMlHXgO95xBOj/RYZxAutSfqds2vVQ==",
"signatures": [
{
"sig": "MEQCIBk7Vy/lcbaCNgupdBNrTLilsOQ8eyJy1UGXgPOnSpIGAiAohKfoN+dcYTKsHSBzcptJ8k0TV84fvgb7Wih+ksjRxg==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 85599
}Observed since 20 Oct, 22:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:081ebaa35147cb8b3f5644da3157e3916b141fff4948501ce2d465fa9f0edcdc