Source Types¶
How DevOpsMaestro resolves input sources for the -f flag.
Overview¶
The -f flag accepts multiple source types, auto-detected from the path:
| Source Type | Example | Description |
|---|---|---|
| File | -f plugin.yaml |
Local file path |
| URL | -f https://example.com/plugin.yaml |
HTTP/HTTPS URL |
| GitHub | -f github:user/repo/path.yaml |
GitHub shorthand |
| Stdin | -f - |
Read from stdin |
File Source¶
Read from local filesystem:
dvm apply -f workspace.yaml
nvp apply -f ~/configs/telescope.yaml
nvp apply -f ./plugins/my-plugin.yaml
Both relative and absolute paths work.
URL Source¶
Fetch from HTTP/HTTPS URLs:
nvp apply -f https://raw.githubusercontent.com/user/repo/main/plugin.yaml
nvp apply -f https://example.com/configs/workspace.yaml
URLs are auto-detected by the http:// or https:// prefix.
GitHub Shorthand¶
Convenient shorthand for GitHub raw files:
This expands to:
Format¶
- Assumes
mainbranch - Converts to raw.githubusercontent.com URL
Stdin Source¶
Read from standard input:
# Pipe from file
cat plugin.yaml | nvp apply -f -
# Pipe from command
curl -s https://example.com/plugin.yaml | nvp apply -f -
# Here document
nvp apply -f - << 'EOF'
apiVersion: devopsmaestro.io/v1
kind: NvimPlugin
metadata:
name: my-plugin
spec:
repo: user/my-plugin
EOF
Use - as the filename to read from stdin.
Auto-Detection¶
The source type is automatically detected from the path prefix:
| Prefix | Source Type |
|---|---|
- (literal dash) |
Stdin |
http:// or https:// |
URL |
github: |
GitHub shorthand |
| (anything else) | Local file |
Examples¶
Install Plugin from GitHub¶
Apply Multiple from URLs¶
nvp apply -f https://example.com/telescope.yaml
nvp apply -f https://example.com/treesitter.yaml
nvp apply -f https://example.com/lspconfig.yaml
Scripted Installation¶
#!/bin/bash
plugins=(telescope treesitter lspconfig nvim-cmp)
for plugin in "${plugins[@]}"; do
nvp apply -f "github:rmkohlman/nvim-yaml-plugins/plugins/${plugin}.yaml"
done
nvp generate
From Curl¶
Error Handling¶
| Error | Cause | Solution |
|---|---|---|
file not found |
File doesn't exist | Check path |
failed to fetch URL |
Network error or 404 | Check URL, network |
invalid YAML |
Malformed YAML | Validate YAML syntax |
unknown kind |
Unsupported resource type | Check kind field |
Next Steps¶
- Architecture - Internal architecture
- dvm Commands - Command reference
- nvp Commands - Command reference