Skip to content

AnswerDotAI/fastshell

Repository files navigation

fastshell

fastshell is an AI-powered terminal assistant that uses Claude AI to help you with file operations and terminal tasks. It captures your terminal history (via tmux) and uses it as context to understand what you're trying to do, then executes actions with your approval.

What does fastshell do?

fastshell integrates Claude AI directly into your terminal workflow. When you run a command like:

$ fastshell "view my core.py file and update the README"

It will:

  1. Capture your terminal history from tmux to understand the context
  2. Send your query to Claude AI along with the terminal context
  3. Execute file operations (view files, create/edit files) with your approval
  4. Provide intelligent responses based on your project structure and needs

The AI assistant has access to tools like view (to read files/directories) and safe_create (to create/edit files with user confirmation), making it a powerful coding companion.

Developer Guide

If you are new to using nbdev here are some useful pointers to get you started.

Install fastshell in Development mode

# make sure fastshell package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to fastshell
$ nbdev_prepare

Usage

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/AnswerDotAI/fastshell.git

or from conda

$ conda install -c AnswerDotAI fastshell

or from pypi

$ pip install fastshell

Documentation

Documentation can be found hosted on this GitHub repository's pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.

How to use

Prerequisites

  • You need to be running tmux (fastshell captures terminal history via tmux)
  • You need a Claude API key configured for the lisette library

Basic Usage

Simply run fastshell followed by your query in natural language:

# View files in your project
$ fastshell "show me what's in the core.py file"

# Create or update files
$ fastshell "create a new test file with basic unit tests"

# Get help with your code
$ fastshell "analyze my code and suggest improvements"

How it works

  1. Terminal Context: fastshell captures your recent terminal history using tmux capture-pane
  2. AI Processing: Your query and terminal context are sent to Claude AI (claude-sonnet-4-5)
  3. Tool Execution: The AI can call tools like view() and safe_create() to interact with your filesystem
  4. User Approval: Before creating or modifying files, fastshell asks for your confirmation
  5. Response: The AI provides helpful responses and executes approved actions

Example Session

$ fastshell "view my core.py and explain what it does"
# AI will read the file and provide an explanation

$ fastshell "create a simple example script"
# AI will propose a file creation
# You'll be prompted: "Should this be ran? y/n"
# Type 'y' to approve or 'n' to cancel

Safety Features

  • User confirmation required: All file creation/modification operations require explicit user approval
  • Transparent operations: You can see exactly what the AI plans to do before it happens
  • Read-only by default: The view tool only reads files, never modifies them

Key Features

  • 🤖 AI-Powered: Uses Claude Sonnet 4.5 for intelligent assistance
  • 📜 Context-Aware: Automatically includes your terminal history for better understanding
  • 🛡️ Safe: Requires user approval before making any file changes
  • 🔧 Extensible: Built on lisette for easy tool integration
  • 💻 Terminal-Native: Works seamlessly in your existing tmux workflow

About

A fun mini shellsage clone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published