A command-line tool is a console application that reads from and writes to a terminal. In F#, it is a direct way to turn a small piece of working code into a runnable program: accept console input, call domain logic, and print a result. Console output can range from plain text to richer terminal displays with tables, charts, and progress bars. section 1.3
Create a basic F# console application with the .NET CLI, then run it with `dotnet run`. The generated project includes a project file and `Program.fs`; templates can also create other application types, such as web apps and class libraries. section 2.3.3
mkdir helloworld #1 cd helloworld #2 dotnet new console -lang F# #3
Start a new directory, scaffold an F# console project, and use the generated program as the executable entry point. section 2.3.3
A useful workflow begins in a script, where a function can be modeled and explored quickly, then moves that function into a console project. Put reusable logic in a module such as `Car`, add its file to the project, and let `Program.fs` connect console interaction to that logic. section 6.2.3
F# project organization matters when a tool grows beyond one file:
- Include every F# source file in the project file so it is compiled and available to the application. section 6.2.3
- Order files by dependency: earlier files cannot access files listed later. section 6.2.3
- Place the coordinating file, typically `Program.fs`, last so it can access the modules it needs. section 6.2.3
From car logic to terminal output
Move a `drive` function into `Car.fs`, then call it from the program: `let remaining = Car.drive 2 8`. Printing `You have {remaining} gas left.` turns an explored function into a small executable tool while keeping the domain calculation separate from console-facing code. section 6.2.3
A console application can also serve as an integration boundary. An F# project can reference a C# class library, open its namespace, construct a C# object, and print values from it. This keeps the command-line program compatible with mixed-language .NET solutions. section 11.1.1


