man-machine

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

🤖 Man-Machine

中文

Man-Machine is a command-line tool that uses LLM to help users read documentation for command-line programs easily.

Features

  • Let LLM read command manuals for you.
  • Let LLM generate commands according to your needs.

Installation

Download the prebuilt binary from the Releases page and add it to your PATH environment variable.

Initialization

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>

Usage

Basic usage:

mam mam # Get the usage of mam
Options
--iwant, -i

Generate commands according to your needs.

mam rm -i "Delete all files under the / directory"
# or
mam rm --iwant "Delete all files under the / directory"
--bare, -b

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 build
--chat, -c

Enter continuous conversation mode for multi-turn chat.

mam --chat
# or
mam -c
--help, -h

Display help information.

mam --help
# or
mam -h

Roadmap

  • Add -q, --query options to query the LLM about program documentation.
  • Add cache functionality for mam <command>.
  • Add -o, --output options to redirect output to a file.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址