@lunchflow/actual-flow 0.0.2 → 0.0.4
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/README.md +14 -133
- package/demo.cast +981 -0
- package/dist/actual-budget-client.d.ts.map +1 -1
- package/dist/actual-budget-client.js +20 -2
- package/dist/actual-budget-client.js.map +1 -1
- package/dist/importer.d.ts.map +1 -1
- package/dist/importer.js +43 -6
- package/dist/importer.js.map +1 -1
- package/dist/transaction-mapper.d.ts.map +1 -1
- package/dist/transaction-mapper.js +1 -0
- package/dist/transaction-mapper.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +9 -6
- package/dist/ui.js.map +1 -1
- package/package.json +9 -6
- package/src/actual-budget-client.ts +24 -2
- package/src/importer.ts +48 -7
- package/src/transaction-mapper.ts +1 -0
- package/src/types.ts +1 -0
- package/src/ui.ts +9 -6
- package/pnpm-workspace.yaml +0 -2
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
A TypeScript tool that imports transactions from Lunch Flow to Actual Budget with an intuitive terminal UI for configuration and account mapping.
|
|
4
4
|
|
|
5
|
+
## Demo
|
|
6
|
+
|
|
7
|
+
[](https://asciinema.org/a/gGd65kHnllxQNIk7umbonU324)
|
|
8
|
+
|
|
5
9
|
## Features
|
|
6
10
|
|
|
7
11
|
- 🔗 **Easy Setup**: Simple configuration process for both Lunch Flow and Actual Budget connections
|
|
@@ -14,35 +18,16 @@ A TypeScript tool that imports transactions from Lunch Flow to Actual Budget wit
|
|
|
14
18
|
|
|
15
19
|
## Installation
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- Node.js 16+
|
|
20
|
-
- TypeScript
|
|
21
|
-
- Lunch Flow API access
|
|
22
|
-
- Actual Budget instance
|
|
23
|
-
|
|
24
|
-
### Quick Install
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# Clone or download this repository
|
|
28
|
-
git clone <repository-url>
|
|
29
|
-
cd lunch-flow-actual-importer
|
|
21
|
+
A simple command to install!
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
# Build the project
|
|
35
|
-
pnpm run build
|
|
36
|
-
|
|
37
|
-
# Run the importer
|
|
38
|
-
pnpm start
|
|
23
|
+
```
|
|
24
|
+
npx @lunchflow/actual-flow
|
|
39
25
|
```
|
|
40
26
|
|
|
41
|
-
|
|
27
|
+
or using pnpm
|
|
42
28
|
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
pnpm run dev
|
|
29
|
+
```
|
|
30
|
+
pnpm dlx @lunchflow/actual-flow
|
|
46
31
|
```
|
|
47
32
|
|
|
48
33
|
## Configuration
|
|
@@ -82,114 +67,10 @@ When configuring account mappings, you'll see:
|
|
|
82
67
|
|
|
83
68
|
### Transaction Import
|
|
84
69
|
|
|
85
|
-
1.
|
|
86
|
-
2.
|
|
87
|
-
3.
|
|
88
|
-
4.
|
|
89
|
-
5. Automatic deduplication prevents importing existing transactions
|
|
90
|
-
|
|
91
|
-
## API Requirements
|
|
92
|
-
|
|
93
|
-
### Lunch Flow API
|
|
94
|
-
|
|
95
|
-
The tool expects the following Lunch Flow API endpoints:
|
|
96
|
-
|
|
97
|
-
- `GET /accounts` - List accounts
|
|
98
|
-
- `GET /transactions` - List transactions with optional filters
|
|
99
|
-
|
|
100
|
-
Expected response format:
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"accounts": [
|
|
104
|
-
{
|
|
105
|
-
"id": "account_id",
|
|
106
|
-
"name": "Account Name",
|
|
107
|
-
"type": "checking",
|
|
108
|
-
"balance": 1000.00,
|
|
109
|
-
"currency": "USD"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Actual Budget API
|
|
116
|
-
|
|
117
|
-
Uses the official `@actual-app/api` package for Actual Budget integration. The API works by:
|
|
118
|
-
|
|
119
|
-
1. **Connecting to your Actual Budget server** - Downloads budget data to local cache
|
|
120
|
-
2. **Using proper amount conversion** - Converts between decimal amounts (123.45) and integer format (12345) that Actual uses internally
|
|
121
|
-
3. **Batch transaction import** - Uses `addTransactions` for efficient bulk imports
|
|
122
|
-
4. **Local data caching** - Stores budget data in `./actual-data/` directory for faster access
|
|
123
|
-
|
|
124
|
-
For more details, see the [Actual Budget API documentation](https://actualbudget.org/docs/api/).
|
|
125
|
-
|
|
126
|
-
## Development
|
|
127
|
-
|
|
128
|
-
### Project Structure
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
src/
|
|
132
|
-
├── index.ts # Main entry point
|
|
133
|
-
├── importer.ts # Main importer class
|
|
134
|
-
├── lunch-flow-client.ts # Lunch Flow API client
|
|
135
|
-
├── actual-budget-client.ts # Actual Budget API client
|
|
136
|
-
├── transaction-mapper.ts # Transaction mapping logic
|
|
137
|
-
├── config-manager.ts # Configuration management
|
|
138
|
-
├── ui.ts # Terminal UI components
|
|
139
|
-
└── types.ts # TypeScript type definitions
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Building
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
# Development mode
|
|
146
|
-
pnpm run dev
|
|
147
|
-
|
|
148
|
-
# Build for production
|
|
149
|
-
pnpm run build
|
|
150
|
-
|
|
151
|
-
# Run built version
|
|
152
|
-
pnpm start
|
|
153
|
-
|
|
154
|
-
# Clean build artifacts
|
|
155
|
-
pnpm run clean
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Troubleshooting
|
|
159
|
-
|
|
160
|
-
### Common Issues
|
|
161
|
-
|
|
162
|
-
1. **Connection Failed**: Verify your API credentials and network connectivity
|
|
163
|
-
2. **No Accounts Found**: Ensure your Lunch Flow account has accounts and your Actual Budget budget is properly set up
|
|
164
|
-
3. **Import Failed**: Check that account mappings are configured and transactions are within the selected date range
|
|
165
|
-
|
|
166
|
-
### Debug Mode
|
|
167
|
-
|
|
168
|
-
Run with debug logging:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
DEBUG=* pnpm start
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Contributing
|
|
175
|
-
|
|
176
|
-
1. Fork the repository
|
|
177
|
-
2. Create a feature branch
|
|
178
|
-
3. Make your changes
|
|
179
|
-
4. Add tests if applicable
|
|
180
|
-
5. Submit a pull request
|
|
181
|
-
|
|
182
|
-
## License
|
|
183
|
-
|
|
184
|
-
MIT License - see LICENSE file for details.
|
|
185
|
-
|
|
186
|
-
## Support
|
|
187
|
-
|
|
188
|
-
For issues and questions:
|
|
189
|
-
|
|
190
|
-
1. Check the troubleshooting section
|
|
191
|
-
2. Review the GitHub issues
|
|
192
|
-
3. Create a new issue with detailed information
|
|
70
|
+
1. Review a preview of transactions to be imported
|
|
71
|
+
2. Confirm the import
|
|
72
|
+
3. Monitor progress with real-time feedback
|
|
73
|
+
4. Automatic deduplication prevents importing existing transactions
|
|
193
74
|
|
|
194
75
|
---
|
|
195
76
|
|