actualbudget/actual · error · Error
No update fields provided. Use --name or --offbudget.
Error message
No update fields provided. Use --name or --offbudget.
What it means
The accounts CLI `update` command requires at least one field to change. If neither --name nor --offbudget is supplied, the fields object is empty and the command throws instead of issuing a pointless API call.
Source
Thrown at packages/cli/src/commands/accounts.ts:88
.command('update <id>')
.description('Update an account')
.option('--name <name>', 'New account name')
.option('--offbudget <bool>', 'Set off-budget status')
.action(async (id: string, cmdOpts) => {
const opts = program.opts();
const fields: Record<string, unknown> = {};
if (cmdOpts.name !== undefined) {
const trimmed = cmdOpts.name.trim();
if (trimmed === '') {
throw new Error('Invalid --name: must be a non-empty string.');
}
fields.name = trimmed;
}
if (cmdOpts.offbudget !== undefined) {
fields.offbudget = parseBoolFlag(cmdOpts.offbudget, '--offbudget');
}
if (Object.keys(fields).length === 0) {
throw new Error(
'No update fields provided. Use --name or --offbudget.',
);
}
await withConnection(
opts,
async () => {
await api.updateAccount(id, fields);
printOutput({ success: true, id }, opts.format);
},
{ mutates: true },
);
});
accounts
.command('close <id>')
.description('Close an account')
.option(
'--transfer-account <id>',View on GitHub (pinned to d4334cb6e6)
Solutions
- Provide at least one update flag: `accounts update <id> --name "Savings"` or `--offbudget true`.
- Verify flag spelling matches the command's --name / --offbudget options.
- If no change is needed, don't call update — or use `accounts list`/`get` to inspect.
Example fix
// before actual accounts update acct_123 // after actual accounts update acct_123 --name "Emergency Fund" --offbudget false
Defensive patterns
Strategy: validation
Validate before calling
const flags: string[] = [];
if (name) flags.push('--name', name);
if (typeof offbudget === 'boolean') flags.push('--offbudget', String(offbudget));
if (flags.length === 0) throw new Error('Nothing to update: pass --name and/or --offbudget'); Type guard
null
Try / catch
try {
await runCli(['accounts', 'update', id, ...flags]);
} catch (e) {
if (String(e.message).includes('No update fields provided')) {
console.error('Skipped: no fields to update for account', id);
} else throw e;
} Prevention
- Build flag arrays conditionally and assert non-empty before invoking.
- Double-check option spelling with the command's --help output.
- Use accounts list/get when the intent is inspection, not update.
- Log the exact argv in scripts to catch dropped/empty flags.
When it happens
Trigger: Running `actual-cli accounts update <id>` with no flags, or with flags whose values were undefined due to shell expansion mistakes (e.g. --name "$EMPTY_VAR" not passed because the var was unset and quoted args dropped).
Common situations: Automated scripts that conditionally build flag arrays but end up passing none; typos like --naem or --off-budget that commander treats as unknown (or are silently dropped in loose setups); calling update when the actual intent was `accounts get`.
Related errors
- Invalid --name: must be a non-empty string.
- Invalid cutoff date: expected a valid date (e.g. YYYY-MM-DD)
- No update fields provided. Use --name or --hidden.
- No update fields provided. Use --name or --hidden.
- No fields to update. Use --name to specify a new name.
AI-assisted analysis of actualbudget/actual@d4334cb6e6 (2026-08-29).
Data as JSON: /api/errors/3dff2b680fec31ec.
Report an issue: GitHub.