-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Machines Snippets Add
Saves a command against a machine, or against every machine.
ed machines snippets add [--shared] [--json] <machine> <title> <command...>
| Name | Type / values | Default | What it does |
|---|---|---|---|
<machine> |
string, required | none | Machine name, ssh alias, id or unambiguous prefix. Still required with --shared, and still has to resolve. |
<title> |
string, required | none | What to call it. |
<command...> |
one or more words, required | none | The command to save, captured verbatim and joined with single spaces. |
| Name | Type / values | Default | What it does |
|---|---|---|---|
--shared |
flag | off | Offer it on every machine rather than just this one, which is what leaving the machine unset does in the UI. |
--json |
flag | off | Emit JSON on stdout instead of the line. |
--help, -h
|
flag | off | Print the help for this command on stdout and exit 0. |
$ ed machines snippets add tuf logs journalctl -xe --no-pager
saved logs on Asus TUF 7
{
"command": "journalctl -xe --no-pager",
"id": "F8D5CE93-C9B4-4A05-9109-9AEB1BD806BA",
"index": 0,
"sharedAcrossMachines": false,
"title": "logs"
}As with forwards add, index is 0 rather than the new row's position. List
the snippets afterwards if you need the number.
ed machines snippets add tuf logs journalctl -xe --no-pager
ed machines snippets add tuf disk df -h
ed machines snippets add --shared tuf uptime uptime
Appends to snippets.json and posts machinesChanged. Everything after the
title is the command, verbatim, so --shared and --json have to come before
the machine name; written after the title they are saved as part of the command
instead of read as flags.
The words are joined with single spaces, so the saved string is not
byte-identical to what you typed when you used several spaces or quoted an
argument containing them. A command that is empty or only whitespace exits 1
with a snippet needs a command to run.
A shared snippet has no machine of its own, so it survives
ed machines rm and shows up on every machine's list.
-
ed machines, the rest of this group - All
edcommands
Auto-generated from docs/, edit the docs in the repo, not the wiki.
CLI reference
Companion
- Deploy
- Concepts
- Concepts Memory
- Concepts Ingestion
- Concepts Search
- Concepts Chat
- Concepts Learning
- Concepts Brain
- Concepts Friend
- Hosts
- Stack
- Status
- Doctor
- Search
- Index
- Ingest
- Episodes
- Sync
- Observations
- Reflect
- Beliefs
- Ask
- Extract
- Claims
- Corroborate
- Runs
- Chat
- Conversations
- Forget
- Export
- Import
- Erase
- Wipe
- Episode
- Nightly
- Reason
- Personas
- Council
- Lenses
- Core
- Why
- Hypotheses
- Predictions
- Commitments
- Discrepancies
- Calibration
- Inquire
- Entities
- Eval
- Standup
- Machines
- Baselines
- Connectors
- Facts
- Correct
- Weekly
- Db
Guides