cmd

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionCmd = &cobra.Command{
	Use:   "action <ai-action-or-invocation> [prompt...]",
	Short: "Create an AI action post or reply and wait for generated media",
	Long:  "Create an AI action root thread or reply, then poll the submitted answer until media generation completes, fails, or times out.\n\nRun `treecli action actions` to see the current model-backed AI actions.\n\nUse --duration to request a specific audio or video length in seconds; the backend clamps it to the model's allowed range.",
	Example: "  treecli action flux \"a red kite over Bangkok\"\n" +
		"  treecli action !kling \"camera orbit around a bonsai tree\"\n" +
		"  treecli action \"!veo3 slow dolly through a neon alley\"\n" +
		"  treecli action eleven_tts \"read this in a crisp narration voice\"\n" +
		"  treecli action sfx \"rain, tires on wet asphalt, distant thunder\"\n" +
		"  treecli action !stableaudio \"ambient build, 120 BPM\" --duration 90\n" +
		"  treecli action --reply-to 7a5e85c9-9dca-4140-ba9a-f5db0030afca flux \"make this warmer\"\n" +
		"  treecli action --reply-to http://localhost:5173/quest/7a5e85c9-9dca-4140-ba9a-f5db0030afca flux \"make this warmer\"",
	Args:              cobra.MinimumNArgs(1),
	RunE:              runAction,
	ValidArgsFunction: completeActionArgs,
}
View Source
var AppHostOverride string
View Source
var BackendURLOverride string
View Source
var BillingCmd = &cobra.Command{
	Use:   "billing",
	Short: "Manage AI usage billing (USD via Stripe, or BSV via a local wallet)",
	Long: `Manage how Treechat charges you for AI usage.

Two lanes:
  USD  Stripe card on file, charged pay-as-you-go. Account-tied: requires
       ` + "`treecli login`" + `. See: billing checkout | status | mode | sync.
  BSV  A local treechat-style wallet pays directly from its balance. No login
       required. See: billing wallet new | import | address.`,
}

BillingCmd is the parent for both billing lanes:

  • USD (Stripe): account-tied, requires `treecli login`.
  • BSV: a local wallet pays directly, no login required (see `billing wallet`).
View Source
var CurrentVersion = "dev"

CurrentVersion is replaced by the release workflow. Dev builds keep "dev".

View Source
var GenerateCmd = &cobra.Command{
	Use:   "generate <ai-action> [prompt...]",
	Short: "Generate AI media directly and download it locally (never creates a post)",
	Long: "Generate AI media through the direct generation API and save it to a local file.\n\n" +
		"This charges your account (USD/BSV) and NEVER touches the posting infra — no Answer, " +
		"no Quest, no thread, nothing on your feed.\n\n" +
		"Pass arbitrary model inputs with repeatable --input key=value (values are parsed as JSON " +
		"when possible, else treated as a string). Use @path in --input values to upload local " +
		"images, video, or audio before generation. Chain generations or steer a model with " +
		"--reference (run:<id> reuses a prior generation's output as the model's reference; " +
		"@path uploads a local file; a public URL is passed through). Music models accept " +
		"--instrumental and --duration. Use --payment usd or --payment bsv to choose the " +
		"payment rail for this generation; omit it to use your account default.\n\n" +
		"Run `treecli generate actions --verbose` or `treecli generate describe <ai-action>` " +
		"to see available AI actions, descriptions, settings, and examples.",
	Example: "  treecli generate flux \"soft-gradient app icon, violet to indigo\" --out icon.png\n" +
		"  treecli generate flux2 \"wide hero banner\" --out banner.webp --input aspect_ratio=3:1\n" +
		"  treecli generate kling2 \"slow handheld push-in\" --reference @image.png --out animated.mp4\n" +
		"  treecli generate qwen \"replace the sky with stars\" --reference @image.png --out edited.png\n" +
		"  treecli generate tts \"Abigail read this in a crisp narration voice\" --out chatterbox.mp3\n" +
		"  treecli generate clone \"read this in the sampled voice\" --reference @voice.mp3 --out clone.mp3\n" +
		"  treecli generate eleven_tts \"read this in a crisp narration voice\" --out narration.mp3\n" +
		"  treecli generate sfx \"rain, tires on wet asphalt, distant thunder\" --reference @clip.mp4 --out sfx.mp3\n" +
		"  treecli generate suno \"warm ambient build, 122 BPM\" --duration 20 --out sketch.mp3\n" +
		"  treecli generate suno \"cinematic electronic, builds to a drop\" --instrumental --duration 22 \\\n" +
		"      --reference run:abc123 --out track.mp3\n" +
		"  treecli generate suno \"...\" --duration 22 --quote\n" +
		"  treecli generate actions --direct-only\n" +
		"  treecli generate describe flux2",
	Args:              cobra.MinimumNArgs(1),
	RunE:              runGenerate,
	ValidArgsFunction: completeGenerateArgs,
}

GenerateCmd generates AI media via the direct (post-less) API and saves it locally.

View Source
var GetCmd = &cobra.Command{
	Use:   "get",
	Short: "Get information about various resources",
	Long:  `Fetch and display information about threads, answers, or other resources.`,
}
View Source
var LoginCmd = &cobra.Command{
	Use:   "login",
	Short: "Log in to your account",
	Long:  `Authenticate and log in to your tree account to access protected features.`,
	RunE:  runLogin,
}

LoginCmd represents the login command

View Source
var NewCmd = &cobra.Command{
	Use:   "new",
	Short: "Create new resources",
	Long:  `Create new resources such as posts or clips.`,
}
View Source
var OnboardCmd = &cobra.Command{
	Use:   "onboard",
	Short: "Output agent instructions for treecli",
	Long:  "Output agent-facing onboarding guidance and packaged-skill installation instructions for treecli.",
	RunE:  runOnboard,
}
View Source
var ProfileCmd = &cobra.Command{
	Use:   "profile",
	Short: "Inspect and switch treecli profiles",
	Long:  `List, inspect, and switch the saved treecli profiles.`,
}
View Source
var SelectedProfile string
View Source
var SkillsCmd = &cobra.Command{
	Use:   "skills",
	Short: "List, emit, and install packaged treecli skills",
}
View Source
var UpdateCmd = &cobra.Command{
	Use:   "update [version]",
	Short: "Update treecli to the latest release",
	Long: "Download a treecli GitHub Release archive, verify it against checksums.txt, " +
		"and replace the current CLI binary.\n\n" +
		"Without a version argument, treecli installs the latest published release. Pass a " +
		"specific tag such as v0.1.2 to install that release instead. Self-update currently " +
		"supports macOS and Linux release archives.",
	Example: "  treecli update\n" +
		"  treecli update --check\n" +
		"  treecli update v0.1.2\n" +
		"  treecli update --install-dir ~/.local/bin",
	Args: cobra.MaximumNArgs(1),
	RunE: runUpdate,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL