actualbudget/actual · error · Error

No update fields provided. Use --name or --hidden.

Error message

No update fields provided. Use --name or --hidden.

What it means

The category-groups CLI `update` command likewise requires at least one of --name or --hidden. With no fields the command throws instead of issuing an empty update via api.updateCategoryGroup.

Source

Thrown at packages/cli/src/commands/category-groups.ts:64

          printOutput({ id }, opts.format);
        },
        { mutates: true },
      );
    });

  groups
    .command('update <id>')
    .description('Update a category group')
    .option('--name <name>', 'New group name')
    .option('--hidden <bool>', 'Set hidden status')
    .action(async (id: string, cmdOpts) => {
      const fields: Record<string, unknown> = {};
      if (cmdOpts.name !== undefined) fields.name = cmdOpts.name;
      if (cmdOpts.hidden !== undefined) {
        fields.hidden = parseBoolFlag(cmdOpts.hidden, '--hidden');
      }
      if (Object.keys(fields).length === 0) {
        throw new Error('No update fields provided. Use --name or --hidden.');
      }
      const opts = program.opts();
      await withConnection(
        opts,
        async () => {
          await api.updateCategoryGroup(id, fields);
          printOutput({ success: true, id }, opts.format);
        },
        { mutates: true },
      );
    });

  groups
    .command('delete <id>')
    .description('Delete a category group')
    .option('--transfer-to <id>', 'Transfer transactions to this category ID')
    .action(async (id: string, cmdOpts) => {
      const opts = program.opts();

View on GitHub (pinned to d4334cb6e6)

Solutions

  1. Provide --name and/or --hidden: `category-groups update <id> --name "Bills"`.
  2. Verify flags with `category-groups update --help`.
  3. Skip the call entirely if there is nothing to change.

Example fix

// before
actual category-groups grp_1 --verbose
// after
actual category-groups update grp_1 --name "Monthly Bills" --hidden false
Defensive patterns

Strategy: validation

Validate before calling

const flags: string[] = [];
if (name) flags.push('--name', name);
if (typeof hidden === 'boolean') flags.push('--hidden', String(hidden));
if (flags.length === 0) throw new Error('Nothing to update: pass --name and/or --hidden');

Type guard

null

Try / catch

try {
  await runCli(['category-groups', 'update', id, ...flags]);
} catch (e) {
  if (String(e.message).includes('No update fields provided')) {
    console.warn('No group fields to update; skipping', id);
  } else throw e;
}

Prevention

When it happens

Trigger: Running `actual-cli category-groups update <id>` with no flags; flags dropped by shell expansion of empty variables; typos in option names.

Common situations: Automation pipelines parameterizing updates where all parameters happened to be empty; users expecting an id-only command to toggle something; mixing up the categories and category-groups commands.

Related errors


AI-assisted analysis of actualbudget/actual@d4334cb6e6 (2026-08-29). Data as JSON: /api/errors/e7339c75f4e8e176. Report an issue: GitHub.