- Created package.json and package-lock.json for CLI package. - Implemented argument parsing in args.ts to handle various flags and commands. - Developed main CLI logic in cli.ts to execute commands and handle errors. - Added configuration loading from a JSON file in config.ts, with environment variable support. - Implemented prompt resolution and provider interaction in prompt.ts. - Added usage documentation for the CLI. - Configured TypeScript settings in tsconfig.json for the CLI package. - Updated README in vscode package to reflect the new CLI functionality. - Refactored root tsconfig.json to streamline project structure.
50 lines
1.5 KiB
Markdown
50 lines
1.5 KiB
Markdown
# LexAI for Chrome
|
||
|
||
Grammarly-like **Manifest V3** writing assistant powered by **your own LLM API key**. No LexAI account, no subscription, no LexAI servers.
|
||
|
||
**Chrome Web Store:** [LexAI — AI Writing Assistant](https://chromewebstore.google.com/detail/bagpcheidbkfgijnnmolnkgagibbjfnk)
|
||
|
||
## Features
|
||
|
||
- Select text on any page → **Fix / Rephrase / Shorten / Expand / Explain / Make Prompt**
|
||
- Writing styles: Formal, Casual, Academic, Creative, Concise
|
||
- Floating toolbar + right-click context menu + popup editor
|
||
- Prompt Builder (patterns, persona, format)
|
||
- Providers: OpenAI · Anthropic · Groq · OpenRouter
|
||
- API key encrypted locally (`tweetnacl` secretbox)
|
||
|
||
## Develop
|
||
|
||
From the **repo root**:
|
||
|
||
```bash
|
||
npm run chrome:install
|
||
npm run chrome:dev # hot reload
|
||
npm run chrome:build # → packages/chrome/.output/chrome-mv3/
|
||
npm run chrome:zip # store package
|
||
npm run chrome:test
|
||
npm run chrome:typecheck
|
||
```
|
||
|
||
Or inside this package:
|
||
|
||
```bash
|
||
npm install
|
||
npm run dev
|
||
npm run build
|
||
```
|
||
|
||
### Load unpacked
|
||
|
||
1. `npm run chrome:build`
|
||
2. Chrome → `chrome://extensions` → Developer Mode
|
||
3. **Load unpacked** → select `packages/chrome/.output/chrome-mv3`
|
||
|
||
## Shared core
|
||
|
||
Provider adapters and prompts live in [`../../src/lib`](../../src/lib) (`@lib/*`). Do not import `@lib/crypto` or `@lib/messaging` from the VS Code or CLI packages.
|
||
|
||
## Version
|
||
|
||
Bump `version` in this package’s `package.json` only — the extension manifest follows it via `wxt.config.ts`.
|