flowsfarm 0.1.0 → 0.1.2

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 +156 -0
  2. package/dist/index.js +59 -50
  3. package/package.json +6 -4
package/README.md ADDED
@@ -0,0 +1,156 @@
1
+ # FlowsFarm
2
+
3
+ Local-first workflow synchronization for n8n. Download, edit, and sync workflows with bi-directional sync and conflict detection.
4
+
5
+ ## Features
6
+
7
+ - **Local-first**: Workflows stored as JSON files you can edit, version control, and diff
8
+ - **Bi-directional sync**: Pull from n8n, push local changes back
9
+ - **Conflict detection**: Detects when both local and remote changed
10
+ - **Templates**: Save workflows as reusable templates
11
+ - **Multiple connections**: Manage workflows across multiple n8n instances
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ # Install globally
17
+ npm install -g flowsfarm
18
+
19
+ # Or with bun
20
+ bun install -g flowsfarm
21
+ ```
22
+
23
+ ### Claude Code Plugin
24
+
25
+ Install the FlowsFarm skill for Claude Code:
26
+
27
+ ```
28
+ /plugin marketplace add filipexyz/plugins
29
+ /plugin install flowsfarm@filipelabs
30
+ ```
31
+
32
+ This teaches Claude how to use FlowsFarm to manage your n8n workflows.
33
+
34
+ ### Development Setup
35
+
36
+ ```bash
37
+ git clone https://github.com/filipexyz/flowsfarm.git
38
+ cd flowsfarm
39
+ bun install
40
+ bun run cli --help
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ ```bash
46
+ # Initialize project
47
+ flowsfarm init
48
+
49
+ # Connect to n8n instance
50
+ flowsfarm connect add -n prod -u https://n8n.example.com -k YOUR_API_KEY
51
+
52
+ # Pull all workflows
53
+ flowsfarm pull
54
+
55
+ # List workflows
56
+ flowsfarm list
57
+
58
+ # View a workflow
59
+ flowsfarm show "My Workflow"
60
+
61
+ # Edit workflows in .flowsfarm/workflows/...
62
+
63
+ # Push changes back
64
+ flowsfarm push
65
+ ```
66
+
67
+ ## CLI Commands
68
+
69
+ ### Core Commands
70
+
71
+ | Command | Description |
72
+ |---------|-------------|
73
+ | `flowsfarm init` | Initialize FlowsFarm in current directory |
74
+ | `flowsfarm connect add -n <name> -u <url> -k <key>` | Add n8n connection |
75
+ | `flowsfarm connect list` | List connections |
76
+ | `flowsfarm pull` | Download workflows from n8n |
77
+ | `flowsfarm push` | Upload local changes to n8n |
78
+ | `flowsfarm status` | Show sync status |
79
+ | `flowsfarm diff` | Show differences between local and remote |
80
+
81
+ ### Workflow Commands
82
+
83
+ | Command | Description |
84
+ |---------|-------------|
85
+ | `flowsfarm list` | List all synced workflows |
86
+ | `flowsfarm list --json` | Output as JSON |
87
+ | `flowsfarm list --active` | Show only active workflows |
88
+ | `flowsfarm show <name-or-id>` | Show workflow details |
89
+ | `flowsfarm show <name> --json` | Output full workflow as JSON |
90
+ | `flowsfarm show <name> --nodes` | Show node parameters |
91
+ | `flowsfarm create <name>` | Create empty workflow |
92
+ | `flowsfarm create <name> -t <template>` | Create from template |
93
+
94
+ ### Template Commands
95
+
96
+ | Command | Description |
97
+ |---------|-------------|
98
+ | `flowsfarm templates` | List all templates |
99
+ | `flowsfarm templates show <name>` | Show template details |
100
+ | `flowsfarm templates save <workflow>` | Save workflow as template |
101
+ | `flowsfarm templates save <workflow> -n <name>` | Save with custom name |
102
+ | `flowsfarm templates delete <name>` | Delete template |
103
+
104
+ ## Project Structure
105
+
106
+ ```
107
+ your-project/
108
+ ├── .flowsfarm.json # Project config
109
+ └── .flowsfarm/
110
+ ├── flowsfarm.db # SQLite database (metadata)
111
+ ├── workflows/ # Synced workflow JSON files
112
+ │ └── <connection-id>/
113
+ │ └── <workflow-id>/
114
+ │ └── workflow.json
115
+ └── templates/ # Reusable templates
116
+ └── *.json
117
+ ```
118
+
119
+ ## Templates
120
+
121
+ Templates are JSON files in `.flowsfarm/templates/`. Save any synced workflow as a template:
122
+
123
+ ```bash
124
+ # Save a workflow as template
125
+ flowsfarm templates save "My Workflow" -n my-template
126
+
127
+ # Create new workflow from template
128
+ flowsfarm create "New Workflow" -t my-template
129
+ ```
130
+
131
+ Template format:
132
+ ```json
133
+ {
134
+ "name": "Template Name",
135
+ "description": "Optional description",
136
+ "nodes": [...],
137
+ "connections": {...}
138
+ }
139
+ ```
140
+
141
+ ## Sync Workflow
142
+
143
+ 1. **Pull** downloads workflows and stores them locally
144
+ 2. **Edit** JSON files directly or via n8n UI
145
+ 3. **Push** uploads your changes
146
+
147
+ Conflict detection kicks in when both local and remote have changed since last sync. Use `--force` to overwrite.
148
+
149
+ ## Requirements
150
+
151
+ - [Bun](https://bun.sh) runtime
152
+ - n8n instance with API access enabled
153
+
154
+ ## License
155
+
156
+ MIT