Skip to content
Core Concepts

Arguments

Ask for a value or two inline, right in the search bar, before a command runs.

Some commands need a quick input: a language, a name, an amount. Instead of opening a form, declare arguments. Qikbar then shows inline fields in the search bar, like Raycast:

{
  title: 'Translate',
  icon: 'languages',
  arguments: [
    { name: 'text', placeholder: 'Text', required: true },
    { name: 'to', placeholder: 'Language', type: 'dropdown', options: [
      { title: 'French', value: 'fr' },
      { title: 'Spanish', value: 'es' },
    ] },
  ],
  run: (ctx) => translate(ctx.arguments.text, ctx.arguments.to),
}

Select the command and press ↵ or Tab. The fields appear and the first one is focused. Tab moves between fields, ↵ runs the command, and Esc cancels.

Field Description
name Required. The key in ctx.arguments.
placeholder The label shown in the field.
type text (default), password or dropdown.
required Blocks running until the field is filled.
options { title, value }[] for dropdowns.

When the AI runs a command, it fills in the arguments itself.

Need more than two or three inputs, or validation? Use a form view.

Edit this page on GitHub