Skip to content

Commit bc32c27

Browse files
committed
fix: npm package missing bin wrapper, README, and SEO keywords
1 parent 789a739 commit bc32c27

3 files changed

Lines changed: 110 additions & 16 deletions

File tree

npm/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Stacklit
2+
3+
**Your codebase, in 1,500 tokens.**
4+
5+
One command generates a committed JSON index that any AI agent can read. No server, no setup.
6+
7+
## Quick start
8+
9+
```bash
10+
npx stacklit init
11+
```
12+
13+
This scans your codebase and generates:
14+
15+
- `stacklit.json` -- machine-readable codebase index (commit this)
16+
- `stacklit.mmd` -- Mermaid dependency diagram (renders on GitHub)
17+
- `stacklit.html` -- interactive visual map with 4 views (gitignored)
18+
19+
## Why
20+
21+
AI coding agents burn most of their context window figuring out where things live. Reading one large file to find a function signature costs thousands of tokens. Every session starts from scratch.
22+
23+
`stacklit.json` gives any agent a complete map of your codebase -- modules, dependencies, exports, types, activity -- in about 1,500 tokens. Commit it once, every agent benefits.
24+
25+
## MCP server
26+
27+
```bash
28+
stacklit serve
29+
```
30+
31+
Add to Claude Desktop or Cursor MCP config:
32+
33+
```json
34+
{
35+
"mcpServers": {
36+
"stacklit": {
37+
"command": "stacklit",
38+
"args": ["serve"]
39+
}
40+
}
41+
}
42+
```
43+
44+
Six tools: `get_overview`, `get_module`, `find_module`, `get_dependencies`, `get_hot_files`, `get_hints`.
45+
46+
## CLI
47+
48+
```
49+
stacklit init # scan, generate all outputs, open HTML
50+
stacklit generate # regenerate from current source
51+
stacklit view # regenerate HTML and open in browser
52+
stacklit diff # check if index is stale
53+
stacklit serve # start MCP server
54+
```
55+
56+
## Language support
57+
58+
Go (AST), TypeScript, JavaScript, Python, Rust, Java (regex), plus generic fallback for any language.
59+
60+
## Links
61+
62+
- [GitHub](https://github.com/glincker/stacklit)
63+
- [Full documentation](https://github.com/glincker/stacklit#readme)
64+
- [Releases](https://github.com/glincker/stacklit/releases)
65+
66+
## License
67+
68+
MIT

npm/bin/stacklit.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@
33
const { execFileSync } = require('child_process');
44
const path = require('path');
55
const os = require('os');
6-
const fs = require('fs');
76

87
const ext = os.platform() === 'win32' ? '.exe' : '';
9-
const binPath = path.join(__dirname, 'stacklit' + ext);
10-
11-
if (!fs.existsSync(binPath)) {
12-
console.error('stacklit binary not found. Try reinstalling:');
13-
console.error(' npm install -g stacklit');
14-
console.error('Or install directly:');
15-
console.error(' go install github.com/glincker/stacklit/cmd/stacklit@latest');
16-
process.exit(1);
17-
}
8+
const bin = path.join(__dirname, 'stacklit' + ext);
189

1910
try {
20-
execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
11+
execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' });
2112
} catch (err) {
22-
process.exit(err.status || 1);
13+
if (err.status !== null) {
14+
process.exit(err.status);
15+
}
16+
console.error('stacklit binary not found. Run: npm install stacklit');
17+
console.error('Or install directly: go install github.com/glincker/stacklit/cmd/stacklit@latest');
18+
process.exit(1);
2319
}

npm/package.json

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,52 @@
11
{
22
"name": "stacklit",
3-
"version": "0.1.0",
4-
"description": "Stop burning tokens. One command to make any repo AI-agent-ready.",
3+
"version": "0.1.1",
4+
"description": "Your codebase, in 1,500 tokens. One command generates a committed JSON index that any AI agent can read.",
55
"bin": {
66
"stacklit": "bin/stacklit.js"
77
},
88
"scripts": {
99
"postinstall": "node install.js"
1010
},
11-
"keywords": ["ai", "codebase", "index", "agent", "mcp", "cli", "developer-tools"],
11+
"keywords": [
12+
"ai",
13+
"codebase",
14+
"index",
15+
"agent",
16+
"mcp",
17+
"cli",
18+
"developer-tools",
19+
"llm",
20+
"claude",
21+
"cursor",
22+
"copilot",
23+
"aider",
24+
"context",
25+
"tokens",
26+
"dependency-graph",
27+
"code-intelligence",
28+
"monorepo",
29+
"mcp-server",
30+
"codebase-index",
31+
"repo-map",
32+
"code-analysis"
33+
],
1234
"author": "glincker",
1335
"license": "MIT",
1436
"repository": {
1537
"type": "git",
1638
"url": "https://github.com/glincker/stacklit"
1739
},
1840
"homepage": "https://github.com/glincker/stacklit",
41+
"bugs": {
42+
"url": "https://github.com/glincker/stacklit/issues"
43+
},
1944
"engines": {
2045
"node": ">=16"
21-
}
46+
},
47+
"files": [
48+
"install.js",
49+
"bin/stacklit.js",
50+
"README.md"
51+
]
2252
}

0 commit comments

Comments
 (0)