Questions tagged [command-line-interface]

The interface to a program that consists entirely of text, as opposed to (although not necessarily mutually exclusive to) a GUI, or Graphical User Interface.

A command line interface (CLI) is an interface to a program based on a series of typed text lines, called commands, which follow a specific language structure. The command lines are then interpreted by a Command Language Interpreter (more commonly known as a Shell).

The CLI was a popular interface since the 1960's, and even with development of more modern UI experiences such as , it is still a ubiquitous interface today. Depending on the specific command language, the CLI could provide a quicker and more accurate way to perform commands compared to alternatives.

Useful Resources

9389 questions
104
votes
10 answers

How to get tf.exe (TFS command line client)?

What's the minimum amount of software I need to install to get the 'tf.exe' program?
213897
  • 1,561
  • 4
  • 15
  • 16
102
votes
5 answers

How to change the output folder for migrations with asp.net Core?

Does anyone know how to change the output directory of the following command? dotnet ef migrations add Initial --context EsportshubApi.Models.ApplicationDbContext I tried to add the option: --content-root-path 'Migrations/Identity' But that…
101
votes
7 answers

'git log' output encoding issues in Windows 10 CLI terminal

Problem How can I make git log command output properly displayed in the Windows CLI terminal? Example As you can see, I can type diacritical characters properly, but on git log, the output is somehow escaped. According to the UTF-8 encoding table,…
96
votes
9 answers

Can one executable be both a console and GUI application?

I want to make a C# program that can be run as a CLI or GUI application depending on what flags are passed into it. Can this be done? I have found these related questions, but they don't exactly cover my situation: How to write to the console in a…
BCS
  • 75,627
  • 68
  • 187
  • 294
93
votes
24 answers

How to create a spinning command line cursor?

Is there a way to print a spinning cursor in a terminal using Python?
Nathan
  • 4,545
  • 6
  • 32
  • 49
93
votes
3 answers

De-activate a maven profile from command line

I have a profile activated by default in my maven setting file ~/.m2/settings.xml. Is it possible to deactivate it from the command line by doing something like this: mvn -P!profileActivatedByDefault
Calfater
  • 1,255
  • 1
  • 10
  • 19
88
votes
12 answers

install ext-zip for Mac

I am trying to run composer update and I get the following errors: Problem 1 - The requested PHP extension ext-zip * is missing from your system. Install or enable PHP's zip extension. Problem 2 - maatwebsite/excel 3.1.10 requires…
Abdul
  • 1,537
  • 2
  • 13
  • 22
87
votes
4 answers

How can I "intercept" Ctrl+C in a CLI application?

How can I intercept Ctrl+C (which normally would kill the process) in a CLI (command line interface) Java application? Does a multi-platform solution exist (Linux, Solaris, Windows)? I'm using Console's readLine(), but if necessary, I could use some…
86
votes
12 answers

How to run all .go files within current directory through the command line (multi file package)

I'm a newcomer to Go. I extremely like the language, but I quickly realised that I needed to start dividing my files due to an increase in program size. go run main.go (with main.go having been the file with my main() function) didn't work and I…
dk123
  • 18,684
  • 20
  • 70
  • 77
83
votes
4 answers

What does the 'git add .' ('git add' single dot) command do?

I don't get what the Git command means, when adding files to the stage with the use of a period (or full stop, single dot): $ git add . What does this do?
chunjw
  • 919
  • 1
  • 8
  • 8
83
votes
7 answers

Can't get argparse to read quoted string with dashes in it?

Is there a way to make argparse recognize anything between two quotes as a single argument? It seems to keep seeing the dashes and assuming that it's the start of a new option I have something like: mainparser = argparse.ArgumentParser() subparsers…
sfendell
  • 5,415
  • 8
  • 25
  • 26
82
votes
4 answers

.NET 6.0 C# "new console template" - how to read CLI arguments?

Now that .NET 6.0 is out, what appears to have be a radical update to the default CLI project template is the absence of the familiar boilerplate being reduced to the following: // See https://aka.ms/new-console-template for more…
djtubig-malicex
  • 1,018
  • 1
  • 7
  • 11
80
votes
7 answers

Find nginx version?

I have installed nginx on Debian 7 with the following steps sudo apt-get update sudo apt-get upgrade sudo apt-get install nginx sudo service nginx start I have confirmed that this starts nginx by accessing the hostip from the browser. How do I find…
user_mda
  • 18,148
  • 27
  • 82
  • 145
69
votes
9 answers

Can command line flags in Go be set to mandatory?

Is there a way how to set that certain flags are mandatory, or do I have to check for their presence on my own?
Petr
  • 62,528
  • 13
  • 153
  • 317
69
votes
9 answers

How can I get XDebug to run with PHPUnit on the CLI?

I've tried running the following CLI command: phpunit -d xdebug.profiler_enable=on XYZTestCase.php but it just runs as normal. Can anyone point me in the right direction?? Thx! Here's the XDebug settings: xdebug xdebug support =>…
blacktie24
  • 4,985
  • 6
  • 41
  • 52