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