Command-line tools are simple programs that manipulate data using a text-based interface. These tools do not use windows, menus, or other user interface elements traditionally associated with applications. Instead, they run from the command-line environment of the Terminal application. Command-line tools require less explicit knowledge of the system to develop and because of that are often simpler to write than many other types of applications. However, command-line tools usually serve a more technically savvy crowd who are familiar with the conventions and syntax of the command-line interface.
Xcode supports the creation of command-line tools from several initial code bases. For example, you can create a simple and portable tool using standard C or C++ library calls, or a more Mac OS X–specific tool using frameworks such as Core Foundation, Core Services, or Cocoa Foundation.
Important: With the transition to Intel-based processors, developers should always create universal binaries for command-line tools written with Carbon, Cocoa, or BSD APIs. For information on how to create universal binaries, see Universal Binary Programming Guidelines, Second Edition.
Command-line tools are ideal for implementing simple programs quickly. You can use them to implement low-level system or administrative tools that do not need (or cannot have) a graphical user interface. For example, a system administrator might use command-line tools to gather status information from an Xserve system. You might also use them to test your program’s underlying code modules in a controlled environment.
Note: Daemons are a special type of command-line program that run in the background and provide services to system and user-level programs. Developing daemons is not recommended, or necessary, for most developers.
Last updated: 2007-10-31