Skip to content

SecDev-Lab/wish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

wish

Tests Code Quality Python 3.11+ License: AGPL v3

AI-Powered Penetration Testing Command Center

Overview

wish is a workflow-aware AI command center designed to accelerate penetration testers' thinking and reduce context-switching costs.

Installation

pip install wish-sh

Setup

OpenAI API Key Configuration

wish requires an OpenAI API key for AI functionality. Configure it using one of these methods:

Option 1: Configuration File (Recommended)

# Initialize configuration file
wish-ai-validate --init-config

# Set your API key
wish-ai-validate --set-api-key "your-openai-api-key-here"

Option 2: Environment Variable

export OPENAI_API_KEY="your-openai-api-key-here"

Option 3: Manual Configuration Edit ~/.wish/config.toml:

[llm]
api_key = "your-openai-api-key-here"
model = "gpt-4o"

Getting an OpenAI API Key

  1. Visit OpenAI API Platform
  2. Sign in or create an account
  3. Go to "API Keys" section
  4. Click "Create new secret key"
  5. Copy the generated key and set it as shown above

⚠️ Important: Keep your API key secure and never commit it to version control.

Usage

wish

Note: On first launch, wish will download and index the HackTricks knowledge base. This may take a few minutes but only happens once.

Verifying Setup

To verify your API key is configured correctly:

Option 1: Using wish-ai validation tool

# Install wish-ai package and run validation
pip install ./packages/wish-ai
wish-ai-validate

Option 2: Using main application

# The application will validate the API key on startup
wish --version

If you see authentication errors, double-check your OPENAI_API_KEY environment variable.

Development

Quick Start (Development Environment)

# 1. Clone and navigate to the project
git clone <repository-url>
cd wish

# 2. Install dependencies
uv sync --all-packages --dev

# 3. Set up OpenAI API key
export OPENAI_API_KEY="your-openai-api-key-here"

# 4. Run wish-cli directly
uv run wish

Development Commands

# Setup development environment
make dev-setup

# Run tests
make test

# Format code
make format

# Run linting
make lint

# Run specific package tests
cd packages/wish-cli && uv run pytest

# Run E2E tests
uv run pytest e2e-tests/

Package Development

# Work on specific package
cd packages/wish-cli

# Install package in development mode
uv sync --dev

# Run package-specific tests
uv run pytest tests/

# Build package
uv build

Troubleshooting

Common Issues

"No module named 'wish_cli'" in Development

# Solution: Use uv run instead of direct execution
uv run wish

# Or install in development mode
pip install -e .

OpenAI API Authentication Errors

# Check your API key is set
echo $OPENAI_API_KEY

# Verify API key configuration
wish-ai-validate --check-env

# Re-initialize configuration
wish-ai-validate --init-config
wish-ai-validate --set-api-key "your-key-here"

Import or Dependency Issues

# Reinstall all dependencies
uv sync --reinstall --all-packages --dev

# Clear uv cache
uv cache clean

# Check Python version (requires 3.11+)
python --version

Development Environment Setup

# Ensure you're in the correct directory
cd wish

# Install all workspace packages
uv sync --all-packages --dev

# Verify installation
uv run python -c "import wish_cli; print('βœ… Installation successful')"

Performance Issues

Slow Startup

  • Cause: OpenAI API key validation
  • Solution: Use cached configuration or environment variables

High Memory Usage

  • Cause: Rich console history retention
  • Solution: Limit history size in configuration

UI Responsiveness

  • Cause: Blocking operations in main thread
  • Solution: All operations are async by design

Getting Help

  • GitHub Issues: Report bugs
  • Documentation: Check docs/ directory for detailed guides
  • Community: Join our development discussions

Sliver C2 Integration (Optional)

wish supports integration with Sliver C2 framework for post-exploitation workflows.

Prerequisites

  1. Sliver server installed and running
  2. Valid operator configuration file
  3. Active implants/beacons (for command execution)

See Sliver Setup Guide for detailed instructions.

Packages

  • wish-models: Core data models and validation
  • wish-core: Business logic and state management
  • wish-ai: LLM integration and plan generation
  • wish-tools: Tool integrations and parsers
  • wish-knowledge: RAG and knowledge base integration
  • wish-c2: C2 framework connectors
  • wish-cli: Main CLI application

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.

About

Your Wish, Our Command

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages