Skip to main content

nut resource

Manage and generate resources (images, audio, video) using AI.
nut resource [command]
Aliases: resource, resources

Overview

The nut resource command enables you to generate media assets using AI models. Create images, audio, and video directly from the command line for use in your projects, documentation, or marketing materials.

nut resource generate-image

Generate an image using AI models via Replicate.
nut resource generate-image <prompt> [options]
nut resource image <prompt> [options]
Aliases: generate-image, image Arguments:
  • prompt - Description of the image to generate
Options:
  • --model <model> - AI model to use
  • --size <size> - Output image size
  • --output <path> - Save location for the generated image
  • --style <style> - Style preference (realistic, artistic, etc.)
Examples:
# Generate a simple image
nut resource image "A serene mountain landscape at sunset"

# Generate with specific parameters
nut resource generate-image "Modern office workspace" --size 1024x1024 --style realistic

# Save to specific location
nut resource image "Product mockup for mobile app" --output ./assets/mockup.png
Be specific in your prompts. Include details about style, composition, lighting, and mood for better results.

nut resource generate-audio

Generate audio from text using AI text-to-speech.
nut resource generate-audio <text> [options]
nut resource audio <text> [options]
Aliases: generate-audio, audio Arguments:
  • text - Text to convert to speech
Options:
  • --voice <voice> - Voice model to use
  • --output <path> - Save location for the audio file
  • --format <format> - Audio format (mp3, wav, etc.)
Model: Uses minimax/speech-02-turbo for high-quality text-to-speech generation. Examples:
# Generate audio narration
nut resource audio "Welcome to our platform. Let's get started with the basics."

# Generate with specific voice and output
nut resource generate-audio "This is a test message" --voice female --output ./audio/test.mp3

# Create voiceover for video
nut resource audio "In this tutorial, we'll explore the key features" --output ./voiceover.mp3
Generated audio is suitable for narration, voiceovers, podcast intros, and other audio content needs.

nut resource generate-video

Generate a video using AI.
nut resource generate-video <prompt> [options]
nut resource video <prompt> [options]
Aliases: generate-video, video Arguments:
  • prompt - Description of the video to generate
Options:
  • --duration <seconds> - Video length
  • --output <path> - Save location for the video
  • --fps <fps> - Frames per second
  • --resolution <resolution> - Video resolution
Model: Uses google/veo-3.1-fast for fast, high-quality video generation. Examples:
# Generate a short video
nut resource video "A drone flying over a coastal city at sunrise"

# Generate with specific parameters
nut resource generate-video "Time-lapse of clouds moving across the sky" --duration 10 --resolution 1920x1080

# Save to specific location
nut resource video "Product demonstration animation" --output ./videos/demo.mp4
Video generation takes longer than image or audio. Be patient and ensure you have a stable internet connection.

Use Cases

Documentation Assets

# Create diagrams and illustrations
nut resource image "System architecture diagram showing microservices" --style technical

# Generate tutorial images
nut resource image "User interface mockup for dashboard" --size 1200x800

Marketing Materials

# Social media content
nut resource image "Eye-catching banner for product launch" --size 1200x630

# Video ads
nut resource video "Product showcase with dynamic camera movements" --duration 15

Audio Content

# Podcast intros
nut resource audio "Welcome to the Tech Talk podcast, where we discuss the latest innovations"

# Tutorial narration
nut resource audio "Step one: Open the application and navigate to settings" --voice professional

Best Practices

The quality of generated resources depends heavily on prompt clarity. Include specific details about what you want, including style, mood, colors, composition, and any key elements.
If the first result isn’t perfect, refine your prompt and try again. Small changes in wording can produce significantly different results.
Use the --output option to save files in organized directories (e.g., ./assets/images/, ./media/audio/, ./videos/).
AI resource generation can be computationally expensive. Be mindful of the number and complexity of assets you generate, especially videos.

Model Information

  • Images: Generated via Replicate’s AI models
  • Audio: Uses MiniMax speech-02-turbo for natural-sounding speech
  • Video: Powered by Google’s Veo 3.1 Fast model for efficient video generation
Resource generation requires appropriate API keys to be configured. Use nut config set-key to set up your credentials.