command-line switch
in English: command-line flag / command-line option
A short notation written after a command, usually starting with a hyphen, used to tell the program how to operate differently from the default.
In plain terms
When you order coffee in a café, 'coffee' is the command, and 'with lactose-free milk, to go' are the switches. You ask for the same thing, just specifying how it should be prepared. A command-line switch does the same with a program: you write one or two short markers after the program name, and it runs differently.
The command line has no buttons, checkboxes, and menus. What you would click together in the Settings menu of a windowed program, you enter here with switches. "--help" for example prints the help, and "--version" shows which version is on your machine.
You will encounter two types of switches. One simply turns something on or off, like a light switch, while the other also expects a value, such as a filename or a number. This matters for AI tools because many coding agents are launched from the command line, and a switch determines which model the agent uses or what it can do without asking for permission.
How it works
- Type the program name, followed by the flags separated by spaces, for example: "program --nyelv hu --csendes".
- When Enter is pressed, the line breaks into words, and the pieces reach the program sequentially. On Linux and macOS, the command interpreter (the shell) does this; on Windows, it is usually the program itself.
- The program reviews the items. Anything starting with a hyphen is treated as a switch. After a single hyphen, a one-letter short form usually follows (-v); after two, a descriptive long form (--verbose). On Windows, many of the system's own commands use a forward slash (/?).
- If the switch expects a value, the program reads the word immediately following it or the part after the equals sign, for example "--model=large".
- The program overrides its default settings according to the switches and runs accordingly. If it receives an unknown switch, it typically stops with an error message and shows the correct usage.
An everyday example
You want to try an AI tool, and the installation guide asks you to enter: 'pip install --upgrade package_name'. Here, '--upgrade' is the switch: without it, the installer would leave the existing older version untouched; with it, the latest version replaces the old one.
Who is affected
A common misconception
Limits and risks
- Some switches disable safety brakes, such as "--force", "--yes", or agent switches that skip permission requests, after which the program does not ask again.
- Case sensitivity usually matters, as does the difference between one and two hyphens, so a typo can yield a completely different result.
- Do not write a password or secret key as a flag value, because the command remains in the command history, and other users on the machine can see it in the process list while it runs.
- Switches may change or disappear from version to version, so a command from an old guide may now produce an error.
Similar, but not the same
- parancssori argumentum – In a broader sense, every word written after the command is an argument, including the switch. In a narrower sense, the argument specifies what the program works on (for example, which file), while the switch specifies how.
- environment variable – An environment variable is a value set in the background that every program started from there sees until you change it. A switch, however, applies only to the single command next to which you write it.
- configuration file – The configuration file permanently saves settings to a file. The switch must be re-entered at every startup and usually overrides the value in the file.
Related concepts
short flag, long option, help toggle
parancssori argumentum, environment variable, configuration file, alparancs, coding agent
A brief history
The convention of switches starting with a hyphen spread in the early 1970s with the Unix operating system. The more descriptive, double-hyphen long form later became common through GNU project programs.
Where things stand
It has been a core element of developer tools for decades. Since late 2026, coding agents run from the command line mean that people who have never opened a terminal now encounter it too.
In the news
- Google to switch off Search for schools that reject AINov 3, 2026 · Agent Age
- Revolut switches from Claude Code to Chinese open-weight model, cutting costs by 90%Nov 3, 2026 · Code
- AI-assisted ultrasound speeds interpretation, flags urgent cases and supports inexperienced staff in cardiac scansNov 3, 2026 · Health
- AI agent security: CrowdStrike kill switch, 948 Linux flaws and a warning from the UK cyber chiefNov 2, 2026 · Agent Age
- ChatGPT ads get new bidding options, a text-to-GIF tool and default creative enhancementsNov 2, 2026 · Marketing
- GitHub Copilot Fusion picks models automatically; local preview runs only partly on-deviceNov 2, 2026 · Code
- Indian AI firm flags suspected ₹5,700 crore GST fraud network involving over 1,500 firmsNov 2, 2026 · Money
- ADNOC becomes first energy company to deploy OpenAI's Frontier systemNov 2, 2026 · Ipar
Also known as
switch · command-line option · command-line parameter · flag · command-line flag · command-line option · CLI flag · switch
Sources
- Wikipedia: Command-line interface
- The Open Group: POSIX Utility Conventions
- GNU Coding Standards: Command-Line Interfaces
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.