--- name: unicli-oneshot description: > Quick single-command adapter generation for unicli. Use when you need to create a one-off command for a specific URL and goal — 4 steps done. --- # unicli One-Shot Adapter Generate a single unicli command from a URL + goal in 4 steps. ## Process ### Step 1: Open the Page ```bash unicli operate open "" unicli operate state ``` ### Step 2: Discover the API Open browser DevTools Network tab. Look for XHR/Fetch requests that return JSON data matching your goal. Key signals: - `/api/` or `/v1/` in URL → REST endpoint - JSON response with array of items → listable data - Query parameters → filterable ### Step 3: Write the YAML Create `src/adapters//.yaml`: ```yaml site: name: description: type: web-api strategy: public # or cookie if auth needed pipeline: - fetch: url: params: - select: - map: title: ${{ item.title }} # ... map fields columns: [title, ...] ``` ### Step 4: Test ```bash npm run dev -- npm run dev -- -f json ``` Done. One YAML file, one command, zero code.