Documentation
¶
Overview ¶
Package cli wires every komando command. Design rules:
- piped or agent output is exactly one JSON envelope (or NDJSON when streaming); a terminal gets text
- an AI agent is never prompted, and missing input is an error with a hint; a person at a terminal can be asked
- exit codes are stable (see internal/out)
- destructive actions require explicit flags; changes are audited, except `update` run as root
Index ¶
- func Execute() int
- func Guard(cl *call, st *store.State, hosts []*store.Host, command string, mutating bool) error
- func GuardConns(cl *call, st *store.State, conns []*store.Conn, v driver.Verdict) error
- func GuardScript(cl *call, st *store.State, hosts []*store.Host, script string, mutating bool) error
- func RunCall(ctx context.Context, c engine.Call, args []string) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() int
Execute runs the komando program: one call, made from this process (its arguments, environment and terminal), and its exit code.
func GuardConns ¶ added in v0.18.0
GuardConns is Guard for conns. The driver classifies the operation first; destructive needs --allow-dangerous, and any change to a protected conn needs --yes. Exit code and codes match Guard so agents handle both alike.
func GuardScript ¶ added in v0.18.0
func GuardScript(cl *call, st *store.State, hosts []*store.Host, script string, mutating bool) error
GuardScript is Guard for a line komando writes whole for one of its own commands (pkg security, docker prune, the Swarm changes), where typed words are only quoted operands and the command rates its own words: the rules that copy a command's check for exec text (policy.CheckScript) and the compose-file reader do not apply.
Types ¶
This section is empty.
Source Files
¶
- approval.go
- approval_body.go
- approval_code.go
- approval_debug.go
- approval_dialog.go
- approval_encoded.go
- approval_hint.go
- approval_lang.go
- approval_lang_other.go
- approval_trust.go
- approval_view.go
- approval_win_other.go
- approval_words.go
- approval_words_id.go
- args_passthrough.go
- args_words.go
- ask_password.go
- ask_ssh.go
- audit.go
- audit_blocked.go
- audit_filter.go
- audit_identity.go
- audit_log.go
- audit_syslog.go
- audit_write.go
- cache.go
- call.go
- call_hooks.go
- cluster.go
- cluster_apply.go
- cluster_deploy.go
- cluster_exec.go
- cluster_helm.go
- cluster_hidden.go
- cluster_kctl.go
- cluster_kctl_change.go
- cluster_kctl_cp.go
- cluster_kctl_explain.go
- cluster_kctl_nodes.go
- cluster_kctl_usage.go
- cluster_kctl_verbs.go
- cluster_logs.go
- cluster_manifest_risk.go
- cluster_names.go
- cluster_run.go
- cluster_status.go
- cluster_text.go
- cluster_view.go
- cmdid.go
- common.go
- completion.go
- config.go
- config_vault_passphrase.go
- confirm_tty.go
- confirm_typed.go
- conn.go
- conn_access.go
- conn_add_save.go
- conn_aws.go
- conn_ca.go
- conn_place.go
- conn_resolve.go
- conn_tls.go
- conn_verbs.go
- copy.go
- copy_continue.go
- copy_download.go
- copy_progress.go
- copy_remote.go
- copy_stream.go
- copy_sync.go
- copy_sync_case.go
- copy_sync_guard.go
- copy_sync_sides.go
- copy_upload.go
- copy_window.go
- credential_input.go
- credential_key.go
- credential_key_rename.go
- credential_key_uninstall.go
- credential_password.go
- credential_password_cmds.go
- credential_reveal.go
- credential_run.go
- credential_run_linux.go
- credential_run_signals_unix.go
- credential_use.go
- database.go
- database_backup_seal.go
- database_dump.go
- database_dump_ca.go
- database_dump_errors.go
- database_dump_tls.go
- database_mongo.go
- database_restore_archive.go
- database_restore_stage.go
- database_shell.go
- database_text.go
- database_users.go
- database_window.go
- docker.go
- docker_compose_files.go
- docker_prune.go
- doctor.go
- doctor_labels.go
- doctor_meta_seal.go
- doctor_migrate.go
- doctor_old_copy.go
- doctor_sec.go
- doctor_sec_unix.go
- errcodes.go
- errcodes_type.go
- export.go
- export_sealed.go
- flag_age.go
- flag_alias.go
- flag_help.go
- flag_limit.go
- flag_types.go
- form.go
- form_cache.go
- form_check.go
- form_cluster.go
- form_cmd.go
- form_db.go
- form_hints_access.go
- form_hints_data.go
- form_hints_db.go
- form_hints_files.go
- form_hints_inventory.go
- form_hints_queue.go
- form_hints_servers.go
- form_kinds.go
- form_queue.go
- form_registry.go
- form_storage.go
- form_vpn.go
- form_winserver.go
- fs.go
- fs_diff.go
- fs_fleet.go
- fs_remote.go
- fs_replace.go
- fs_restore.go
- fs_sudo_path.go
- fs_write.go
- group.go
- guard.go
- guard_agents.go
- guard_before_lock.go
- guard_cd.go
- guard_dumps.go
- guard_gh_repo.go
- guard_glob.go
- guard_home.go
- guard_home_writes.go
- guard_hook.go
- guard_local_write.go
- guard_lookups.go
- guard_path.go
- guard_protected.go
- guard_readers.go
- guard_real_place.go
- guard_self.go
- guard_shell.go
- guard_shell_text.go
- guard_spawn.go
- guard_vars.go
- guard_wrappers.go
- guide.go
- guide_uninstall.go
- help.go
- help_examples.go
- help_std.go
- host.go
- host_ca.go
- host_exec.go
- host_exec_args.go
- host_exec_fleet.go
- host_exec_script.go
- host_exec_session.go
- host_facts.go
- host_facts_only.go
- host_facts_support.go
- host_facts_updates.go
- host_key_flag.go
- host_key_pinned.go
- host_login.go
- host_rm.go
- host_shell.go
- host_shell_idle.go
- host_shell_session.go
- host_sshconfig.go
- host_state.go
- host_trust.go
- host_trust_many.go
- import.go
- import_apps.go
- import_csv.go
- import_ec2.go
- import_mobaxterm.go
- import_putty.go
- import_sealed.go
- import_securecrt.go
- import_vet.go
- import_vpn.go
- inv_lookup.go
- inv_protected_replace.go
- inv_validate.go
- kinds.go
- list.go
- localtool.go
- localtool_unix.go
- login.go
- login_ask.go
- login_place.go
- login_ssh.go
- logout_aws.go
- logs_opts.go
- logs_sweep.go
- modules.go
- modules_run.go
- modules_svc.go
- personal.go
- personal_guard.go
- pick.go
- pkg.go
- pkg_security.go
- platform_nopeek_linux.go
- platform_unix.go
- policy.go
- prompter.go
- prompter_add.go
- prompter_fill.go
- prompter_next.go
- prompter_screen.go
- queue.go
- queue_sqs.go
- queue_text.go
- queue_text_nats.go
- queue_text_pubsub.go
- queue_text_rabbit.go
- queue_text_sqs.go
- queue_write.go
- readonly.go
- readonly_forms.go
- readonly_kill.go
- readonly_tools.go
- readonly_words.go
- readonly_wrappers.go
- registry.go
- registry_cloud.go
- registry_copy.go
- registry_tags.go
- registry_text.go
- rename.go
- rename_engine.go
- rename_one.go
- risk.go
- risk_keys.go
- root.go
- root_removed.go
- root_table.go
- root_table_entry.go
- root_table_move.go
- schema_kinds.go
- select.go
- sensitive.go
- snippet.go
- snippet_client.go
- sshgate.go
- sshgate_dial.go
- sshgate_line.go
- sshgate_local.go
- sshgate_localread.go
- sshgate_network.go
- sshgate_session.go
- sshgate_shell.go
- status.go
- status_line.go
- status_short.go
- stdin.go
- storage.go
- storage_download.go
- storage_ops.go
- storage_rm.go
- storage_versions.go
- suggest.go
- synonyms.go
- test_wait.go
- text.go
- text_change.go
- text_say.go
- ttyin.go
- tunnel.go
- tunnel_check.go
- tunnel_serve.go
- tunnel_spec.go
- tunnel_timeout.go
- update.go
- update_fetch.go
- update_install.go
- via.go
- vpn.go
- vpn_inv.go
- vpn_ovpn.go
- vpn_secrets.go
- vpn_serve.go
- vpn_session.go
- vpn_signin.go
- vpn_status.go
- vpn_table.go
- vpn_wglock.go
- windows.go
- windows_cp.go
- windows_facts.go
- windows_fs.go
- windows_svc.go
- windows_winrm.go
Directories
¶
| Path | Synopsis |
|---|---|
|
kit
|
|
|
gatehere
Package gatehere holds the rules of ssh-gate's server mode (--here): a phone's key that logs in to a server runs komando there through the gate, and the gate decides what may run on that server itself.
|
Package gatehere holds the rules of ssh-gate's server mode (--here): a phone's key that logs in to a server runs komando there through the gate, and the gate decides what may run on that server itself. |
|
phonekey
Package phonekey holds what `credential key install --public-key-file` (C372) checks and writes: a device's public key line for a user on a server, always behind komando's gate in server mode (option C of the U107 design).
|
Package phonekey holds what `credential key install --public-key-file` (C372) checks and writes: a device's public key line for a user on a server, always behind komando's gate in server mode (option C of the U107 design). |
|
term
Package term holds what every command prints to a terminal: how wide text is in columns, text tables and the line an empty list says.
|
Package term holds what every command prints to a terminal: how wide text is in columns, text tables and the line an empty list says. |