Skip to content

CLI ​

(main) command ​

Get CLI command assistance based on a prompt.

  • Usage

    bash
    $ s <prompt> ...
  • Options

    • -e, --explain: (optional) Get an explanation for a command directly.
    • -r, --revise: (optional) Revise a command directly.
    • -m, --model: (optional) Gemini model to use (e.g., gemini-2.5-flash, gemini-2.5-flash-lite).
    • -v, --version: (optional) Get the Strigi version.
    • -h, --help: (optional) Get help.
  • Details

    The main command is a versatile shortcut that combines the functionality of s generate, s explain with the -e flag, and s revise with the -r flag. It allows you to execute a shell command directly, obtain an explanation or revise a specific command in natural language.

  • Examples

    Generate a command to list only JSON files:

    bash
    $ s "how to list JSON files"

    Generate a command using a specific model:

    bash
    $ s -m gemini-2.5-flash-lite "list files in current directory"

    Get an explanation for the git status command:

    bash
    $ s explain "git status"

auth subcommand ​

Set Gemini API key and authenticate.

  • Usage

    bash
    $ s auth
  • Options

    • -g, --gemini #0: (optional) Gemini API key to use
  • Details

    The auth command facilitates authentication by saving the obtained Gemini API key in the configuration file.

logout subcommand ​

Log out and remove Gemini API key.

  • Usage

    bash
    $ s logout
  • Details

    The logout command securely removes the Gemini API key from the configuration, enhancing access control and security measures.

generate subcommand ​

Generate and execute commands from natural language prompts.

  • Usage

    bash
    $ s generate <prompt> ...
    bash
    $ s g <prompt> ...
  • Options

    • -m, --model: (optional) Gemini model to use (e.g., gemini-2.5-flash, gemini-2.5-flash-lite).
  • Details

    The s generate command is designed to interpret natural language prompts and generate corresponding CLI commands. It then offers the option to revise the generated command before execution.

  • Examples

    Generate and execute a command to list files:

    bash
    $ s generate "list files in current directory"

    Generate a command using a specific model:

    bash
    $ s generate -m gemini-2.5-flash-lite "update all packages"

explain subcommand ​

Get an explanation for a command.

  • Usage

    bash
    $ s explain <command>
    bash
    $ s e <command>
  • Options

    • -m, --model: (optional) Gemini model to use (e.g., gemini-2.5-flash, gemini-2.5-flash-lite).
  • Details

    The s explain command is designed to provide comprehensive explanations for specific CLI commands, aiding users in understanding their usage and functionalities in-depth.

  • Examples

    Get an explanation for the ls command:

    bash
    $ s explain "ls"

    Get an explanation using a specific model:

    bash
    $ s explain -m gemini-2.5-flash-lite "git status"

revise subcommand ​

Start a command revision.

  • Usage

    bash
    $ s revise <command>
    bash
    $ s r <command>
  • Options

    • -m, --model: (optional) Gemini model to use (e.g., gemini-2.5-flash, gemini-2.5-flash-lite).
  • Details

    The s revise command is designed to start directly a revision for a command. This enables you to tailor the command to your specific needs before execution.

  • Examples

    Start a revision for the ls command:

    bash
    $ s revise "ls"

    Start a revision using a specific model:

    bash
    $ s revise -m gemini-2.5-flash-lite "git log"

personalize subcommand ​

Personalize your AI experience with model preferences and custom instructions.

  • Usage

    bash
    $ s personalize
    bash
    $ s p
  • Details

    The s personalize command allows you to customize your AI experience by selecting your preferred Gemini model and providing personal instructions for more tailored and accurate responses. Your personalization settings will be used in all future interactions with Strigi.

config subcommand ​

Display the current configuration settings.

  • Usage

    bash
    $ s config
    bash
    $ s c
  • Options

    • -r, --reveal: (optional) Reveal the API key in the output (requires confirmation for security)
  • Details

    The s config command displays the current configuration settings including the Gemini API key status, model, and custom instructions. This is useful for verifying your current setup and troubleshooting configuration issues.

  • Examples

    Display current configuration:

    bash
    $ s config

    Display configuration with API key revealed:

    bash
    $ s config --reveal

    When using --reveal, you'll be prompted to confirm before the API key is displayed for security reasons.

    The command will show:

    • API Key Status: Whether the Gemini API key is set (without revealing the actual key unless --reveal is used and confirmed)
    • Model: The currently configured Gemini model (defaults to "gemini-2.5-flash")
    • Custom Instructions: Your personalized "About Me" and "Response Preference" settings (shows "Not configured" if not set)
    • Config File Path: The full path to your configuration file (typically ~/.config/strigi/config.json)