Man-Machine is a command-line tool that uses LLM to help users read documentation for command-line programs easily.
- Let LLM read command manuals for you.
- Let LLM generate commands according to your needs.
Download the prebuilt binary from the Releases page and add it to your PATH environment variable.
mam setup # Create and open the configuration file (~/.config/mam/config.yaml)Complete the setup in config.yaml. Currently, only services compatible with the OpenAI API protocol are supported.
# config.yaml template
# API Key - Replace with your API key from the provider
apiKey: <YOUR_API_KEY_HERE>
# API Base URL - Fill in with your API service address
# If using OpenAI official API, use https://api.openai.com/v1
# For third-party API services, enter the complete base URL
baseURL: <YOUR_BASE_URL_HERE>
# Model Name - Specify which LLM model to use
model: <YOUR_MODEL_HERE>
# Language Setting - Specify which language the AI should use for responses
language: <LANGUAGE_HERE>Basic usage:
mam mam # Get the usage of mamGenerate commands according to your needs.
mam rm -i "Delete all files under the / directory"
# or
mam rm --iwant "Delete all files under the / directory"Execute the provided command literally to fetch help documentation, bypassing mam's internal attempts.
In the following example, the output of go help build is directly provided to the LLM.
mam -b go help build
# or
mam --bare go help buildEnter continuous conversation mode for multi-turn chat.
mam --chat
# or
mam -cDisplay help information.
mam --help
# or
mam -h- Add
-q,--queryoptions to query the LLM about program documentation. - Add cache functionality for
mam <command>. - Add
-o,--outputoptions to redirect output to a file.
MIT