Skip to main content

nut resource

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

Overview

The nut resource command enables you to manage and generate media assets. Upload files, manage metadata, and generate images, audio, and video using AI models directly from the command line.

nut resource list

List all resources in your Coconut instance.
Aliases: list, ls Options:
  • -s, --search <query> - Filter resources by name, description, or tags
  • --type <type> - Filter by media type prefix (e.g. image, audio, video)
  • --json - Output as JSON
  • --api <url> - API server URL (default: “http://localhost”)
Examples:

nut resource get

Get details for a specific resource.
Aliases: get, show Arguments:
  • id - Resource ID
Options:
  • --json - Output as JSON
  • -o, --output <path> - Download resource file to local path
  • --api <url> - API server URL (default: “http://localhost”)
Examples:

nut resource add

Upload a file to resources.
Aliases: add, upload Arguments:
  • file - File path(s) to upload
Options:
  • -t, --tags <tags> - Comma-separated tags
  • -d, --description <text> - Description of the resource
  • --json - Output as JSON
  • --api <url> - API server URL (default: “http://localhost”)
Examples:

nut resource update

Update resource metadata (tags, description).
Arguments:
  • id - Resource ID to update
Options:
  • -t, --tags <tags> - Comma-separated tags (replaces existing)
  • -d, --description <text> - Description (replaces existing)
  • --json - Output as JSON
  • --api <url> - API server URL (default: “http://localhost”)
Examples:

nut resource delete

Delete a resource.
Aliases: delete, rm Arguments:
  • id - Resource ID to delete
Options:
  • -f, --force - Skip confirmation prompt
  • --json - Output as JSON
  • --api <url> - API server URL (default: “http://localhost”)
Examples:
Deleting a resource is permanent. Make sure you want to remove it before confirming.

nut resource generate-image

Generate an image using AI models via Replicate.
Aliases: generate-image, image Arguments:
  • prompt - Description of the image to generate
Options:
  • -m, --model <model> - Model to use (default: nano-banana-pro)
  • --save - Save generated image to resources (.nut/resources/)
  • -o, --output <path> - Download image to local file path
  • --api <url> - API server URL (default: “http://localhost”)
Models: Examples:
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.
Aliases: generate-audio, audio, tts Arguments:
  • text - Text to convert to speech
Options:
  • -v, --voice <id> - Voice ID (default: “English_Trustworth_Man”)
  • -s, --speed <number> - Speech speed multiplier, 0.5-2.0 (default: “1”)
  • -p, --pitch <number> - Pitch adjustment, -12 to 12 (default: “0”)
  • -e, --emotion <type> - Emotion style (auto, happy, sad, angry, fearful, surprised, disgusted) (default: “auto”)
  • -l, --language <lang> - Language boost (default: “English”)
  • -f, --format <format> - Audio format (mp3, wav, ogg) (default: “mp3”)
  • --save - Save generated audio to resources (.nut/resources/)
  • -o, --output <path> - Download audio to local file path
  • --api <url> - API server URL (default: “http://localhost”)
Model: Uses 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.
Aliases: generate-video, video, vid Arguments:
  • prompt - Description of the video to generate
Options:
  • -d, --duration <seconds> - Video duration in seconds, 5-16 (default: “8”)
  • -r, --resolution <res> - Video resolution (480p, 720p, 1080p) (default: “720p”)
  • -a, --aspect-ratio <ratio> - Aspect ratio (16:9, 9:16, 1:1) (default: “16:9”)
  • --start-frame <id> - Resource ID of image to use as first frame
  • --end-frame <id> - Resource ID of image to use as last frame
  • --no-audio - Disable AI audio generation for the video
  • --save - Save generated video to resources (.nut/resources/)
  • -o, --output <path> - Download video to local file path
  • --api <url> - API server URL (default: “http://localhost”)
Model: Uses google/veo-3.1-fast for fast, high-quality video generation. Examples:
Video generation takes longer than image or audio. Be patient and ensure you have a stable internet connection.

Use Cases

Documentation Assets

Marketing Materials

Audio Content


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 --save option to store resources in your Coconut instance, or --output to save files locally in organized directories.
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 the Coconut server to be running (nut serve) and a Replicate API token configured via nut config set replicate <token>.