@zibby/skills 0.1.10 → 0.1.12
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.
- package/dist/function-skill.js +1 -1
- package/dist/index.js +4 -4
- package/dist/package.json +3 -3
- package/dist/skill-installer.js +1 -1
- package/dist/test-runner.js +1 -1
- package/docs/cli-reference.md +120 -256
- package/docs/cloning-repositories.md +2 -2
- package/docs/cloud/bundles.md +92 -0
- package/docs/cloud/dedicated-egress.md +140 -0
- package/docs/cloud/env-vars.md +144 -0
- package/docs/cloud/limits.md +81 -0
- package/docs/cloud/logs.md +104 -0
- package/docs/cloud/triggering.md +114 -0
- package/docs/concepts/agents.md +112 -0
- package/docs/concepts/graph.md +83 -0
- package/docs/concepts/sessions.md +70 -0
- package/docs/concepts/skills.md +84 -0
- package/docs/concepts/state.md +106 -0
- package/docs/get-started/deploy.md +75 -0
- package/docs/get-started/install.md +58 -0
- package/docs/get-started/run-locally.md +94 -0
- package/docs/get-started/trigger-and-logs.md +90 -0
- package/docs/get-started/your-first-workflow.md +66 -0
- package/docs/intro.md +37 -65
- package/docs/legacy/test-automation.md +110 -0
- package/docs/packages/agent-workflow.md +88 -0
- package/docs/packages/cli.md +42 -207
- package/docs/packages/core.md +40 -224
- package/docs/recipes/index.md +62 -0
- package/docs/recipes/test.md +154 -0
- package/package.json +3 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
title: 2. Your first workflow
|
|
4
|
+
pagination_prev: get-started/install
|
|
5
|
+
pagination_next: get-started/run-locally
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Scaffold a workflow
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
zibby workflow new my-pipeline
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This creates:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
.zibby/workflows/my-pipeline/
|
|
18
|
+
├── graph.mjs # the workflow definition (entry point)
|
|
19
|
+
├── nodes/
|
|
20
|
+
│ └── example.mjs # a sample node
|
|
21
|
+
├── package.json # workflow's own deps (each workflow is a self-contained npm project)
|
|
22
|
+
└── workflow.json # manifest (workflow name, entry class)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If `.zibby/workflows/` doesn't exist yet, the scaffold creates it. If you have a `.zibby.config.mjs` with a custom `paths.workflows`, the scaffold respects it.
|
|
26
|
+
|
|
27
|
+
The first time you run this in a fresh directory, you'll be asked where to keep workflows (default: `.zibby/workflows`). The CLI also runs `npm install` inside the new workflow folder so deps are ready.
|
|
28
|
+
|
|
29
|
+
## What's in graph.mjs
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { z } from '@zibby/core';
|
|
33
|
+
import { WorkflowAgent, WorkflowGraph } from '@zibby/agent-workflow';
|
|
34
|
+
import { exampleNode } from './nodes/example.mjs';
|
|
35
|
+
|
|
36
|
+
export class MyPipelineWorkflow extends WorkflowAgent {
|
|
37
|
+
buildGraph() {
|
|
38
|
+
const graph = new WorkflowGraph();
|
|
39
|
+
|
|
40
|
+
graph.addNode('example', {
|
|
41
|
+
prompt: exampleNode.prompt,
|
|
42
|
+
outputSchema: z.object({
|
|
43
|
+
summary: z.string(),
|
|
44
|
+
status: z.enum(['ok', 'warn', 'error']),
|
|
45
|
+
}),
|
|
46
|
+
agent: 'cursor', // per-node agent override
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
graph.setEntryPoint('example');
|
|
50
|
+
return graph;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The shape is:
|
|
56
|
+
|
|
57
|
+
- `graph.addNode(name, config)` — register a node. `prompt` becomes the agent's input; `outputSchema` (Zod) defines the contract for what comes back.
|
|
58
|
+
- `graph.addEdge(from, to)` — wire two nodes together.
|
|
59
|
+
- `graph.addConditionalEdges(from, fn)` — branch on state.
|
|
60
|
+
- `graph.setEntryPoint(name)` — first node to run.
|
|
61
|
+
|
|
62
|
+
## Picking the agent
|
|
63
|
+
|
|
64
|
+
Each node can specify its own agent via `agent: 'cursor' | 'claude' | 'codex' | 'gemini' | 'assistant'`. If you omit it, the workflow falls back to the project default (set in `.zibby.config.mjs` or `AGENT_TYPE` env var).
|
|
65
|
+
|
|
66
|
+
→ Next: [Run it locally](./run-locally)
|
package/docs/intro.md
CHANGED
|
@@ -2,86 +2,58 @@
|
|
|
2
2
|
slug: /
|
|
3
3
|
sidebar_position: 1
|
|
4
4
|
title: Introduction
|
|
5
|
+
pagination_next: get-started/install
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Zibby
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
**The cloud pipeline for Claude Code, Cursor, Codex, and Gemini.** Compose them into structured workflows with Zod-validated handoff between nodes. Vendor-neutral. JavaScript-first.
|
|
10
11
|
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -g @zibby/cli
|
|
15
|
-
echo "Go to example.com and verify the page title" > test.txt
|
|
16
|
-
zibby test test.txt --agent cursor
|
|
17
12
|
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
14
|
+
trigger → │ plan │ → │ implement│ → │ verify │ → result
|
|
15
|
+
│ (claude) │ │ (cursor) │ │ (codex) │
|
|
16
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
17
|
+
│ │ │
|
|
18
|
+
Zod out Zod out Zod out
|
|
23
19
|
```
|
|
24
|
-
Plain Text Spec → AI Agent → Browser Automation → Video + Playwright Script
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
1. **Write a test spec** — plain text describing what to test
|
|
28
|
-
2. **Run it** — `zibby test spec.txt` launches an AI agent (Cursor, Claude, or Codex)
|
|
29
|
-
3. **AI drives the browser** — navigates, clicks, fills forms, asserts results
|
|
30
|
-
4. **Get artifacts** — video recording, action timeline, generated Playwright script
|
|
31
|
-
5. **Upload to cloud** (optional) — review results in the [Zibby dashboard](https://zibby.app)
|
|
32
|
-
|
|
33
|
-
## Architecture
|
|
34
|
-
|
|
35
|
-
Zibby is a monorepo with five published npm packages, each with a distinct responsibility:
|
|
36
|
-
|
|
37
|
-
| Package | Version | Description |
|
|
38
|
-
|---|---|---|
|
|
39
|
-
| [`@zibby/cli`](https://www.npmjs.com/package/@zibby/cli) | 0.1.27 | CLI entry point — the `zibby` command. Orchestrates runs, init, login, uploads, and workflow management. |
|
|
40
|
-
| [`@zibby/core`](https://www.npmjs.com/package/@zibby/core) | 0.1.22 | Core engine — workflow graph runtime, agent strategy framework, graph compiler, state management, and template workflows. |
|
|
41
|
-
| [`@zibby/skills`](https://www.npmjs.com/package/@zibby/skills) | 0.1.4 | Skill catalog — built-in skill definitions (Browser, Jira, GitHub, Slack, Memory) plus the `skill()` factory for custom MCP and function skills. |
|
|
42
|
-
| [`@zibby/memory`](https://www.npmjs.com/package/@zibby/memory) | 0.1.4 | Test memory database — version-controlled (Dolt-backed) knowledge base that learns from every run. Stores selectors, page models, navigation patterns, and insights. |
|
|
43
|
-
| [`@zibby/mcp-browser`](https://www.npmjs.com/package/@zibby/mcp-browser) | 0.1.6 | Browser MCP server — wrapper around `@playwright/mcp` with stable ID injection, event recording, and session-aware video capture. |
|
|
44
20
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Run tests locally, get generated Playwright scripts:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
zibby test test-specs/login.txt --agent cursor
|
|
21
|
+
```js
|
|
22
|
+
graph
|
|
23
|
+
.addNode('plan', { prompt, outputSchema: Plan, agent: 'claude' })
|
|
24
|
+
.addNode('implement', { prompt, outputSchema: Diff, agent: 'cursor' })
|
|
25
|
+
.addNode('verify', { prompt, outputSchema: Result, agent: 'codex' });
|
|
55
26
|
```
|
|
56
27
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Upload results to the dashboard for video replay, team sharing, and CI integration:
|
|
28
|
+
## Try it now
|
|
60
29
|
|
|
61
30
|
```bash
|
|
62
|
-
|
|
63
|
-
|
|
31
|
+
npm install -g @zibby/cli
|
|
32
|
+
zibby workflow new my-pipeline # scaffold
|
|
33
|
+
zibby workflow run my-pipeline # run locally (one-shot)
|
|
64
34
|
|
|
65
|
-
|
|
35
|
+
zibby login
|
|
36
|
+
zibby workflow deploy my-pipeline # ship to cloud
|
|
37
|
+
zibby workflow trigger <uuid> -t # fire + tail logs
|
|
38
|
+
```
|
|
66
39
|
|
|
67
|
-
|
|
40
|
+
→ Next: [Install](./get-started/install)
|
|
68
41
|
|
|
69
|
-
|
|
70
|
-
|---|---|---|---|
|
|
71
|
-
| **Cursor** | Cursor IDE | Uses Cursor's built-in agent with MCP tool access | Install [Cursor](https://cursor.com) or set `CURSOR_API_KEY` |
|
|
72
|
-
| **Claude** | Anthropic | Uses Claude Agent SDK with native MCP integration | Set `ANTHROPIC_API_KEY` in `.env` |
|
|
73
|
-
| **Codex** | OpenAI | Uses Codex SDK with full tool/file/bash access | Install `@openai/codex` CLI + set `OPENAI_API_KEY` |
|
|
42
|
+
## What you get
|
|
74
43
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
```
|
|
44
|
+
- **Multi-vendor** — mix Claude Code + Codex + Cursor + Gemini in one pipeline. Anthropic will never help you orchestrate Codex; multi-vendor neutrality is structural.
|
|
45
|
+
- **Schema-enforced handoff** — Zod validates every node's output before the next runs. No prompt-stuffing.
|
|
46
|
+
- **Run anywhere** — local with hot reload, or cloud with Heroku-style bundles (~3s cold start).
|
|
47
|
+
- **Session replay** — every run lands as on-disk JSONL + artifacts. Re-run any node via `--session <id> --node <name>`.
|
|
48
|
+
- **Cloud-native** — SSE log streaming, dedicated egress IPs for firewalled GitLab / GitHub Enterprise / Salesforce.
|
|
81
49
|
|
|
82
|
-
##
|
|
50
|
+
## How it compares
|
|
83
51
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
52
|
+
| | Zibby | Claude Code Agent Teams | Devin | Mastra / LangGraph / CrewAI |
|
|
53
|
+
|---|---|---|---|---|
|
|
54
|
+
| Wraps real coding-agent CLIs | ✅ Claude + Codex + Cursor + Gemini | ❌ Claude only | ❌ proprietary agent | ❌ wraps LLM APIs |
|
|
55
|
+
| Multi-vendor | ✅ | ❌ | ❌ | N/A |
|
|
56
|
+
| Cloud-hosted | ✅ | ❌ local IDE | ✅ | varies |
|
|
57
|
+
| Schema-enforced handoff | ✅ Zod | ❌ free-form | proprietary | ✅ |
|
|
58
|
+
| Session replay | ✅ on-disk JSONL | ❌ | partial | partial |
|
|
59
|
+
| Static egress IP | ✅ addon | ❌ | ❌ | ❌ |
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
title: Test automation (legacy)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test automation (legacy)
|
|
7
|
+
|
|
8
|
+
> **The `zibby test` flow predates the workflow engine.** It still works, but new users should start with [Get Started](/get-started/install) — the workflow engine is the headline product. This page is kept for users with existing test-automation pipelines.
|
|
9
|
+
|
|
10
|
+
Drive a real browser from a plain-text spec, get a Playwright script back.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Node.js 18 or later
|
|
15
|
+
- [Cursor](https://cursor.com) IDE installed (for `--agent cursor`), **or** an Anthropic API key (for `--agent claude`), **or** OpenAI API key + Codex CLI (for `--agent codex`)
|
|
16
|
+
|
|
17
|
+
## Option A: Zero Setup (npx)
|
|
18
|
+
|
|
19
|
+
No install needed — run directly:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
echo "Go to example.com and verify the page title says Example Domain" > test.txt
|
|
23
|
+
npx @zibby/cli run test.txt --agent cursor
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Option B: Global Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g @zibby/cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 1. Create a test spec
|
|
33
|
+
|
|
34
|
+
Create a plain-text file with your test instructions:
|
|
35
|
+
|
|
36
|
+
```text title="test-specs/login.txt"
|
|
37
|
+
1. Navigate to https://myapp.com/login
|
|
38
|
+
2. Enter email: test@example.com
|
|
39
|
+
3. Enter password: TestPass123
|
|
40
|
+
4. Click the Sign In button
|
|
41
|
+
5. Verify the dashboard page loads
|
|
42
|
+
6. Verify the user's name appears in the header
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Run it
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
zibby test test-specs/login.txt --agent cursor
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
You'll see:
|
|
52
|
+
- A browser window open
|
|
53
|
+
- The AI agent navigate and interact with your app
|
|
54
|
+
- A generated Playwright script saved to `tests/`
|
|
55
|
+
|
|
56
|
+
### 3. Run the generated test
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx playwright test tests/login.spec.js
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Customizing Your Setup (Optional)
|
|
63
|
+
|
|
64
|
+
If you want to customize the workflow, config, or nodes:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
zibby init --agent cursor
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This scaffolds:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
.zibby.config.js # Project configuration (ESM)
|
|
74
|
+
.zibby/
|
|
75
|
+
├── graph.js # Workflow definition (customizable)
|
|
76
|
+
├── nodes/ # Node implementations
|
|
77
|
+
│ ├── execute-live.js
|
|
78
|
+
│ ├── generate-script.js
|
|
79
|
+
│ └── preflight.js
|
|
80
|
+
└── result-handler.js # Post-execution hooks
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Without `zibby init`, the CLI uses the built-in default workflow automatically.
|
|
84
|
+
|
|
85
|
+
## Environment Variables
|
|
86
|
+
|
|
87
|
+
| Variable | When needed |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `CURSOR_API_KEY` | CI/CD with `--agent cursor` (locally uses Cursor IDE credentials) |
|
|
90
|
+
| `ANTHROPIC_API_KEY` | Using `--agent claude` |
|
|
91
|
+
| `OPENAI_API_KEY` | Using `--agent codex` |
|
|
92
|
+
| `ZIBBY_API_KEY` | Cloud sync (`--sync` flag) |
|
|
93
|
+
|
|
94
|
+
For local development, add these to a `.env` file in your project root.
|
|
95
|
+
|
|
96
|
+
## Cloud Sync (Optional)
|
|
97
|
+
|
|
98
|
+
To upload results to the [Zibby dashboard](https://zibby.app):
|
|
99
|
+
|
|
100
|
+
1. Create an account at [zibby.app](https://zibby.app)
|
|
101
|
+
2. Get your API key from **Project Settings**
|
|
102
|
+
3. Add to `.env`: `ZIBBY_API_KEY=zby_your_key_here`
|
|
103
|
+
4. Login: `zibby login`
|
|
104
|
+
5. Run with sync: `zibby test test-specs/login.txt --sync`
|
|
105
|
+
|
|
106
|
+
## Next Steps
|
|
107
|
+
|
|
108
|
+
- [Installation](/installation) — detailed setup and configuration
|
|
109
|
+
- [Running Tests](/running-tests) — all run modes and options
|
|
110
|
+
- [CLI Reference](/cli-reference) — every command and flag
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
title: '@zibby/agent-workflow'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @zibby/agent-workflow
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/@zibby/agent-workflow)
|
|
9
|
+
[](https://github.com/ZibbyHQ/agent-workflow)
|
|
10
|
+
[](https://github.com/ZibbyHQ/agent-workflow/blob/main/LICENSE)
|
|
11
|
+
|
|
12
|
+
The graph engine itself. Zero agent strategies, zero skills bundled — bring your own. This is the package you'd depend on if you want to embed the workflow runtime in your own app without the rest of the Zibby ecosystem.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @zibby/agent-workflow
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## What's in it
|
|
19
|
+
|
|
20
|
+
| Export | Purpose |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `WorkflowGraph` | The graph builder. `addNode`, `addEdge`, `addConditionalEdges`, `setEntryPoint`, `run`. |
|
|
23
|
+
| `WorkflowAgent` | Base class your `graph.mjs` exports — has `buildGraph()`. |
|
|
24
|
+
| `Node`, `ConditionalNode` | Internal node classes (rarely used directly). |
|
|
25
|
+
| `WorkflowState` | History-tracked state passed between nodes. |
|
|
26
|
+
| `AgentStrategy` | Base class for custom agent strategies. |
|
|
27
|
+
| `registerStrategy`, `listStrategies`, `getAgentStrategy`, `invokeAgent` | Strategy registry. |
|
|
28
|
+
| `registerSkill`, `getSkill`, `hasSkill`, `getAllSkills` | Skill registry. |
|
|
29
|
+
| `compileGraph` | Build a graph from a JSON config (the format Studio writes). |
|
|
30
|
+
| `ContextLoader` | Walks the spec dir for `CONTEXT.md` / `AGENTS.md` and merges into state. |
|
|
31
|
+
| `timeline`, `WORKFLOW_GRAPH_LOG_MARKER_PREFIX` | CLI progress UX + structured markers consumed by Studio. |
|
|
32
|
+
|
|
33
|
+
## Standalone usage
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import { WorkflowGraph, AgentStrategy, registerStrategy } from '@zibby/agent-workflow';
|
|
37
|
+
import { z } from 'zod';
|
|
38
|
+
|
|
39
|
+
class FakeAgent extends AgentStrategy {
|
|
40
|
+
constructor() { super('fake', 'demo', 0); }
|
|
41
|
+
canHandle() { return true; }
|
|
42
|
+
async invoke(prompt, { schema }) {
|
|
43
|
+
return { raw: 'ok', structured: schema.parse({ summary: 'hello' }) };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
registerStrategy(new FakeAgent());
|
|
47
|
+
|
|
48
|
+
const graph = new WorkflowGraph()
|
|
49
|
+
.addNode('plan', {
|
|
50
|
+
prompt: 'List 3 tasks for: {{input.goal}}',
|
|
51
|
+
outputSchema: z.object({ summary: z.string() }),
|
|
52
|
+
agent: 'fake',
|
|
53
|
+
})
|
|
54
|
+
.setEntryPoint('plan');
|
|
55
|
+
|
|
56
|
+
const { state } = await graph.run(null, {
|
|
57
|
+
input: { goal: 'add dark mode' },
|
|
58
|
+
agentType: 'fake',
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
console.log(state.plan.summary); // → 'hello'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## What it is *not*
|
|
65
|
+
|
|
66
|
+
`@zibby/agent-workflow` is **just the engine**. It does not:
|
|
67
|
+
|
|
68
|
+
- Ship any agent strategies (no Claude/Cursor/Codex/Gemini implementations)
|
|
69
|
+
- Ship any skills (no Browser/Jira/GitHub MCP)
|
|
70
|
+
- Provide a CLI
|
|
71
|
+
|
|
72
|
+
For the batteries-included experience, use `@zibby/cli` + `@zibby/core` + `@zibby/skills`. For an embeddable engine, this package alone is enough.
|
|
73
|
+
|
|
74
|
+
## Public protocol surface (stable)
|
|
75
|
+
|
|
76
|
+
These constants are part of the public contract and consumed by Zibby Studio + tooling. They won't break across minor versions:
|
|
77
|
+
|
|
78
|
+
- `WORKFLOW_GRAPH_LOG_MARKER_PREFIX` (`__WORKFLOW_GRAPH_LOG__`)
|
|
79
|
+
- `STUDIO_STOP_REQUEST_FILE` (`.zibby-studio-stop`)
|
|
80
|
+
- `ZIBBY_RUN_SOURCE=studio` env trigger
|
|
81
|
+
- `stoppedByStudio: true` return key
|
|
82
|
+
- Marker payload `{ phase: 'node_begin' | 'node_end', node: string }`
|
|
83
|
+
|
|
84
|
+
## Source
|
|
85
|
+
|
|
86
|
+
- npm: [`@zibby/agent-workflow`](https://www.npmjs.com/package/@zibby/agent-workflow)
|
|
87
|
+
- GitHub (public, MIT): [ZibbyHQ/agent-workflow](https://github.com/ZibbyHQ/agent-workflow)
|
|
88
|
+
- Examples: [01-hello-world](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/01-hello-world) · [02-pipeline](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/02-pipeline) · [03-conditional-routing](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/03-conditional-routing) · [04-custom-agent](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/04-custom-agent) · [05-with-skills](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/05-with-skills)
|
package/docs/packages/cli.md
CHANGED
|
@@ -1,238 +1,73 @@
|
|
|
1
1
|
---
|
|
2
|
-
sidebar_position:
|
|
3
|
-
title:
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
title: '@zibby/cli'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# @zibby/cli
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
[](https://www.npmjs.com/package/@zibby/cli)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
npm install -g @zibby/cli
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## What It Does
|
|
15
|
-
|
|
16
|
-
`@zibby/cli` is the only package most users install. It provides:
|
|
17
|
-
|
|
18
|
-
- **`zibby run`** — execute test specs with AI agents
|
|
19
|
-
- **`zibby init`** — scaffold a customizable workflow
|
|
20
|
-
- **`zibby login/logout/status`** — authentication
|
|
21
|
-
- **`zibby upload`** — push existing artifacts to Zibby Cloud
|
|
22
|
-
- **`zibby workflow`** — download/upload/list workflow graphs
|
|
23
|
-
- **`zibby setup-playwright`** — configure Playwright MCP
|
|
24
|
-
- **`zibby ci-setup`** — configure for CI/CD pipelines
|
|
25
|
-
- **`zibby memory`** — memory database management
|
|
26
|
-
- **`zibby video`** — organize test video files
|
|
27
|
-
|
|
28
|
-
## Quick Usage
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Zero setup — run immediately
|
|
32
|
-
echo "Go to example.com and verify the page title" > test.txt
|
|
33
|
-
zibby run test.txt --agent cursor
|
|
34
|
-
|
|
35
|
-
# Or with npx (no install)
|
|
36
|
-
npx @zibby/cli run test.txt --agent cursor
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Commands
|
|
40
|
-
|
|
41
|
-
### `zibby run [spec-path]`
|
|
42
|
-
|
|
43
|
-
Run a test specification.
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
# Local test spec
|
|
47
|
-
zibby run test-specs/login.txt --agent cursor
|
|
48
|
-
|
|
49
|
-
# With cloud sync
|
|
50
|
-
zibby run test-specs/login.txt --sync
|
|
51
|
-
|
|
52
|
-
# Cloud test cases
|
|
53
|
-
zibby run --sources TC001,TC002 --execution abc123
|
|
54
|
-
|
|
55
|
-
# Specific workflow
|
|
56
|
-
zibby run test.txt --workflow QuickSmokeWorkflow
|
|
57
|
-
|
|
58
|
-
# Single node (debugging)
|
|
59
|
-
zibby run test.txt --node execute_live --session last
|
|
60
|
-
|
|
61
|
-
# Headless (CI/CD)
|
|
62
|
-
zibby run test.txt --headless --auto-approve
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
| Flag | Description |
|
|
66
|
-
|---|---|
|
|
67
|
-
| `--agent <type>` | `cursor`, `claude`, or `codex` |
|
|
68
|
-
| `--workflow <name>` | Named workflow (e.g., `QuickSmokeWorkflow`, `quick-smoke`) |
|
|
69
|
-
| `--headless` | Headless browser mode |
|
|
70
|
-
| `--node <name>` | Run a single node (`preflight`, `execute_live`, `generate_script`) |
|
|
71
|
-
| `--session <id>` | Reuse session (`last` for most recent) — requires `--node` |
|
|
72
|
-
| `--sources <ids>` | Comma-separated cloud test case IDs |
|
|
73
|
-
| `--execution <id>` | Execution ID (with `--sources`) |
|
|
74
|
-
| `--project <id>` | Project ID |
|
|
75
|
-
| `--collection <name>` | Collection to organize the run |
|
|
76
|
-
| `--folder <path>` | Folder within collection |
|
|
77
|
-
| `--sync` | Upload results to cloud |
|
|
78
|
-
| `--no-sync` | Skip cloud upload |
|
|
79
|
-
| `--config <path>` | Config file path (default: `.zibby.config.js`) |
|
|
80
|
-
| `--auto-approve` | Auto-approve MCP tool calls (CI/CD) |
|
|
81
|
-
| `-o, --open` | Open dashboard after upload |
|
|
82
|
-
| `--verbose` | Info-level logs |
|
|
83
|
-
| `--debug` | Full debug logs |
|
|
84
|
-
|
|
85
|
-
### `zibby init [project-name]`
|
|
86
|
-
|
|
87
|
-
Scaffold a Zibby project with config and workflow files.
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
zibby init
|
|
91
|
-
zibby init my-project --agent cursor --cloud-sync
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
| Flag | Description |
|
|
95
|
-
|---|---|
|
|
96
|
-
| `--agent <type>` | `cursor`, `claude`, or `codex` |
|
|
97
|
-
| `--cloud-sync` | Enable cloud sync |
|
|
98
|
-
| `--headless` / `--headed` | Browser mode |
|
|
99
|
-
| `--skip-install` | Skip `npm install` |
|
|
100
|
-
| `-f, --force` | Overwrite existing config |
|
|
101
|
-
| `--mem` | Initialize memory database |
|
|
102
|
-
|
|
103
|
-
Creates:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
.zibby.config.js
|
|
107
|
-
.zibby/
|
|
108
|
-
├── graph.js
|
|
109
|
-
├── nodes/
|
|
110
|
-
│ ├── preflight.js
|
|
111
|
-
│ ├── execute-live.js
|
|
112
|
-
│ └── generate-script.js
|
|
113
|
-
└── result-handler.js
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### `zibby login` / `zibby logout` / `zibby status`
|
|
10
|
+
The user-facing entry point — the `zibby` command. Install once globally; it pulls in `@zibby/core`, `@zibby/agent-workflow`, `@zibby/skills` automatically.
|
|
117
11
|
|
|
118
12
|
```bash
|
|
119
|
-
|
|
120
|
-
zibby
|
|
121
|
-
zibby status # Show auth status
|
|
122
|
-
zibby status --json # Machine-readable
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### `zibby upload <spec-path>`
|
|
126
|
-
|
|
127
|
-
Upload existing test artifacts to Zibby Cloud.
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
zibby upload test-specs/login.txt --collection "Auth Tests"
|
|
13
|
+
npm install -g @zibby/cli
|
|
14
|
+
zibby --version
|
|
131
15
|
```
|
|
132
16
|
|
|
133
|
-
|
|
17
|
+
## What it does
|
|
134
18
|
|
|
135
|
-
|
|
19
|
+
- **Scaffolds** workflows: `zibby workflow new <name>`
|
|
20
|
+
- **Runs** workflows locally (one-shot): `zibby workflow run <name>`
|
|
21
|
+
- **Deploys** to Zibby Cloud (Heroku-style bundles): `zibby workflow deploy <name>`
|
|
22
|
+
- **Triggers** deployed workflows: `zibby workflow trigger <uuid>`
|
|
23
|
+
- **Tails** logs: `zibby workflow logs <uuid> -t`
|
|
24
|
+
- **Manages** auth: `zibby login`, `zibby logout`, `zibby status`
|
|
136
25
|
|
|
137
|
-
|
|
138
|
-
zibby workflow list
|
|
139
|
-
zibby workflow download --type run_test
|
|
140
|
-
zibby workflow upload --type analysis --file .zibby/workflow-analysis.json
|
|
141
|
-
```
|
|
26
|
+
The full command catalog lives at [CLI Reference](../cli-reference).
|
|
142
27
|
|
|
143
|
-
|
|
28
|
+
## Self-contained workflow projects
|
|
144
29
|
|
|
145
|
-
|
|
30
|
+
`zibby workflow new` creates a workflow as a **self-contained npm project** — its own `package.json`, its own `node_modules`. So a workflow can pull in arbitrary deps (PDF libraries, custom MCP servers, your own SDK) without polluting the parent project.
|
|
146
31
|
|
|
147
|
-
```bash
|
|
148
|
-
zibby setup-playwright
|
|
149
|
-
zibby setup-playwright --headed --viewport-width 1920 --viewport-height 1080
|
|
150
32
|
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
33
|
+
my-app/
|
|
34
|
+
├── package.json
|
|
35
|
+
├── src/
|
|
36
|
+
└── .zibby/
|
|
37
|
+
└── workflows/
|
|
38
|
+
└── my-pipeline/
|
|
39
|
+
├── package.json # workflow's own deps
|
|
40
|
+
├── node_modules/
|
|
41
|
+
├── graph.mjs
|
|
42
|
+
└── nodes/
|
|
160
43
|
```
|
|
161
44
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
Organize test videos — moves videos from `test-results/` to sit next to test files:
|
|
45
|
+
The cloud bundle build does the same — `npm install` runs *inside* the workflow folder, scoped to its own package.json.
|
|
165
46
|
|
|
166
|
-
|
|
167
|
-
zibby video
|
|
168
|
-
```
|
|
47
|
+
## Configuration
|
|
169
48
|
|
|
170
|
-
|
|
49
|
+
The CLI reads `.zibby.config.mjs` at the project root for defaults:
|
|
171
50
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
```bash
|
|
175
|
-
zibby list
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
## Configuration File
|
|
179
|
-
|
|
180
|
-
`.zibby.config.js` (or `.zibby.config.mjs`) in your project root:
|
|
181
|
-
|
|
182
|
-
```javascript
|
|
51
|
+
```js
|
|
52
|
+
// .zibby.config.mjs
|
|
183
53
|
export default {
|
|
184
|
-
agent: {
|
|
185
|
-
cursor: {
|
|
186
|
-
model: 'auto',
|
|
187
|
-
// Options: 'auto', 'opus-4.5', 'sonnet-4.5', 'composer-1',
|
|
188
|
-
// 'gpt-5.2-codex', 'gpt-5.2', 'gpt-5.3', 'gpt-5.4',
|
|
189
|
-
// 'gemini-3-pro', 'gemini-3-flash'
|
|
190
|
-
},
|
|
191
|
-
// claude: { model: 'auto' },
|
|
192
|
-
// codex: { model: 'gpt-5.2-codex' },
|
|
193
|
-
strictMode: false,
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
// Per-node model overrides
|
|
197
|
-
// models: {
|
|
198
|
-
// default: 'auto',
|
|
199
|
-
// execute_live: 'claude-opus-4',
|
|
200
|
-
// },
|
|
201
|
-
|
|
202
54
|
paths: {
|
|
203
|
-
|
|
204
|
-
generated: 'tests',
|
|
55
|
+
workflows: '.zibby/workflows', // override if you want a different folder
|
|
205
56
|
output: '.zibby/output',
|
|
206
57
|
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
58
|
+
agent: {
|
|
59
|
+
default: 'cursor', // fallback agent when no per-node override
|
|
60
|
+
},
|
|
61
|
+
models: {
|
|
62
|
+
default: 'auto',
|
|
63
|
+
execute_live: 'claude-opus-4.6', // per-node model override
|
|
213
64
|
},
|
|
214
|
-
|
|
215
|
-
video: 'on',
|
|
216
|
-
viewport: { width: 1280, height: 720 },
|
|
217
|
-
playwrightArtifacts: true,
|
|
218
|
-
cloudSync: false,
|
|
219
65
|
};
|
|
220
66
|
```
|
|
221
67
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
| Variable | Description |
|
|
225
|
-
|---|---|
|
|
226
|
-
| `CURSOR_API_KEY` | Cursor agent API key (required in CI, optional locally) |
|
|
227
|
-
| `ANTHROPIC_API_KEY` | Claude agent API key |
|
|
228
|
-
| `OPENAI_API_KEY` | Codex agent API key |
|
|
229
|
-
| `ZIBBY_API_KEY` | Project API key for cloud sync |
|
|
230
|
-
| `ZIBBY_USER_TOKEN` | Personal Access Token for CI/CD |
|
|
231
|
-
| `ZIBBY_ENV` | Environment override: `local`, `staging`, `prod` |
|
|
68
|
+
`zibby workflow deploy` resolves this file locally and ships the result as `zibby.config.json` inside the deploy bundle, so the cloud runtime sees the same `agent` block, per-node `models`, and other declarative knobs as your local runs. Function values are dropped at deploy time (config is data, not code) — if you need runtime variation in cloud, use [per-workflow env vars](../cloud/env-vars).
|
|
232
69
|
|
|
233
|
-
##
|
|
70
|
+
## Source
|
|
234
71
|
|
|
235
|
-
`@zibby/cli`
|
|
236
|
-
-
|
|
237
|
-
- `@zibby/skills` — skill catalog
|
|
238
|
-
- `@zibby/memory` — test memory
|
|
72
|
+
- npm: [`@zibby/cli`](https://www.npmjs.com/package/@zibby/cli)
|
|
73
|
+
- See [CLI Reference](../cli-reference) for every command + option
|