Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules/
dist/
*.log
.DS_Store
.env
Expand Down
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# promptless-cli

A CLI for helping tech writers. Right now it only detects the rhetorical and structural tells of LLM-generated prose and surfaces diagnostics for people to fix.

## Install

Requires Node.js 20+ and npm. Pandoc is optional, used only for non-markdown formats (`.rst`, `.org`, `.adoc`, `.tex`, …).

### Install globally from GitHub

```sh
npm install -g github:Promptless/promptless-cli
```

Or with an explicit git URL (useful in CI):

```sh
npm install -g git+https://github.com/Promptless/promptless-cli.git
# or over SSH:
npm install -g git+ssh://git@github.com/Promptless/promptless-cli.git
```

This exposes two binaries on your `PATH`: `promptless` and `pless`.

```sh
promptless sample.md
pless --diagnostic sample.md
```

> The repo is currently internal — you'll need GitHub access to `Promptless/promptless-cli` for the install to fetch.

### Or clone and run locally

```sh
git clone git@github.com:Promptless/promptless-cli.git
cd promptless-cli
npm install
npm run promptless -- path/to/file.md
```

## Usage

```
promptless [options] <file>...
```

Run `promptless --help` for the full option list (input format, color, diagnostic vs. human mode, pandoc passthrough).

Exit codes: `0` clean, `1` violations found, `2` argument error.

## License

[MPL-2.0](./LICENSE)
17 changes: 17 additions & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
# pre-commit: dist must track src.
# enable once: git config core.hooksPath hooks

set -e

# nothing to build against. pass.
git diff --cached --quiet -- src tsup.config.ts tsconfig.json package.json \
&& exit 0

npm run --silent build >/dev/null

# bundle matches tree. clean.
git diff --quiet -- dist && exit 0

echo 'pre-commit: dist out of date. git add dist && retry.' 1>&2
exit 1
Loading