Skip to content

canuysal/terminalfellow

Repository files navigation

Terminal Fellow

A CLI tool that understands your command line history and generates commands or scripts based on natural language requests.

Features

  • Parse natural language requests to generate relevant terminal commands
  • Analyze user's command history to understand context and preferences
  • Generate one-liners or scripts based on the request and historical usage patterns
  • Understand and reference project structures and common workflows

Installation

Through pip:

pip install git+https://github.com/canuysal/terminalfellow

Manually:

# Clone the repository
git clone https://github.com/yourusername/terminalfellow.git
cd terminalfellow

# Set up a virtual environment (recommended)
conda create -n terminalfellow python=3.12
conda activate terminalfellow

# Install the package
pip install -e .

Configuration

On first use, Terminal Fellow will walk you through the configuration process with the command:

# Run the interactive configuration wizard
tf --config

The wizard allows you to:

  • Select AI provider (currently supports OpenAI with Claude and Gemini coming soon)
  • Choose the OpenAI model (gpt-3.5-turbo, gpt-4, gpt-4-turbo)
  • Set or update your API key
  • Configure command history usage (wip)

Usage

After installation, simply use the tf command followed by your request:

tf doesn't execute commands, it simply echoes them on the terminal.

# Basic usage
tf extract audio from my_video.mp4 with 30 second intervals.

# Another example:
tf create a JSON file with my CPU info

Development

# Install development dependencies
pip install -e ".[dev]"

# Or install individually
pip install pytest pre-commit

# Run tests
pytest

Code Style and Linting

The project uses the following tools for code quality:

  • Black: Code formatting (line length: 88)
  • MyPy: Static type checking
  • Pre-commit: Automated checks before commits

To set up pre-commit hooks:

# Install pre-commit
pip install pre-commit

# Install hooks
pre-commit install

License

See the LICENSE file for details.

About

Terminal Fellow knows your history, and creates one-liners or scripts for you upon request.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages