A command-line interface (CLI) tool for managing transactions between Edenred and Actual Budget APIs.
-
Clone the repository:
git clone https://github.com/yourusername/actual-edenred.git cd actual-edenred -
Install dependencies:
pnpm install
-
Build the project:
pnpm build
-
Copy the example environment file:
cp .env.example .env
-
Edit
.envwith your credentials:# Edenred API Credentials EDENRED_USERNAME=your_edenred_username EDENRED_PASSWORD=your_edenred_password # Actual Budget API Configuration ACTUAL_SERVER=https://your-actual-server.com ACTUAL_PASSWORD=your_actual_server_password ACTUAL_TMPFOLDER=/tmp/actual-data ACTUAL_BUDGET=your_budget_id # Optional: Enable debug logging DEBUG=false
Run commands directly without building:
pnpm dev list-cards
pnpm dev list-movements <cardname>
pnpm dev import <edenred_account> <actual_account>After building, run using the compiled JavaScript:
node dist/bin.js list-cards
node dist/bin.js list-movements <cardname>
node dist/bin.js import <edenred_account> <actual_account>Or install globally:
pnpm link --global
actual-edenred list-cardsList all credit cards associated with the Edenred account.
actual-edenred list-cardsList movements (transactions) of a specific credit card by name.
actual-edenred list-movements <cardname>Import transactions from Edenred API to Actual Budget API.
actual-edenred import <edenred_account> <actual_account><edenred_account>: Edenred account from which transactions will be fetched<actual_account>: Actual Budget account where transactions will be imported
pnpm build- Compile TypeScript to JavaScriptpnpm clean- Remove the dist directorypnpm dev- Run in development mode with tsxpnpm lint- Run ESLintpnpm format- Format code with Prettier
- Node.js 20.x or higher (recommended for better native module support)
- pnpm package manager
When deploying to a server (especially Linux servers):
- Do NOT copy
node_modulesfrom your development machine - Install dependencies on the target server:
cd /path/to/actual-edenred
pnpm install
pnpm buildThis project depends on @actual-app/api, which uses better-sqlite3 - a native Node.js module that must be compiled for the specific operating system and Node.js version. Installing dependencies directly on the target server ensures native modules are built correctly.
Cause: Native modules were installed on a different OS (e.g., macOS) than where they're being run (e.g., Linux).
Solution: Rebuild native dependencies on the target machine:
# Option 1: Reinstall all dependencies (recommended)
rm -rf node_modules
pnpm install
# Option 2: Rebuild just the native modules
pnpm rebuild better-sqlite3If you see NODE_TLS_REJECT_UNAUTHORIZED warnings, ensure your Actual Budget server has a valid SSL certificate. In production, never set NODE_TLS_REJECT_UNAUTHORIZED=0 as it makes connections insecure.
Contributing:
Contributions are welcome! Please submit issues or pull requests if you encounter any problems or have suggestions for improvements.
License:
This project is licensed under the MIT License. See the LICENSE file for details.