nut resource
Manage and generate resources (images, audio, video) using AI.
resource, resources
Overview
Thenut 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.
generate-image, image
Arguments:
prompt- Description of the image to generate
--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.)
nut resource generate-audio
Generate audio from text using AI text-to-speech.
generate-audio, audio
Arguments:
text- Text to convert to speech
--voice <voice>- Voice model to use--output <path>- Save location for the audio file--format <format>- Audio format (mp3, wav, etc.)
minimax/speech-02-turbo for high-quality text-to-speech generation.
Examples:
Generated audio is suitable for narration, voiceovers, podcast intros, and other audio content needs.
nut resource generate-video
Generate a video using AI.
generate-video, video
Arguments:
prompt- Description of the video to generate
--duration <seconds>- Video length--output <path>- Save location for the video--fps <fps>- Frames per second--resolution <resolution>- Video resolution
google/veo-3.1-fast for fast, high-quality video generation.
Examples:
Use Cases
Documentation Assets
Marketing Materials
Audio Content
Best Practices
Write detailed prompts
Write detailed prompts
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.
Iterate and refine
Iterate and refine
If the first result isn’t perfect, refine your prompt and try again. Small changes in wording can produce significantly different results.
Organize outputs
Organize outputs
Use the
--output option to save files in organized directories (e.g., ./assets/images/, ./media/audio/, ./videos/).Consider resource usage
Consider resource usage
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.