open-index/open-npm huggingface dataset:
npm package: @ompharate/better-context
Description: Analyze a TypeScript project and generate AI-friendly context output
Latest version: 1.0.0

# better-context

CLI tool to analyze a TypeScript project and generate:
- analysis JSON
- AI-friendly context text

## What It Scans
A target folder is analyzable if it contains:
- `tsconfig.json`
- `src/`

## Install

Global install:

```bash
npm install -g @ompharate/better-context
```

Or run with npx:

```bash
npx @ompharate/better-context
```

## Usage

Interactive mode (asks which folder to analyze):

```bash
better-context
```

Direct mode (skip prompt):

```bash
better-context ./path/to/project
```

Outputs are written to `./output/` in your current directory:
- `<slug>_analysis.json`
- `<slug>_context.txt`

## Local Development

```bash
npm install
npm run build
npm start
```

Note: do not run `node cli.ts` directly. `node` cannot execute TypeScript source imports in this setup.
Use one of these instead:

```bash
npm run analyze:prompt
# or
node dist/cli.js
```

Dev run without build:

```bash
npm run analyze:prompt
```