BashSenpai CLI Documentation

BashSenpai is a command-line tool that brings the power of the BashSenpai API to your terminal. It allows you to ask questions and receive informative responses related to shell scripting, making it a valuable resource for both beginners and experienced users.

Installation

We maintain up-to-date packages for the following Operating Systems and Linux distributions:

Download and install.

Authentication

To use the BashSenpai CLI, you first need to login to the Senpai service. You will need your personal API token, which you can get from your Dashboard. The login command is used for this purpose and it takes no extra arguments:

senpai login

Usage

To use BashSenpai, run the following command:

senpai [options] prompt

The prompt argument represents the question or a special command you want to execute. BashSenpai will send the prompt to the BashSenpai API and display the response in your terminal.

Options

  • -n, --new: ignores the previous history when sending a question. Use this option if you want to start fresh with each prompt.

Examples

Change the persona of BashSenpai:
senpai become angry pirate

This command changes the persona of BashSenpai to an angry pirate, adding a fun twist to the responses. You are not limited to a certain list of characters and can write anything you want here. Our smartly-designed backend API with multi-level prompts and instructions makes sure all crazy ideas can integrate nicely with the core functionality of the tool.

Ask a question:
senpai how to disable SSH connections

This command sends the question to the BashSenpai API and displays an informative and well-formatted response.

Configuration

  • --command-color: sets the color of the commands in the responses. Valid options are: black, white, gray, red, green, yellow, blue, magenta and cyan. There are also brighter versions of each color, for example: "bright blue". You can also make colors bold, for example: "bold red" or "bold bright cyan".
  • --comment-color: sets the color of the comments in the responses.
  • --run, --no-run: sets whether to show the menu prompt to execute each returned command.
  • --meta, --no-meta: sets whether to send OS metadata to improve the responses. Currently this includes OS type and version (all OSes), shell type (macOS and Linux), and architecture (macOS). Users may choose to disable this feature either for privacy reasons, or in cases where it produces unwanted results (for example if the tool is running on a Windows machine, but the user expects answers about Linux).

Please check our Roadmap section for new and planned features as we develop the configuration options. We are committed to making BashSenpai user-friendly, flexible and easily-configurable and we value your initial feedback. If you have any suggestions or feature requests, don't hesitate to use the appropriate tools provided by GitHub to share your thoughts with us.

Help

If at any time you need to understand the available commands and how to use them, you can type senpai -h or senpai --help.