Skip to content

Commit

Permalink
fix: install cli tool
Browse files Browse the repository at this point in the history
  • Loading branch information
fmonckemeyer committed Aug 22, 2023
1 parent 99825fb commit 3e2e323
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
- Built-in Demographics: Collect demographic data seamlessly.
- Powered by ChatGPT: Leverage the intelligence of ChatGPT for smarter, conversational surveys.

### 📚 Install

#### As a Library

```bash
npm install surveyor.ai
```

#### As a CLI Tool

```bash
npm install -g surveyor.ai
```

### 📚 How to Use

#### As a Library
Expand Down Expand Up @@ -43,13 +57,13 @@ for await (const answer of survey()) {
Run your survey from the terminal:

```bash
npm run cli -- --question 'Wenn am nächsten Sonntag Bundestagswahl wäre, wen würden Sie wählen?' select 'CDU/CSU, SPD, Grüne, FPD, Die Linke, AfD, Sonstige' --amount 10
surveyor --question 'Wenn am nächsten Sonntag Bundestagswahl wäre, wen würden Sie wählen?' select 'CDU/CSU, SPD, Grüne, FPD, Die Linke, AfD, Sonstige' --amount 10
```
You can also export the data to a specific place with --path:
```bash
npm run cli -- --question 'Wenn am nächsten Sonntag Bundestagswahl wäre, wen würden Sie wählen?' select 'CDU/CSU, SPD, Grüne, FPD, Die Linke, AfD, Sonstige' --amount 10 --path ./path/to/export.csv
surveyor --question 'Wenn am nächsten Sonntag Bundestagswahl wäre, wen würden Sie wählen?' select 'CDU/CSU, SPD, Grüne, FPD, Die Linke, AfD, Sonstige' --amount 10 --path ./path/to/export.csv
```
### 📦 API Documentation
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "surveyor.ai",
"version": "1.0.4",
"version": "1.0.5",
"description": "",
"type": "module",
"main": "dist/src/index.js",
Expand All @@ -10,6 +10,9 @@
"cli": "ts-node --esm ./src/cli.ts",
"build": "npx tsc -p tsconfig.json"
},
"bin": {
"surveyor": "./dist/src/cli.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env node
import { Command } from "commander";
import figlet from "figlet";
import { QuestionTypes, SurveyBuilder, SurveyRegions, use } from "./index.js";
Expand Down

0 comments on commit 3e2e323

Please sign in to comment.