mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
* Add documentation for CLI mode Fixes #3703 Add documentation for CLI mode in OpenHands. * **New Documentation**: Add `docs/modules/usage/how-to/cli-mode.md` to document CLI mode. - Include instructions on starting an interactive OpenHands session via the command line. - Explain the difference between CLI mode and headless mode. - Provide examples of CLI commands and expected outputs. * **Update Existing Documentation**: Modify `docs/modules/usage/how-to/headless-mode.md`. - Clarify the difference between headless mode and CLI mode. - Add a reference to the new CLI mode documentation. * Update cli-mode.md * Update headless-mode.md --------- Co-authored-by: Robert Brennan <accounts@rbren.io> Co-authored-by: tofarr <tofarr@gmail.com>
1.1 KiB
1.1 KiB
Running in Headless Mode
You can run OpenHands via a CLI, without starting the web application. This makes it easy to automate tasks with OpenHands.
Difference Between CLI Mode and Headless Mode
- CLI Mode: Interactive mode where users can input tasks and receive responses in real-time. It is suitable for users who prefer or require a command-line interface.
- Headless Mode: Non-interactive mode where tasks are executed without user interaction. It is suitable for automation and scripting purposes.
For more information on CLI mode, refer to the CLI Mode documentation.
As with other modes, the environment is configurable via environment variables or by saving values into config.toml
With Python
To run OpenHands in headless mode with Python, follow the Development setup instructions, and then run:
Headless with Python
poetry run python -m openhands.core.main -t "write a bash script that prints hi"