schihei e31e58c9c4 Move API credentials to .env and set gpt-5.6-luna model
- Load OPENAI_API_KEY and OPENAI_BASE_URL from gitignored .env (repo-root, CWD-independent)
- Fix command explanation to use the configured model instead of hardcoded gpt-4o-mini
- Update default model and fallbacks to gpt-5.6-luna
- Document .env-based configuration in READMEs
2026-09-09 23:07:05 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00
2025-04-09 09:34:15 +02:00

Edison - AI Command Assistant

Overview

Edison is an AI-powered command-line assistant that helps you interact with your terminal more efficiently. Just describe what you want to do in natural language, and Edison will generate and execute the appropriate command.

Edison v0.2

Usage: edison [options] <your command description>
Arguments:
  -s, --safety       : Enable safety mode (only useful when safety is off)
  -c, --config       : Print current configuration
  -v, --verbose      : Enable verbose logging
  -i, --interactive  : Start interactive shell mode
  -e, --explain      : Explain the generated command
  --no-streaming     : Disable streaming output for command generation
  --no-rich          : Disable rich text formatting
  --theme <theme>    : Set syntax highlighting theme (e.g., monokai, github-dark)

Current configuration per edison.yaml:
* Model        : gpt-5.6-luna
* Temperature  : 0
* Max. Tokens  : 500
* Safety       : on
* Streaming    : on
* Show Prefix  : off

UI Configuration:
* Rich Formatting : on
* Theme           : monokai
* Command Style   : panel
* Structured Expl.: on

Features

  • Natural language processing for command generation
  • Support for GPT-3.5 and GPT-4 models
  • Real-time streaming of command generation
  • Rich text formatting with syntax highlighting
  • Structured command explanations
  • Direct command modification (edit commands before execution)
  • Configurable settings via edison.yaml
  • Cross-platform support (Linux, macOS, Windows)
  • Safety mode to confirm commands before execution
  • Interactive shell mode with command history

Installation

Linux and macOS

git clone https://github.com/user/command-assistant
cd command-assistant
source install_edison.sh

Windows

git clone https://github.com/user/command-assistant
cd command-assistant
.\install_edison.bat

API Configuration

Edison needs an API key (and, when using a proxy, a base URL) to talk to your model backend. The recommended way is a .env file in the repository root, which is gitignored and therefore never checked in:

# .env (do not commit this file)
OPENAI_API_KEY="your-api-key"
OPENAI_BASE_URL="https://api.openai.com/v1"

Copy .env.example to get started:

cp .env.example .env

You can also provide the key using any of these methods (in order of precedence):

  • OPENAI_API_KEY / OPENAI_BASE_URL environment variables (or in .env)
  • A file at ~/.openai.apikey containing just the key
  • The openai_api_key / base_url entries in edison.yaml

Usage Examples

edison what's the time?
edison show me some unicode characters
edison what is my username and machine name?
edison is there a process called chrome running?
edison download the homepage of example.com and save it to index.html
edison find all unique URLs in index.html
edison create a file named test.txt with my username
edison -a delete the test.txt file
edison show me the current price of Bitcoin in USD
edison check the SSH logs for suspicious logins

Safety Mode

By default, Edison will prompt for confirmation before executing commands. You can configure this behavior in edison.yaml.

Streaming Mode

Edison displays command generation in real-time as tokens arrive from the API, providing immediate feedback. You can:

  • Enable/disable streaming in edison.yaml with the streaming option
  • Disable streaming for a single command with the --no-streaming flag
  • Cancel a streaming command generation with Ctrl+C
  • Hide the "Generating command: " prefix with the show_generating_prefix: false option in edison.yaml

Command Modification

Edison allows you to modify commands in two ways:

  1. Modify the prompt: Change the natural language description to generate a new command
  2. Modify the command directly: Edit the generated command before execution

When you select the "modify" option (by typing m), Edison will ask whether you want to modify the prompt or the command:

Execute command? [Y]es [n]o [m]odify (prompt/command) [c]opy to clipboard ==> m
Modify [p]rompt or [c]ommand? [c] ==> 
  • Choose p to modify the prompt and generate a new command
  • Choose c (default) to directly edit the generated command

Rich Formatting

Edison provides enhanced terminal output with rich text formatting:

  • Syntax highlighting for generated commands
  • Structured command explanations with better formatting
  • Customizable themes for syntax highlighting
  • Panel-based UI elements for better visual organization

You can configure rich formatting options in edison.yaml under the ui section:

ui:
  rich_formatting: true
  theme: "monokai"
  command_style: "panel"
  structured_explanations: true

Or disable rich formatting for a single command with the --no-rich flag.

License

MIT. No Liability. No Warranty.

S
Description
No description provided
Readme MIT 100 KiB
Languages
Python 99.2%
Shell 0.8%