Command Line Interface (CLI)
VMPilot provides a powerful command-line interface that allows you to interact with the tool directly from your terminal.
Basic Usage
The basic syntax for using the CLI is:
Bash | |
---|---|
For example:
Bash | |
---|---|
Remember to enclose your command in quotes to ensure that it is passed as a single argument to the CLI. In the last example, we used backticks to execute a command and pass its output as an argument to the CLI.
Command Line Options
The CLI supports several command line options to customize its behavior:
Temperature
The temperature parameter controls the randomness in the response generation. Higher values (e.g., 0.8) make the output more creative but potentially less focused, while lower values (e.g., 0.2) make it more deterministic and focused. As a rule you should not provide a temperature value, since these are set by the API provider. For testing we use a value of 0 so that the output is deterministic.
Example:
Bash | |
---|---|
Chat Mode
Chat mode maintains conversation context across multiple commands, allowing for follow-up questions and references to previous interactions. With database persistence enabled, conversation context is preserved even between separate CLI invocations.
Examples:
Note: Chat persistence across CLI invocations requires database persistence to be enabled. See the Database Configuration section for details on how to enable this feature.
File Input Mode
The file input mode allows you to provide a file containing multiple commands, with each command on a separate line. VMPilot will: 1. It creates a unique chat ID for the session, unless you specify one 2. Processes each line in the file as a separate command while maintaining conversation context 3. This simulates a continuous conversation as if you were interacting with VMPilot in chat mode It's similar to chat mode, but with commands read from a file, making it easier to process multiple tasks in sequence.
Example:
Bash | |
---|---|
Where commands.txt
might contain:
Text Only | |
---|---|
Provider Selection
You can choose between different LLM providers: - anthropic (default) - openai
Example:
Bash | |
---|---|
Debug Mode
Enable debug mode to see detailed logging information, which can be helpful for troubleshooting:
Bash | |
---|---|
Examples
Here are some common usage examples:
-
Basic system operations:
-
File editing:
-
Using different providers with custom temperature:
Bash -
Chat sessions for complex tasks:
-
Batch processing with file input:
Error Handling
The CLI will display error messages when: - The command execution fails - There are permission issues - The LLM provider is not properly configured - Invalid arguments are provided
If you encounter errors, try: 1. Using debug mode (-d) to get more information 2. Checking your API provider configuration 3. Verifying you have the necessary permissions for the requested operation 4. For file input mode, ensure each command is on a separate line