2.8 KiB
2.8 KiB
Basic Usage
Edison is designed to be intuitive and easy to use. This guide covers the fundamental operations and commands.
Command Structure
edison [OPTIONS] <your natural language query>
For example:
edison how to find all png files in the current directory
Basic Workflow
sequenceDiagram
participant User
participant Edison
participant API as OpenAI API
participant Shell
User->>Edison: Natural language query
Edison->>API: Send prompt with query
API-->>Edison: Return command
Edison->>User: Display command & ask for confirmation
User->>Edison: Confirm (Y/n/m)
alt User confirms
Edison->>Shell: Execute command
Shell-->>User: Show command output
else User modifies
User->>Edison: Modified command
Edison->>Shell: Execute modified command
Shell-->>User: Show command output
else User declines
Edison->>User: Command skipped
end
- Enter your query: Describe in natural language what you want to do
- Review the command: Edison will display the generated shell command
- Choose an action:
- Press
Enteror typeyto execute the command - Type
nto skip execution - Type
mto modify the command before execution - Type
dto directly modify the command (new feature!) - Type
cto copy the command to clipboard
- Press
Command Line Options
Edison supports several command-line options:
| Option | Description |
|---|---|
-v, --verbose |
Enable verbose logging (DEBUG level) |
-i, --interactive |
Start interactive shell mode |
-e, --explain |
Explain the generated command |
-c, --config |
Print current configuration |
-s, --safety |
Enable safety mode (only useful when safety is off) |
Examples
Here are some example queries you can try:
# File operations
edison list all files larger than 10MB
edison create a new directory called "project"
edison find files modified in the last 24 hours
# System information
edison check CPU usage
edison show network connections
edison how much disk space do I have left
# Text processing
edison count lines in all python files
edison find lines containing "error" in log files
edison replace "old" with "new" in all text files
Tips for Effective Queries
- Be specific: The more specific your query, the better the generated command
- Include parameters: Mention specific filenames, sizes, or other parameters
- Start with verbs: Commands usually work best when starting with actions like "find", "list", "create"
- Use common terminology: Avoid obscure technical terms when possible
Next Steps
Once you're comfortable with basic usage, explore Advanced Features to learn about interactive mode, command explanations, and more.