afbe270181
Two changes: 1. structured-add-commands: The implicit note shorthand (kb "text") caused accidental note creation from mistyped commands. Replaced with explicit kb addnote <text> command. Root command reverts to standard Cobra behaviour. Updated examples, tests, SKILL.md, and specs. 2. split-readme-developer-docs: Moved build-from-source instructions, release process, API reference, and ROCm migration notes from README.md into a new DEVELOPER.md. README now links to DEVELOPER.md for dev workflows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
675 B
Go
38 lines
675 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var examplesCmd = &cobra.Command{
|
|
Use: "examples",
|
|
Short: "Show common usage examples",
|
|
Args: cobra.NoArgs,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Print(`Add notes:
|
|
kb addnote "Remember to update DNS records"
|
|
kb addnote "Server room is building 3" --tags ops
|
|
|
|
Add files:
|
|
kb addfile report.pdf
|
|
kb addfile ~/docs/ --recursive --tags reference
|
|
|
|
Search:
|
|
kb search "how to restart nginx"
|
|
kb search "deploy" --tags ops --top 5
|
|
|
|
Manage documents:
|
|
kb list --type pdf
|
|
kb info 3
|
|
kb tag 3 --add important,ops
|
|
kb remove 3 --yes
|
|
`)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(examplesCmd)
|
|
}
|