@rikalabs/parallel 0.1.0 → 0.2.0

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 +33 -182
  2. package/dist/index.js +1 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,233 +1,84 @@
1
1
  # Parallel CLI
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@rikalabs/parallel.svg)](https://www.npmjs.com/package/@rikalabs/parallel)
4
- [![GitHub](https://img.shields.io/badge/GitHub-Rika--Labs%2Fparallel-black.svg)](https://github.com/Rika-Labs/parallel)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
4
  [![CI](https://github.com/Rika-Labs/parallel/actions/workflows/ci.yml/badge.svg)](https://github.com/Rika-Labs/parallel/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
6
 
8
7
  A Unix-friendly CLI for the [Parallel](https://parallel.ai/) Search and Extract APIs.
9
8
 
10
- [Parallel](https://parallel.ai/) provides semantic search and content extraction APIs that understand intent, not just keywords. This CLI brings those capabilities to your terminal with full Unix composability.
11
-
12
- ## Features
13
-
14
- - **Semantic Search**: Declarative objectives instead of just keywords
15
- - **Content Extraction**: Clean markdown from URLs and PDFs
16
- - **Batch Processing**: Parallelize multiple queries with bounded concurrency
17
- - **Config Management**: Securely manage your API key globally
18
- - **Unix Composable**: Works great with `stdin`, `stdout`, and pipes
19
-
20
- ## Quick Start
21
-
22
- ```bash
23
- # Set your API key (get one at https://parallel.ai/)
24
- parallel config set-key --key <your-key>
25
-
26
- # Search
27
- parallel search --query "What is declarative semantic search?"
28
-
29
- # Extract
30
- parallel extract --url https://docs.parallel.ai/home --objective "Find pricing"
31
- ```
9
+ Semantic search and content extraction that understands intent, not just keywords right from your terminal.
32
10
 
33
- ## Installation
34
-
35
- ### Via bun (recommended)
11
+ ## Install
36
12
 
37
13
  ```bash
38
14
  bun install -g @rikalabs/parallel
39
15
  ```
40
16
 
41
- ### From source
42
-
43
- ```bash
44
- # Clone and install dependencies
45
- git clone https://github.com/Rika-Labs/parallel.git
46
- cd parallel
47
- bun install
17
+ ## Setup
48
18
 
49
- # Build the CLI
50
- bun run build
19
+ Get your API key at [parallel.ai](https://parallel.ai), then:
51
20
 
52
- # Add alias to your shell profile
53
- echo 'alias parallel="bun $(pwd)/dist/index.js"' >> ~/.zshrc
54
- source ~/.zshrc
21
+ ```bash
22
+ parallel config set-key --key <your-key>
55
23
  ```
56
24
 
57
- ## Usage
58
-
59
- ### Configuration
25
+ ## Search
60
26
 
61
27
  ```bash
62
- # Set API key (stored securely in ~/Library/Application Support/parallel/)
63
- parallel config set-key --key <key>
64
-
65
- # View current API key
66
- parallel config get-key
67
-
68
- # Remove API key
69
- parallel config unset-key
70
-
71
- # Show config file path
72
- parallel config path
73
-
74
- # Or use environment variable
75
- export PARALLEL_API_KEY=<key>
28
+ parallel search --query "latest news about AI"
76
29
  ```
77
30
 
78
- ### Search
31
+ With agentic reasoning:
79
32
 
80
33
  ```bash
81
- # Basic search
82
- parallel search --query "Effect TS best practices"
83
-
84
- # Agentic mode (multi-step reasoning)
85
- parallel search --query "Compare React and Vue" --mode agentic
86
-
87
- # Control results
88
- parallel search --query "TypeScript tips" --max-results 20 --excerpt-chars 3000
89
-
90
- # Text format output
91
- parallel search --query "Bun runtime" --format text
92
-
93
- # Pretty JSON
94
- parallel search --query "Effect TS examples" --pretty
95
-
96
- # Multiple queries
97
- parallel search --query "React hooks" --query "Vue composition API" --concurrency 2
34
+ parallel search --query "compare React vs Vue" --mode agentic
98
35
  ```
99
36
 
100
- ### Extract
37
+ ## Extract
101
38
 
102
39
  ```bash
103
- # Extract from URL
104
40
  parallel extract --url https://example.com
105
-
106
- # With objective
107
- parallel extract --url https://docs.effect.website --objective "Find error handling patterns"
108
-
109
- # Full content extraction
110
- parallel extract --url https://example.com --full-content
111
-
112
- # Multiple URLs
113
- parallel extract --url https://a.com --url https://b.com --url https://c.com --concurrency 3
114
-
115
- # Text format
116
- parallel extract --url https://example.com --format text --pretty
117
41
  ```
118
42
 
119
- ### Batch Processing
43
+ With a specific objective:
120
44
 
121
45
  ```bash
122
- # Batch search from file (one query per line)
123
- cat queries.txt | parallel search --stdin --concurrency 10
124
-
125
- # Batch extract (one URL per line)
126
- cat urls.txt | parallel extract --stdin --concurrency 5 --format text
127
-
128
- # Pipe to other tools
129
- parallel search --query "API design" --format json | jq '.results[].url'
46
+ parallel extract --url https://example.com --objective "find pricing"
130
47
  ```
131
48
 
132
- ## API Reference
133
-
134
- This CLI wraps the [Parallel](https://parallel.ai/) v1beta endpoints:
135
-
136
- | Endpoint | Method | Description |
137
- |----------|--------|-------------|
138
- | `/v1beta/search` | POST | Semantic web search |
139
- | `/v1beta/extract` | POST | Content extraction from URLs |
140
-
141
- Get your API key at [parallel.ai](https://parallel.ai/).
142
-
143
- ## Tech Stack
144
-
145
- | Technology | Purpose |
146
- |------------|---------|
147
- | [Bun](https://bun.sh) | Runtime & bundler |
148
- | [Effect TS](https://effect.website) | Functional effects, error handling, concurrency |
149
- | [@effect/cli](https://github.com/Effect-TS/effect/tree/main/packages/cli) | Declarative CLI parsing |
150
- | [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) | Fast linting |
151
- | [Husky](https://typicode.github.io/husky/) | Git hooks |
152
-
153
- ## Development
49
+ ## Batch Processing
154
50
 
155
51
  ```bash
156
- # Run in development
157
- bun run dev -- search --query "test"
158
-
159
- # Lint
160
- bun run lint
161
-
162
- # Run tests
163
- bun test
164
-
165
- # Coverage (90%+ enforced)
166
- bun test --coverage
52
+ # Multiple queries
53
+ parallel search --query "topic 1" --query "topic 2" --concurrency 5
167
54
 
168
- # Build
169
- bun run build
55
+ # From stdin
56
+ cat urls.txt | parallel extract --stdin --concurrency 10
170
57
  ```
171
58
 
172
- ## Architecture
173
-
174
- Built with functional programming principles:
175
-
176
- - **Typed Errors**: `CliError`, `ApiError`, `ConfigError` with Effect's error channel
177
- - **Bounded Concurrency**: Effect's `forEach` for parallel batch operations
178
- - **Secure Config**: Effect-based file I/O with proper permissions
179
-
180
- ## Contributing
181
-
182
- This project uses [Conventional Commits](https://www.conventionalcommits.org/) to automate releases.
183
-
184
- ### Commit Format
59
+ ## Options
185
60
 
186
61
  ```
187
- <type>(<scope>): <description>
188
-
189
- [optional body]
190
-
191
- [optional footer]
62
+ --format json|text Output format (default: json)
63
+ --pretty Pretty print output
64
+ --max-results N Number of results (default: 10)
65
+ --concurrency N Parallel requests (default: 5)
192
66
  ```
193
67
 
194
- ### Types & Release Behavior
195
-
196
- | Type | Description | Release |
197
- |------|-------------|---------|
198
- | `feat` | New feature | **Minor** (0.x.0) |
199
- | `fix` | Bug fix | **Patch** (0.0.x) |
200
- | `perf` | Performance improvement | **Patch** (0.0.x) |
201
- | `docs` | Documentation only | No release |
202
- | `style` | Code style changes | No release |
203
- | `refactor` | Code refactor | No release |
204
- | `test` | Adding/updating tests | No release |
205
- | `build` | Build system changes | No release |
206
- | `ci` | CI configuration | No release |
207
- | `chore` | Maintenance | No release |
68
+ Run `parallel --help` for full documentation.
208
69
 
209
- ### Breaking Changes
70
+ ## Agents
210
71
 
211
- Add `!` after type or include `BREAKING CHANGE:` in footer for **major** release:
72
+ Add Parallel to your AI coding agent:
212
73
 
213
74
  ```bash
214
- feat!: remove deprecated --objective flag
215
- # or
216
- feat: new search API
75
+ # Claude Code
76
+ curl -s https://raw.githubusercontent.com/Rika-Labs/parallel/main/AGENTS.md >> CLAUDE.md
217
77
 
218
- BREAKING CHANGE: removed --objective in favor of --query
78
+ # Codex / OpenCode / Amp
79
+ curl -s https://raw.githubusercontent.com/Rika-Labs/parallel/main/AGENTS.md >> AGENTS.md
219
80
  ```
220
81
 
221
- ### Examples
222
-
223
- ```bash
224
- git commit -m "feat: add --verbose flag for detailed output"
225
- git commit -m "fix: handle empty query gracefully"
226
- git commit -m "docs: update installation instructions"
227
- ```
228
-
229
- ## License
230
-
231
- MIT © [Rika Labs](https://github.com/Rika-Labs)
82
+ ---
232
83
 
233
- See [LICENSE](LICENSE) for details.
84
+ [Contributing](CONTRIBUTING.md) · [MIT License](LICENSE)
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env bun
1
2
  // @bun
2
3
  var __create = Object.create;
3
4
  var __getProtoOf = Object.getPrototypeOf;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rikalabs/parallel",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A Unix-friendly CLI for the Parallel Search and Extract APIs",
5
5
  "keywords": [
6
6
  "parallel",