@elisym/cli 0.11.4 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -10
- package/dist/index.js +25 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,16 +89,17 @@ docker run --rm -it \
|
|
|
89
89
|
|
|
90
90
|
## Commands
|
|
91
91
|
|
|
92
|
-
| Command | Description
|
|
93
|
-
| ------------------------------------ |
|
|
94
|
-
| `elisym init [name]` | Interactive wizard - create agent identity
|
|
95
|
-
| `elisym init [name] --config <path>` | Non-interactive - load fields from an `elisym.yaml` template
|
|
96
|
-
| `elisym init [name] --
|
|
97
|
-
| `elisym
|
|
98
|
-
| `elisym start [name]
|
|
99
|
-
| `elisym
|
|
100
|
-
| `elisym
|
|
101
|
-
| `elisym
|
|
92
|
+
| Command | Description |
|
|
93
|
+
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
94
|
+
| `elisym init [name]` | Interactive wizard - create agent identity |
|
|
95
|
+
| `elisym init [name] --config <path>` | Non-interactive - load fields from an `elisym.yaml` template |
|
|
96
|
+
| `elisym init [name] --defaults` | Non-interactive - skip every prompt and use wizard defaults (description, default relays, no payments, no LLM, no encryption). Mutually exclusive with `--config`; implies `--yes`. |
|
|
97
|
+
| `elisym init [name] --local` | Create in project `.elisym/<name>/` (default: `~/.elisym/<name>/`) |
|
|
98
|
+
| `elisym start [name]` | Start agent in provider mode |
|
|
99
|
+
| `elisym start [name] --verbose` | Start with structured debug logs to stderr (publish acks, pool resets, config resolution). Also togglable via `ELISYM_DEBUG=1` or `LOG_LEVEL=debug`. |
|
|
100
|
+
| `elisym list` | List all agents (project-local + home-global) |
|
|
101
|
+
| `elisym profile [name]` | Edit agent profile, wallet, and LLM settings |
|
|
102
|
+
| `elisym wallet [name]` | Show Solana wallet balance |
|
|
102
103
|
|
|
103
104
|
Skills live inside each agent directory at `<agentDir>/skills/<skill-name>/SKILL.md`:
|
|
104
105
|
|
package/dist/index.js
CHANGED
|
@@ -960,6 +960,14 @@ __export(init_exports, {
|
|
|
960
960
|
cmdInit: () => cmdInit,
|
|
961
961
|
fetchModels: () => fetchModels3
|
|
962
962
|
});
|
|
963
|
+
function buildDefaultYaml() {
|
|
964
|
+
return ElisymYamlSchema.parse({
|
|
965
|
+
description: "An elisym AI agent",
|
|
966
|
+
relays: [...RELAYS],
|
|
967
|
+
payments: [],
|
|
968
|
+
security: {}
|
|
969
|
+
});
|
|
970
|
+
}
|
|
963
971
|
async function fetchModels3(provider, apiKey) {
|
|
964
972
|
const descriptor = getLlmProvider(provider);
|
|
965
973
|
if (!descriptor) {
|
|
@@ -980,6 +988,10 @@ async function cmdInit(nameArg, options = {}) {
|
|
|
980
988
|
const { default: inquirer } = await import('inquirer');
|
|
981
989
|
const cwd = process.cwd();
|
|
982
990
|
console.log("\n elisym agent setup\n");
|
|
991
|
+
if (options.config && options.defaults) {
|
|
992
|
+
throw new Error("--config and --defaults are mutually exclusive; pick one.");
|
|
993
|
+
}
|
|
994
|
+
const skipConfirms = options.yes || options.defaults;
|
|
983
995
|
let template;
|
|
984
996
|
if (options.config) {
|
|
985
997
|
const configPath = resolve(cwd, options.config);
|
|
@@ -987,14 +999,17 @@ async function cmdInit(nameArg, options = {}) {
|
|
|
987
999
|
template = ElisymYamlSchema.parse(YAML.parse(raw) ?? {});
|
|
988
1000
|
console.log(` Loaded template from ${configPath}
|
|
989
1001
|
`);
|
|
1002
|
+
} else if (options.defaults) {
|
|
1003
|
+
template = buildDefaultYaml();
|
|
1004
|
+
console.log(" Using default skeleton (no LLM, no payments). Edit later via `profile`.\n");
|
|
990
1005
|
}
|
|
991
1006
|
const agentName = await resolveAgentName(nameArg, inquirer);
|
|
992
1007
|
const target = pickTarget(options);
|
|
993
1008
|
const sameLocation = target === "home" ? resolveInHome(agentName) : resolveInProject(agentName, cwd);
|
|
994
1009
|
if (sameLocation) {
|
|
995
|
-
if (
|
|
1010
|
+
if (skipConfirms) {
|
|
996
1011
|
throw new Error(
|
|
997
|
-
`Agent "${agentName}" already exists at ${sameLocation}. Refusing to overwrite secrets under --yes. Remove the directory first or choose a different name.`
|
|
1012
|
+
`Agent "${agentName}" already exists at ${sameLocation}. Refusing to overwrite secrets under --yes/--defaults. Remove the directory first or choose a different name.`
|
|
998
1013
|
);
|
|
999
1014
|
}
|
|
1000
1015
|
const { overwrite } = await inquirer.prompt([
|
|
@@ -1010,7 +1025,7 @@ async function cmdInit(nameArg, options = {}) {
|
|
|
1010
1025
|
return;
|
|
1011
1026
|
}
|
|
1012
1027
|
} else if (target === "project" && resolveInHome(agentName)) {
|
|
1013
|
-
if (!
|
|
1028
|
+
if (!skipConfirms) {
|
|
1014
1029
|
const { shadow } = await inquirer.prompt([
|
|
1015
1030
|
{
|
|
1016
1031
|
type: "confirm",
|
|
@@ -1025,7 +1040,7 @@ async function cmdInit(nameArg, options = {}) {
|
|
|
1025
1040
|
}
|
|
1026
1041
|
}
|
|
1027
1042
|
} else if (target === "home" && resolveInProject(agentName, cwd)) {
|
|
1028
|
-
if (!
|
|
1043
|
+
if (!skipConfirms) {
|
|
1029
1044
|
const { proceed } = await inquirer.prompt([
|
|
1030
1045
|
{
|
|
1031
1046
|
type: "confirm",
|
|
@@ -1114,6 +1129,8 @@ async function cmdInit(nameArg, options = {}) {
|
|
|
1114
1129
|
passphrase = options.passphrase;
|
|
1115
1130
|
} else if (envPassphrase !== void 0) {
|
|
1116
1131
|
passphrase = envPassphrase;
|
|
1132
|
+
} else if (options.defaults) {
|
|
1133
|
+
passphrase = "";
|
|
1117
1134
|
} else {
|
|
1118
1135
|
const answer = await inquirer.prompt([
|
|
1119
1136
|
{
|
|
@@ -3834,7 +3851,10 @@ function safe(fn) {
|
|
|
3834
3851
|
};
|
|
3835
3852
|
}
|
|
3836
3853
|
var program = new Command().name("elisym").description("CLI agent runner for the elisym network").version(PACKAGE_VERSION);
|
|
3837
|
-
program.command("init [name]").description("Create a new agent").option("-c, --config <path>", "Load fields from an elisym.yaml template (non-interactive)").option(
|
|
3854
|
+
program.command("init [name]").description("Create a new agent").option("-c, --config <path>", "Load fields from an elisym.yaml template (non-interactive)").option(
|
|
3855
|
+
"--defaults",
|
|
3856
|
+
"Skip every prompt and use the same defaults the wizard would have suggested (description, default relays, no payments, no LLM, no encryption). Mutually exclusive with --config."
|
|
3857
|
+
).option("--local", "Create in project <project>/.elisym/<name>/ (default: ~/.elisym/<name>/)").option(
|
|
3838
3858
|
"--passphrase <value>",
|
|
3839
3859
|
'Passphrase to encrypt secrets at rest. Empty string ("") skips encryption. Also reads ELISYM_PASSPHRASE env var. When neither is provided, prompts interactively.'
|
|
3840
3860
|
).option(
|