cmd

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 45 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:     "alpacon",
	Aliases: []string{"ac"},
	Short:   "Use Alpacon, the AI-native PAM, from the terminal",
	Long: `Alpacon CLI is the command-line client for Alpacon, the AI-native PAM.
Humans, AI agents, and CI/CD run commands—each judged, recorded, and bounded.

Quick start (for humans and AI agents):

  1. alpacon server ls                      # find the server to target
  2. alpacon work-session create \          # open + activate a scoped session
       --purpose "<what you're doing>" \    #   (prints a SESSION_ID)
       --scope command,websh \              #   (scopes: command, editor, sudo, tunnel, webftp, websh)
       --server <SERVER> \
       --expires-in 1h \                    #   (required non-interactively; or --expires-at <RFC3339>)
       --use --wait
  3. alpacon exec <SERVER> -- <COMMAND>     # run work inside the session
  4. alpacon work-session complete <SESSION_ID>  # finish the session when done

AI agents add --requester-type agent to step 2 and drop --use and websh, which an
agent session refuses; step 3 then names the session before the server:
  alpacon exec --work-session <SESSION_ID> <SERVER> -- <COMMAND>

See 'alpacon work-session --help' for session lifecycle and error codes.`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		switch utils.OutputFormat {
		case utils.OutputFormatTable, utils.OutputFormatJSON:
			return nil
		default:
			return fmt.Errorf("invalid --output value %q (expected %q or %q)",
				utils.OutputFormat, utils.OutputFormatTable, utils.OutputFormatJSON)
		}
	},
	Run: func(cmd *cobra.Command, args []string) {
		if showVersion {
			runVersion()
			return
		}
		utils.ShowLogo(buildWelcomeLines())
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

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