Skip to main content

cli-FSD

Natural language interface for your command line.

A lightweight and portable autopilot utility for CLI tasks that takes natural language as input and uses the LLM of your choice to take the appropriate actions by generating and parsing shell scripts. Find answers to questions and let AI execute commands with your permission in Safe Mode or enable Autopilot to automate tasks or script modules and microservices on the fly.

Note: Giving LLMs shell-level access to your computer is dangerous and should only be done in sandbox or otherwise expendable environments.

I made cli-FSD for experimenting and problem solving in low stakes development environments. If you don't have access to a machine like that you can try it below:

Open in GitHub Codespaces

Run on Replit

Getting Started

Prerequisites

  • Python 3.10 or later (may work with earlier versions)
  • pip 24.0 or later
  • An OpenAI API key or Anthropic API key or Ollama running in the same environment as cli-FSD

Installation

  1. Pre-requisites:
  • Upgrade pip

         python3 -m pip install --upgrade pip
    

One line install using pip:

pip install cli-FSD

(if you are testing the package, follow steps to setup and activate a virtual environment before running pip install.).

Manual Installation

  1. Clone the repo:

    git clone https://github.com/WazaCraft/cli-FSD
    cd cli-FSD
    
  2. Set up a Python virtual environment:

        python -m venv FSD
    
  3. Activate the virtual environment:

    • On Windows:

      .\FSD\Scripts\activate
      
    • On Unix or MacOS:

      source FSD/bin/activate
      
  4. Install the cli-FSD Python package:

    pip install .
    

Usage

  • To start in safe-mode in your Terminal:

    @ what time is it -s
    
  • To run in companion mode and process a specific task using autopilot type '@' from anywhere in your terminal followed by a command:

    @ what time is it
    
  • For additional options, you can enter CMD mode by typing CMD at any prompt.

  • To browse directories and view file contents, type browse at the prompt and follow on-screen instructions.

Low-stakes Demos

Letting an LLM execute code on your computer is objectively dangerous. I've used cli-FSD on every computer I own but think it's important for users to understand the risk associated with this concept.

If you don't want to run it locally:

Open in GitHub Codespaces

Run on Replit

Project Progress

v2.0.9

  • - Added file interaction tool that allows the agent to modify files in the active directory and all subdirectories with user permission
  • - Added fileint command in CMD mode for interactive file operations (list, read, write, modify, delete, search, create directories)
  • - Added support for Ollama (use -o to run cli-FSD using any supported local LLM model)
  • - support for script custom gpt-4-turbo assistant OpenAI's Assistants API to revie v0.87
  • - finish OpenAI Assistants integration (done but but needs to be made accessible in main.py)
  • - integrate other LLM providers with http request APIs similar to /v1/completions (pass -c with your query to use Anthropic API's Claude 3 Opus)
  • - improved error handling

v0.75

  • - overhauled and refactored error resolution function to address a bug that sometimes prevented the resolution from executing
  • - fixed niche text handling errors and submodule implementation for upcoming OpenAI AssistantsAPI integration v0.52
  • - implement LLM error handling and resolution flows
  • - refactor flags for SafeMode, Autopilot

To Do

  • - refactor and expand CMD module
  • for v0.8 - route requests to a custom gpt-4-turbo assistant with code interpreter access using OpenAI's Assistants API
  • - build advanced menu and config options

Considering

  • - passive error detection and resolution for CLI interactions
  • - voice control
    • - voice notation
  • - automation schedules and background states

Version Management

The project uses a central version management system:

  1. The authoritative version is stored in cli_FSD/version.py
  2. To update the version, use the provided script:
    python scripts/bump_version.py [major|minor|patch]
    
  3. This will automatically update the version displayed in the UI and used in setup.py

Contributing

Contributions to this project are welcome. Please fork the repository, make your changes, and submit a pull request for review.

Contributions to the main branch should aim to adhere to the project principles:

  • portable (I'm avoiding unnecessary dependencies whenever possible)
  • utility focused

License

This project is licensed under the GNU GPL - see the LICENSE.md file for details.

Acknowledgments

  • OpenAI for providing the API used for generating chat responses.
  • Flask and Flask-CORS for the web server functionality.

Metadata

Release files for cli-FSD 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cli-FSD 2.2.0
File Size Uploaded
cli_fsd-2.2.0.tar.gz 161.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-FSD 2.2.0
File Interpreter ABI Platform
cli_fsd-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 339.0 kB

Release files / cli_fsd-2.2.0.tar.gz

Download URL cli_fsd-2.2.0.tar.gz
Size 161.2 kB
Tags Source
SHA-256 checksum
How to use checksums
592f60687997d98bc110c83ad720f302b4dd10c88f5bb28b1fbcf4e75d308ad5
BLAKE2b-256 checksum
How to use checksums
076b749a8ae2fc99c739da936ab265d601e3b3e3faba7ff0ab06e9dc46f6d148
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / cli_fsd-2.2.0-py3-none-any.whl

Download URL cli_fsd-2.2.0-py3-none-any.whl
Size 177.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f62a8663fd9d83d7c5c55f501fc85515e6bd18a29683515e8aa434de4d86cde2
BLAKE2b-256 checksum
How to use checksums
fb25c067b627500952c985f139d0798eda8510882422463928fc4ec9426d2c8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.99

2 release files

2.1.98

2 release files

2.1.92

2 release files

2.1.91

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.41

2 release files

2.0.9

2 release files

2.0.5

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.9.2

2 release files

1.8.9

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.7

2 release files

1.6.4

2 release files

1.2.98

2 release files

1.0.7

2 release files

1.0.5

2 release files

1.0.1

2 release files

0.75

2 release files

0.51

2 release files

0.9.43

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page