# wtfdid-cli

> A CLI for chat GPT and writing code with GPT as an assistant

Latest version **0.0.16** (published 2023-04-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install wtfdid-cli
pnpm add wtfdid-cli
yarn add wtfdid-cli
bun add wtfdid-cli
```

Provides the commands `wtfdid`, `wtfchat`, `wtfhack`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.16 |
| Published | 2023-04-17 |
| First published | 2023-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 73.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | brentable |

## Links

- npm: https://www.npmjs.com/package/wtfdid-cli
- npm.io page: https://npm.io/package/wtfdid-cli

## Dependencies (4)

- [openai](https://npm.io/package/openai.md) ^3.2.1
- [prismjs](https://npm.io/package/prismjs.md) ^1.29.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.5
- [commander](https://npm.io/package/commander.md) ^10.0.0

## Recent versions

- 0.0.16 (latest) — 2023-04-17
- 0.0.13 — 2023-04-17
- 0.0.12 — 2023-04-17
- 0.0.11 — 2023-04-17
- 0.0.10 — 2023-04-14
- 0.0.9 — 2023-04-12
- 0.0.8 — 2023-04-12
- 0.0.7 — 2023-04-12
- 0.0.6 — 2023-04-12
- 0.0.3 — 2023-04-11
- 0.0.1 — 2023-04-05

## README

# wtfdid-cli

A CLI for GPT-3.5 / GPT-4 with a focus on simplicity and ease of use.

## Installation

Install the CLI globally using npm: 

```bash
npm i -g wtfdid-cli
```

## Usage

The CLI provides several commands for different purposes:

### Chat with GPT

Start a conversation with GPT:

```bash
wtfchat
```

To use GPT-4 instead, add the `-4` flag:

```bash
wtfchat -4
```

### Ask GPT about a file

Ask GPT a question about a specific file:

```bash
wtfhack ask <filepath> [...your question here]
```

Example:

```bash
wtfhack ask src/index.ts "my helloWorld() function isn't working right... what should I do?"
```

To use GPT-4 instead, add the `-4` flag:

```bash
wtfhack ask -4 src/index.ts "my helloWorld() function isn't working right... what should I do?"
```

### Edit a file with GPT's help

Ask GPT to edit a file based on your instructions:

```bash
wtfhack write <filepath> [...instructions here]
```

Example:

```bash
wtfhack write src/index.ts "add a function called ligma which returns nuts and balls with 50 percent probability"
```

If the edit isn't what you expected, you can always undo the changes with your editor's undo command (e.g., CMD-Z).

### Shortcuts

You can use shortcuts for the `ask` and `write` commands:

- `wtfhack a` instead of `wtfhack ask`
- `wtfhack w` instead of `wtfhack write`



P.S.
big props to `wtfhack -4 w` for helping me write this readme ;)

---
_Source: https://npm.io/package/wtfdid-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
