pplx-zero 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +101 -49
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -195,7 +195,7 @@ pplx --input queries.json --format jsonl
195
195
  Supported file formats for analysis:
196
196
 
197
197
  **Documents (max 50MB):**
198
- - PDF, DOC, DOCX, TXT, RTF
198
+ - PDF, DOC, DOCX, TXT, RTF, MD
199
199
 
200
200
  **Images (max 50MB):**
201
201
  - PNG, JPEG, WebP, HEIF, HEIC, GIF
@@ -236,7 +236,7 @@ console.log(result);
236
236
 
237
237
  | Option | Short | Type | Default | Description |
238
238
  |--------|-------|------|---------|-------------|
239
- | `--file` | `-f` | string | - | Attach document (PDF, DOC, DOCX, TXT, RTF) |
239
+ | `--file` | `-f` | string | - | Attach document (PDF, DOC, DOCX, TXT, RTF, MD) |
240
240
  | `--image` | `-i` | string | - | Attach image (PNG, JPEG, WebP, HEIF, HEIC, GIF) |
241
241
  | `--format` | `-o` | string | json | Output format: json|jsonl |
242
242
  | `--model` | `-m` | string | sonar | AI model: sonar, sonar-pro, sonar-deep-research, sonar-reasoning |
package/dist/cli.js CHANGED
@@ -31,7 +31,7 @@ var __export = (target, all) => {
31
31
  var require_package = __commonJS((exports, module) => {
32
32
  module.exports = {
33
33
  name: "pplx-zero",
34
- version: "1.0.1",
34
+ version: "1.1.0",
35
35
  description: "Fast Perplexity AI search CLI with multimodal support - minimal setup, maximal results",
36
36
  type: "module",
37
37
  main: "dist/index.js",
@@ -94,7 +94,7 @@ var require_package = __commonJS((exports, module) => {
94
94
  license: "MIT",
95
95
  repository: {
96
96
  type: "git",
97
- url: "https://github.com/codewithkenzo/pplx-zero.git"
97
+ url: "git+https://github.com/codewithkenzo/pplx-zero.git"
98
98
  },
99
99
  files: [
100
100
  "dist",
@@ -6496,7 +6496,9 @@ var DOCUMENT_MIME_TYPES = {
6496
6496
  ".doc": "application/msword",
6497
6497
  ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6498
6498
  ".txt": "text/plain",
6499
- ".rtf": "application/rtf"
6499
+ ".rtf": "application/rtf",
6500
+ ".md": "text/markdown",
6501
+ ".markdown": "text/markdown"
6500
6502
  };
6501
6503
  var MAX_FILE_SIZE = 50 * 1024 * 1024;
6502
6504
  var MAX_ATTACHMENTS = 10;
@@ -6671,9 +6673,6 @@ class PerplexitySearchTool {
6671
6673
  } else if (validatedInput.args.attachments) {
6672
6674
  attachments = validatedInput.args.attachments;
6673
6675
  }
6674
- if (validatedInput.args.attachments) {
6675
- attachments = [...attachments, ...validatedInput.args.attachments];
6676
- }
6677
6676
  const timeoutMs = validatedInput.options?.timeoutMs || 30000;
6678
6677
  const controller = new AbortController;
6679
6678
  if (signal) {
@@ -6984,15 +6983,18 @@ var __dirname2 = dirname(__filename2);
6984
6983
  var { values: cliOptions, positionals: commandLineQueries } = parseArgs({
6985
6984
  args: process.argv.slice(2),
6986
6985
  options: {
6987
- input: { type: "string", short: "i" },
6986
+ model: { type: "string", short: "m" },
6987
+ file: { type: "string", short: "f" },
6988
+ image: { type: "string", short: "i" },
6989
+ format: { type: "string", short: "o", default: "json" },
6990
+ version: { type: "boolean", short: "v" },
6991
+ help: { type: "boolean", short: "h" },
6992
+ "help-advanced": { type: "boolean" },
6993
+ input: { type: "string", short: "I" },
6988
6994
  stdin: { type: "boolean", short: "s" },
6989
6995
  concurrency: { type: "string", short: "c" },
6990
6996
  timeout: { type: "string", short: "t" },
6991
6997
  workspace: { type: "string", short: "w" },
6992
- format: { type: "string", short: "f", default: "json" },
6993
- version: { type: "boolean", short: "v" },
6994
- help: { type: "boolean", short: "h" },
6995
- model: { type: "string", short: "m" },
6996
6998
  attach: { type: "string", multiple: true },
6997
6999
  "attach-image": { type: "string", multiple: true },
6998
7000
  async: { type: "boolean" },
@@ -7002,62 +7004,100 @@ var { values: cliOptions, positionals: commandLineQueries } = parseArgs({
7002
7004
  });
7003
7005
  if (cliOptions.help) {
7004
7006
  console.error(`
7005
- PPLX-Zero - Minimal, fast Perplexity AI search CLI with multimodal support
7007
+ PPLX-Zero - Fast Perplexity AI search CLI with multimodal support
7006
7008
 
7007
7009
  USAGE:
7008
7010
  pplx [OPTIONS] [QUERY...]
7009
7011
 
7010
- OPTIONS:
7011
- -i, --input <file> Read batch requests from JSON file
7012
- -s, --stdin Read JSONL requests from stdin
7013
- -c, --concurrency <n> Max concurrent requests (default: 5)
7014
- -t, --timeout <ms> Request timeout in milliseconds (default: 30000)
7015
- -w, --workspace <path> Workspace directory for sandboxing
7016
- -f, --format <format> Output format: json|jsonl (default: json)
7017
- -m, --model <model> AI model: sonar, sonar-pro, sonar-deep-research, sonar-reasoning (default: sonar)
7018
- --attach <file> Attach document files (PDF, DOC, DOCX, TXT, RTF) - can be used multiple times
7019
- --attach-image <file> Attach image files (PNG, JPEG, WebP, HEIF, HEIC, GIF) - can be used multiple times
7020
- --async Process requests asynchronously
7021
- --webhook <url> Webhook URL for async notifications
7022
- -v, --version Show version
7023
- -h, --help Show this help
7012
+ BASIC OPTIONS:
7013
+ -m, --model <model> Choose AI model (sonar, sonar-pro, sonar-deep-research, sonar-reasoning)
7014
+ -f, --file <file> Attach document (PDF, DOC, DOCX, TXT, RTF)
7015
+ -i, --image <file> Attach image (PNG, JPEG, WebP, HEIF, HEIC, GIF)
7016
+ -o, --format <format> Output format (json, jsonl)
7017
+
7018
+ -v, --version Show version
7019
+ -h, --help Show this help
7024
7020
 
7025
7021
  EXAMPLES:
7026
- # Basic query
7022
+ # Simple search
7027
7023
  pplx "latest AI developments"
7028
7024
 
7029
- # Model selection
7030
- pplx --model sonar-pro "Detailed analysis"
7031
- pplx --model sonar-deep-research "Comprehensive research"
7032
- pplx --model sonar-reasoning "Complex problem solving"
7025
+ # Choose model for detailed analysis
7026
+ pplx --model sonar-pro "Explain quantum computing"
7033
7027
 
7034
- # Image analysis
7035
- pplx --attach-image screenshot.png --model sonar-pro "Analyze this interface"
7028
+ # Analyze document
7029
+ pplx --file report.pdf "Summarize this document"
7036
7030
 
7037
- # Document analysis
7038
- pplx --attach report.pdf --model sonar-deep-research "Summarize this document"
7031
+ # Analyze image
7032
+ pplx --image screenshot.png "What does this interface do?"
7039
7033
 
7040
- # Multimodal analysis
7041
- pplx --attach document.txt --attach-image chart.png --model sonar-reasoning "Analyze this data"
7034
+ # Document + image analysis
7035
+ pplx --file data.csv --image chart.png "Analyze this data"
7042
7036
 
7043
- # Async processing with webhook
7044
- pplx --async --webhook https://api.example.com/callback "Long research task"
7037
+ # Different AI models
7038
+ pplx --model sonar-reasoning "Solve this math problem"
7039
+ pplx --model sonar-deep-research "History of artificial intelligence"
7040
+
7041
+ # Advanced Usage (see --help-advanced):
7042
+ pplx --help-advanced
7043
+
7044
+ SUPPORTED FORMATS:
7045
+ Documents: PDF, DOC, DOCX, TXT, RTF (max 50MB)
7046
+ Images: PNG, JPEG, WebP, HEIF, HEIC, GIF (max 50MB)
7045
7047
 
7046
- # Batch from file
7048
+ Get your API key: https://www.perplexity.ai/account/api/keys
7049
+ Set environment variable: export PERPLEXITY_API_KEY="your-key"
7050
+ `);
7051
+ process.exit(0);
7052
+ }
7053
+ if (cliOptions["help-advanced"]) {
7054
+ console.error(`
7055
+ PPLX-Zero - Advanced Usage Options
7056
+
7057
+ USAGE:
7058
+ pplx [ADVANCED-OPTIONS] [QUERY...]
7059
+
7060
+ ADVANCED OPTIONS:
7061
+ -I, --input <file> Read batch requests from JSON file
7062
+ -s, --stdin Read JSONL requests from stdin
7063
+ -c, --concurrency <n> Max concurrent requests (default: 5, max: 20)
7064
+ -t, --timeout <ms> Request timeout in milliseconds (default: 30000)
7065
+ -w, --workspace <path> Workspace directory for sandboxing
7066
+ -o, --format <format> Output format: json|jsonl (default: json)
7067
+ -m, --model <model> AI model (default: sonar)
7068
+
7069
+ --attach <file> Attach document files (can be used multiple times)
7070
+ --attach-image <file> Attach image files (can be used multiple times)
7071
+ --async Process requests asynchronously
7072
+ --webhook <url> Webhook URL for async notifications
7073
+
7074
+ -v, --version Show version
7075
+ -h, --help Show basic help
7076
+
7077
+ ADVANCED EXAMPLES:
7078
+ # Batch processing
7047
7079
  pplx --input queries.json
7048
7080
 
7049
- # Streaming from stdin
7081
+ # Stream processing
7050
7082
  cat queries.jsonl | pplx --stdin
7051
7083
 
7052
- # JSONL output for streaming
7053
- pplx --format jsonl --input queries.json
7084
+ # Custom concurrency and timeout
7085
+ pplx --concurrency 10 --timeout 60000 "Multiple searches"
7054
7086
 
7055
- # High concurrency batch with attachments
7056
- pplx --concurrency 10 --timeout 60000 --input queries.json --attach appendix.pdf
7087
+ # High performance batch
7088
+ pplx --input queries.json --concurrency 15 --format jsonl
7057
7089
 
7058
- SUPPORTED FORMATS:
7059
- Images: PNG, JPEG, WebP, HEIF, HEIC, GIF (max 50MB, 10 files)
7060
- Documents: PDF, DOC, DOCX, TXT, RTF (max 50MB, 10 files)
7090
+ # Multiple attachments (advanced syntax)
7091
+ pplx --attach doc1.pdf --attach doc2.txt --attach-image img1.png "Analyze all files"
7092
+
7093
+ # Async processing with webhook
7094
+ pplx --async --webhook https://api.example.com/webhook "Long research task"
7095
+
7096
+ # Custom workspace
7097
+ pplx --workspace /tmp/research "Custom workspace search"
7098
+
7099
+ # Basic Usage (see --help):
7100
+ pplx --help
7061
7101
  `);
7062
7102
  process.exit(0);
7063
7103
  }
@@ -7164,7 +7204,7 @@ async function main() {
7164
7204
  model: selectedModel,
7165
7205
  async: cliOptions.async,
7166
7206
  webhook: cliOptions.webhook,
7167
- hasAttachments: (cliOptions.attach?.length || 0) + (cliOptions["attach-image"]?.length || 0) > 0
7207
+ hasAttachments: (cliOptions.file || cliOptions.image || (cliOptions.attach?.length || 0) + (cliOptions["attach-image"]?.length || 0)) > 0
7168
7208
  }
7169
7209
  });
7170
7210
  let batchSearchInput;
@@ -7178,6 +7218,18 @@ async function main() {
7178
7218
  } else if (commandLineQueries.length > 0) {
7179
7219
  const combinedQuery = commandLineQueries.join(" ");
7180
7220
  const attachmentInputs = [];
7221
+ if (cliOptions.file) {
7222
+ attachmentInputs.push({
7223
+ path: cliOptions.file,
7224
+ type: "document"
7225
+ });
7226
+ }
7227
+ if (cliOptions.image) {
7228
+ attachmentInputs.push({
7229
+ path: cliOptions.image,
7230
+ type: "image"
7231
+ });
7232
+ }
7181
7233
  if (cliOptions.attach && cliOptions.attach.length > 0) {
7182
7234
  for (const filePath of cliOptions.attach) {
7183
7235
  attachmentInputs.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pplx-zero",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Fast Perplexity AI search CLI with multimodal support - minimal setup, maximal results",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -71,4 +71,4 @@
71
71
  "LICENSE",
72
72
  "package.json"
73
73
  ]
74
- }
74
+ }