id = "charm" name = "Charm" homepage = "https://github.com/charmbracelet/charm" description = "Charm is a set of tools that makes adding a backend to your terminal-based applications fun and easy." # Charm's star, as the charmbracelet organisation's avatar — the repository # publishes only a wide header image. icon = "https://github.com/charmbracelet.png" executables = ["charm"] [dotfiles] # Charm has no config file: the client is configured entirely by environment # variables (README, "Environment variables": CHARM_HOST, CHARM_SSH_PORT, # CHARM_HTTP_PORT, CHARM_KEY_TYPE, CHARM_DATA_DIR, CHARM_IDENTITY_KEY). What # lands in the data directory is the account keypair and local databases. paths = [] # client/client.go NewClient() and kv/kv.go OpenWithDefaults() put the Charm KV # store at `/kv/` — a BadgerDB the tools (skate, glow, and # anything built on Charm KV) sync from the Charm Cloud themselves. A local # database, not config, and not something to copy between machines. exclude = ["[dataHome]/charm/*/kv/"] # Where: client/client.go DataPath() — "$CHARM_DATA_DIR/$CHARM_HOST", else # `gap.NewScope(gap.User, filepath.Join("charm", cc.Config.Host)).DataPath("")`. # muesli/go-app-paths resolves that user scope to ~/Library/Application Support # on macOS (paths_darwin.go), $XDG_DATA_HOME or ~/.local/share on Linux # (paths_unix.go) and the LocalAppData known folder on Windows # (paths_windows.go) — the three names of one location, which is [dataHome]. # The host segment is a glob because it is CHARM_HOST — cloud.charm.sh by # default, another domain for a self-hosted `charm serve`. # # What: NewClient() generates `charm_` in that directory via # charmbracelet/keygen, which also writes the public half as `.pub` # (keygen.go: "private key filename path; public key will have .pub appended"). # CHARM_KEY_TYPE is ed25519 by default and rsa is the other value the client # looks for, so both names are listed. This keypair *is* the Charm account — # `charm backup-keys` exists to move it to a new machine — so unlike a # machine-bound session it is worth carrying, and it is a private key, so it is # carried as a secret. The `.pub` sibling is deliberately not listed: it is the # public half and nothing is protected by it. secret = [ "[dataHome]/charm/*/charm_ed25519", "[dataHome]/charm/*/charm_rsa", ] [commands] format = 1 label = "Charm" description = "Read and write the Charm key-value store. Run charm with no arguments for the TUI; accounts, keys, fs and crypt commands are left out." quality = "ai-draft" base = "fig:charm" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/charm.ts" license = "MIT" [[commands.subcommand]] path = ["kv", "get"] label = "Get a value" description = "Get a value for a key, optionally in a named database (key@db)." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/charm.ts" license = "MIT" [[commands.subcommand.field]] id = "key" label = "Key" description = "KEY or KEY@DB." type = "string" position = 0 min = 1 sources = ["fig"] [[commands.subcommand.task]] id = "get" label = "Get" fields = ["key"] required = ["key"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["key"] [[commands.subcommand]] path = ["kv", "set"] label = "Set a value" description = "Set a value for a key, optionally in a named database (key@db)." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/charm.ts" license = "MIT" [[commands.subcommand.field]] id = "key" label = "Key" description = "KEY or KEY@DB." type = "string" position = 0 min = 1 sources = ["fig"] [[commands.subcommand.field]] id = "value" label = "Value" description = "Value to store." type = "string" position = 1 min = 1 sources = ["fig"] [[commands.subcommand.task]] id = "set" label = "Set" fields = ["key", "value"] required = ["key", "value"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["key", "value"] [[commands.subcommand]] path = ["kv", "list"] label = "List pairs" description = "List all key-value pairs, optionally for one database (@db)." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/charm.ts" license = "MIT" [[commands.subcommand.field]] id = "db" label = "Database" description = "Optional @DB to list." type = "string" position = 0 sources = ["fig"] [[commands.subcommand.task]] id = "list" label = "List" fields = ["db"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["db"]