@agentprojectcontext/apx 1.77.2 → 1.78.0
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 +23 -9
- package/package.json +12 -12
- package/src/core/agent/build-agent-system.js +3 -2
- package/src/core/agent/constants.js +3 -2
- package/src/core/agent/loop/greeting-guard.js +55 -0
- package/src/core/agent/loop/side-effects.js +52 -0
- package/src/core/agent/prompt-builder.js +49 -8
- package/src/core/agent/run-agent.js +13 -48
- package/src/core/agent/security.js +1 -1
- package/src/core/agent/self-memory.js +4 -2
- package/src/core/agent/skills/index-store.js +2 -2
- package/src/core/agent/skills/loader.js +3 -22
- package/src/core/agent/super-agent.js +0 -2
- package/src/core/agent/tools/handlers/call-runtime.js +4 -4
- package/src/core/agent/tools/handlers/search-sessions.js +1 -1
- package/src/core/agent/tools/handlers/set-permission-mode.js +11 -4
- package/src/core/agent/tools/names.js +58 -0
- package/src/core/apc/context-copy.js +1 -1
- package/src/core/apc/frontmatter.js +85 -0
- package/src/core/apc/parser.js +9 -21
- package/src/core/apc/paths.js +8 -8
- package/src/core/apc/scaffold.js +5 -4
- package/src/core/channels/telegram/config.js +201 -0
- package/src/core/config/index.js +25 -183
- package/src/core/config/paths.js +54 -1
- package/src/core/confirmation/adapters/web.js +1 -1
- package/src/core/deck/manifest.js +12 -12
- package/src/core/desktop/autostart.js +3 -2
- package/src/core/desktop/process.js +4 -4
- package/src/core/engines/presets.js +2 -2
- package/src/core/http-tools/browser.js +1 -1
- package/src/core/http-tools/catalog.js +551 -0
- package/src/core/http-tools/fetch.js +1 -1
- package/src/core/http-tools/glob.js +3 -3
- package/src/core/http-tools/grep.js +2 -9
- package/src/core/http-tools/inline-handlers.js +59 -0
- package/src/core/http-tools/registry.js +31 -615
- package/src/core/http-tools/search.js +2 -2
- package/src/core/identity/self.js +6 -7
- package/src/core/identity/telegram.js +3 -3
- package/src/core/logging.js +6 -5
- package/src/core/mcp/sources.js +12 -16
- package/src/core/memory/indexer.js +2 -5
- package/src/core/profiles/lifecycle.js +0 -2
- package/src/core/profiles/store.js +2 -7
- package/src/core/routines/runner.js +1 -1
- package/src/core/runtime-skills/apx-agency-agents/SKILL.md +2 -2
- package/src/core/runtime-skills/apx-profile/SKILL.md +3 -3
- package/src/core/runtime-skills/apx-project/SKILL.md +1 -1
- package/src/core/runtime-skills/apx-task/SKILL.md +8 -8
- package/src/core/runtime-skills/apx-telegram/SKILL.md +4 -4
- package/src/core/runtime-skills/apx-voice/SKILL.md +4 -4
- package/src/core/runtimes/detect.js +2 -2
- package/src/core/sessions/index.js +800 -0
- package/src/core/stores/code-sessions.js +3 -14
- package/src/core/stores/engine-sessions.js +0 -4
- package/src/core/stores/messages.js +0 -5
- package/src/core/stores/organization.js +9 -11
- package/src/core/stores/routines.js +6 -11
- package/src/core/stores/runtime-callbacks.js +2 -1
- package/src/core/util/json-file.js +128 -0
- package/src/core/vars/sources.js +14 -21
- package/src/core/voice/stt-models.js +1 -1
- package/src/core/voice/tts.js +5 -4
- package/src/host/daemon/api/admin-config.js +5 -5
- package/src/host/daemon/api/admin.js +8 -7
- package/src/host/daemon/api/agents.js +16 -16
- package/src/host/daemon/api/artifact-preview.js +8 -8
- package/src/host/daemon/api/artifacts.js +7 -7
- package/src/host/daemon/api/code.js +8 -8
- package/src/host/daemon/api/config.js +6 -6
- package/src/host/daemon/api/confirm.js +2 -2
- package/src/host/daemon/api/connections.js +2 -2
- package/src/host/daemon/api/conversations.js +12 -12
- package/src/host/daemon/api/deck.js +6 -6
- package/src/host/daemon/api/desktop.js +8 -8
- package/src/host/daemon/api/embeddings.js +4 -4
- package/src/host/daemon/api/engines.js +8 -7
- package/src/host/daemon/api/exec.js +5 -4
- package/src/host/daemon/api/files-project.js +6 -6
- package/src/host/daemon/api/health.js +2 -2
- package/src/host/daemon/api/identity.js +3 -3
- package/src/host/daemon/api/inbox.js +2 -2
- package/src/host/daemon/api/integrations.js +23 -19
- package/src/host/daemon/api/mcps.js +16 -12
- package/src/host/daemon/api/messages.js +5 -5
- package/src/host/daemon/api/organization.js +8 -8
- package/src/host/daemon/api/pairing.js +10 -7
- package/src/host/daemon/api/plugins.js +3 -3
- package/src/host/daemon/api/prefix.js +20 -0
- package/src/host/daemon/api/profiles.js +9 -9
- package/src/host/daemon/api/projects.js +5 -5
- package/src/host/daemon/api/routines.js +8 -8
- package/src/host/daemon/api/run.js +2 -2
- package/src/host/daemon/api/runtimes.js +6 -6
- package/src/host/daemon/api/sessions-search.js +18 -11
- package/src/host/daemon/api/sessions.js +6 -6
- package/src/host/daemon/api/shared.js +59 -13
- package/src/host/daemon/api/skills.js +12 -12
- package/src/host/daemon/api/super-agent.js +4 -4
- package/src/host/daemon/api/tasks.js +11 -11
- package/src/host/daemon/api/telegram.js +19 -20
- package/src/host/daemon/api/tools.js +7 -7
- package/src/host/daemon/api/top-level.js +7 -7
- package/src/host/daemon/api/transcribe.js +6 -6
- package/src/host/daemon/api/tts.js +3 -3
- package/src/host/daemon/api/vars.js +11 -8
- package/src/host/daemon/api/voice.js +6 -6
- package/src/host/daemon/api/web.js +28 -32
- package/src/host/daemon/api.js +77 -48
- package/src/host/daemon/db.js +1 -1
- package/src/host/daemon/desktop-ws.js +7 -3
- package/src/host/daemon/index.js +11 -5
- package/src/host/daemon/plugins/desktop/index.js +1 -1
- package/src/host/daemon/plugins/telegram/index.js +1 -1
- package/src/host/daemon/stt-venv.js +20 -81
- package/src/host/daemon/wakeup.js +1 -1
- package/src/interfaces/acp/index.js +3 -3
- package/src/interfaces/acp/session.js +2 -2
- package/src/interfaces/cli/commands/a2a.js +2 -2
- package/src/interfaces/cli/commands/agent.js +3 -3
- package/src/interfaces/cli/commands/artifact.js +13 -13
- package/src/interfaces/cli/commands/chat.js +3 -3
- package/src/interfaces/cli/commands/command.js +2 -2
- package/src/interfaces/cli/commands/config.js +4 -4
- package/src/interfaces/cli/commands/daemon.js +17 -18
- package/src/interfaces/cli/commands/desktop.js +7 -14
- package/src/interfaces/cli/commands/exec.js +2 -2
- package/src/interfaces/cli/commands/log.js +3 -4
- package/src/interfaces/cli/commands/mcp.js +9 -9
- package/src/interfaces/cli/commands/memory.js +2 -2
- package/src/interfaces/cli/commands/messages.js +5 -5
- package/src/interfaces/cli/commands/model.js +0 -18
- package/src/interfaces/cli/commands/obsidian.js +5 -5
- package/src/interfaces/cli/commands/org.js +5 -5
- package/src/interfaces/cli/commands/pair.js +6 -6
- package/src/interfaces/cli/commands/plugins.js +2 -2
- package/src/interfaces/cli/commands/profile.js +10 -10
- package/src/interfaces/cli/commands/project-config.js +6 -6
- package/src/interfaces/cli/commands/project.js +10 -10
- package/src/interfaces/cli/commands/routine.js +8 -9
- package/src/interfaces/cli/commands/runtime.js +2 -2
- package/src/interfaces/cli/commands/search.js +0 -1
- package/src/interfaces/cli/commands/session.js +12 -40
- package/src/interfaces/cli/commands/sessions.js +21 -798
- package/src/interfaces/cli/commands/setup.js +16 -6
- package/src/interfaces/cli/commands/skills.js +1 -2
- package/src/interfaces/cli/commands/status.js +3 -3
- package/src/interfaces/cli/commands/task.js +8 -8
- package/src/interfaces/cli/commands/telegram.js +21 -21
- package/src/interfaces/cli/commands/voice.js +6 -6
- package/src/interfaces/cli/help/index.js +2245 -0
- package/src/interfaces/cli/http.js +9 -4
- package/src/interfaces/cli/index.js +14 -2857
- package/src/interfaces/cli/routes/acp.js +13 -0
- package/src/interfaces/cli/routes/agent.js +27 -0
- package/src/interfaces/cli/routes/artifact.js +28 -0
- package/src/interfaces/cli/routes/chat.js +11 -0
- package/src/interfaces/cli/routes/code.js +11 -0
- package/src/interfaces/cli/routes/command.js +21 -0
- package/src/interfaces/cli/routes/config.js +16 -0
- package/src/interfaces/cli/routes/connections.js +11 -0
- package/src/interfaces/cli/routes/conversations.js +21 -0
- package/src/interfaces/cli/routes/daemon.js +19 -0
- package/src/interfaces/cli/routes/desktop.js +20 -0
- package/src/interfaces/cli/routes/env.js +13 -0
- package/src/interfaces/cli/routes/exec.js +11 -0
- package/src/interfaces/cli/routes/identity.js +11 -0
- package/src/interfaces/cli/routes/index.js +71 -0
- package/src/interfaces/cli/routes/init.js +11 -0
- package/src/interfaces/cli/routes/log.js +20 -0
- package/src/interfaces/cli/routes/mcp.js +22 -0
- package/src/interfaces/cli/routes/memory.js +11 -0
- package/src/interfaces/cli/routes/messages.js +16 -0
- package/src/interfaces/cli/routes/model.js +11 -0
- package/src/interfaces/cli/routes/obsidian.js +17 -0
- package/src/interfaces/cli/routes/org.js +34 -0
- package/src/interfaces/cli/routes/overlay.js +10 -0
- package/src/interfaces/cli/routes/pair.js +17 -0
- package/src/interfaces/cli/routes/panel.js +16 -0
- package/src/interfaces/cli/routes/permission.js +11 -0
- package/src/interfaces/cli/routes/plugins.js +21 -0
- package/src/interfaces/cli/routes/profile.js +27 -0
- package/src/interfaces/cli/routes/project.js +41 -0
- package/src/interfaces/cli/routes/restart.js +15 -0
- package/src/interfaces/cli/routes/routine.js +28 -0
- package/src/interfaces/cli/routes/run.js +11 -0
- package/src/interfaces/cli/routes/search.js +11 -0
- package/src/interfaces/cli/routes/send.js +11 -0
- package/src/interfaces/cli/routes/session.js +26 -0
- package/src/interfaces/cli/routes/sessions.js +15 -0
- package/src/interfaces/cli/routes/setup.js +18 -0
- package/src/interfaces/cli/routes/skills.js +20 -0
- package/src/interfaces/cli/routes/status.js +12 -0
- package/src/interfaces/cli/routes/task.js +26 -0
- package/src/interfaces/cli/routes/telegram.js +39 -0
- package/src/interfaces/cli/routes/update.js +24 -0
- package/src/interfaces/cli/routes/voice.js +17 -0
- package/src/interfaces/desktop/main.js +6 -7
- package/src/interfaces/desktop/renderer.js +0 -5
- package/src/interfaces/mcp-server/index.js +15 -14
- package/src/interfaces/tui/_shims/globals.d.ts +8 -0
- package/src/interfaces/tui/tsconfig.json +4 -1
- package/src/interfaces/web/README.md +6 -6
- package/src/interfaces/web/dist/assets/index-CBR_-QyA.js +824 -0
- package/src/interfaces/web/dist/assets/index-CBR_-QyA.js.map +1 -0
- package/src/interfaces/web/dist/index.html +1 -1
- package/src/interfaces/web/src/components/AddProjectDialog.tsx +1 -1
- package/src/interfaces/web/src/components/agents/AgentFormFields.tsx +1 -1
- package/src/interfaces/web/src/components/chat/ChatList.tsx +2 -2
- package/src/interfaces/web/src/components/chat/SkillPicker.tsx +1 -1
- package/src/interfaces/web/src/components/code/CodeFileTree.tsx +1 -1
- package/src/interfaces/web/src/components/code/CodeTerminal.tsx +1 -1
- package/src/interfaces/web/src/components/desktop/DesktopStatusCard.tsx +1 -1
- package/src/interfaces/web/src/components/files/FileBrowser.tsx +2 -2
- package/src/interfaces/web/src/components/memory/MemoryBrowser.tsx +2 -2
- package/src/interfaces/web/src/components/routines/ExecutionsList.tsx +1 -1
- package/src/interfaces/web/src/components/routines/RoutineEditor.tsx +2 -2
- package/src/interfaces/web/src/components/settings/DesktopSettingsPanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/MemoryPanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/SkillsInspectorPanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/SkillsManager.tsx +2 -2
- package/src/interfaces/web/src/components/tasks/TaskDetailPanel.tsx +1 -1
- package/src/interfaces/web/src/hooks/useDaemonStatus.ts +1 -1
- package/src/interfaces/web/src/hooks/useDevices.ts +1 -1
- package/src/interfaces/web/src/hooks/useEngines.ts +1 -1
- package/src/interfaces/web/src/hooks/useGlobalConfig.ts +2 -2
- package/src/interfaces/web/src/hooks/useIdentity.ts +1 -1
- package/src/interfaces/web/src/hooks/useInbox.ts +1 -1
- package/src/interfaces/web/src/hooks/useProfiles.ts +3 -3
- package/src/interfaces/web/src/hooks/useProjects.ts +1 -1
- package/src/interfaces/web/src/hooks/useTelegram.ts +3 -3
- package/src/interfaces/web/src/hooks/useTokenBootstrap.ts +30 -7
- package/src/interfaces/web/src/lib/api/admin.ts +11 -11
- package/src/interfaces/web/src/lib/api/agents.ts +14 -14
- package/src/interfaces/web/src/lib/api/artifacts.ts +11 -11
- package/src/interfaces/web/src/lib/api/code.ts +1 -1
- package/src/interfaces/web/src/lib/api/conversations.ts +8 -8
- package/src/interfaces/web/src/lib/api/deck.ts +3 -3
- package/src/interfaces/web/src/lib/api/desktop.ts +8 -8
- package/src/interfaces/web/src/lib/api/embeddings.ts +3 -3
- package/src/interfaces/web/src/lib/api/engines.ts +3 -3
- package/src/interfaces/web/src/lib/api/filesystem.ts +2 -2
- package/src/interfaces/web/src/lib/api/health.ts +1 -1
- package/src/interfaces/web/src/lib/api/identity.ts +2 -2
- package/src/interfaces/web/src/lib/api/inbox.ts +1 -1
- package/src/interfaces/web/src/lib/api/integrations.ts +8 -8
- package/src/interfaces/web/src/lib/api/mcps.ts +6 -6
- package/src/interfaces/web/src/lib/api/messages.ts +3 -3
- package/src/interfaces/web/src/lib/api/organization.ts +7 -7
- package/src/interfaces/web/src/lib/api/profiles.ts +8 -8
- package/src/interfaces/web/src/lib/api/projectFiles.ts +5 -5
- package/src/interfaces/web/src/lib/api/projects.ts +12 -12
- package/src/interfaces/web/src/lib/api/routines.ts +7 -7
- package/src/interfaces/web/src/lib/api/sessions.ts +2 -2
- package/src/interfaces/web/src/lib/api/skills.ts +11 -11
- package/src/interfaces/web/src/lib/api/super_agent.ts +3 -3
- package/src/interfaces/web/src/lib/api/tasks.ts +12 -12
- package/src/interfaces/web/src/lib/api/telegram.ts +14 -14
- package/src/interfaces/web/src/lib/api/tools.ts +1 -1
- package/src/interfaces/web/src/lib/api/vars.ts +4 -4
- package/src/interfaces/web/src/lib/api/voice.ts +6 -6
- package/src/interfaces/web/src/screens/base/AgentDefaultsTab.tsx +1 -1
- package/src/interfaces/web/src/screens/base/GlobalTasksTab.tsx +1 -1
- package/src/interfaces/web/src/screens/base/LogsTab.tsx +3 -3
- package/src/interfaces/web/src/screens/base/SessionsTab.tsx +1 -1
- package/src/interfaces/web/src/screens/modules/CodeScreen.tsx +1 -1
- package/src/interfaces/web/src/screens/modules/DeckScreen.tsx +1 -1
- package/src/interfaces/web/src/screens/modules/DesktopScreen.tsx +1 -1
- package/src/interfaces/web/src/screens/modules/VoiceScreen.tsx +1 -1
- package/src/interfaces/web/src/screens/project/AgentDetailScreen.tsx +8 -8
- package/src/interfaces/web/src/screens/project/AgentsTab.tsx +2 -2
- package/src/interfaces/web/src/screens/project/ChatTab.tsx +3 -3
- package/src/interfaces/web/src/screens/project/ConfigTab.tsx +1 -1
- package/src/interfaces/web/src/screens/project/McpsTab.tsx +3 -3
- package/src/interfaces/web/src/screens/project/Overview.tsx +6 -6
- package/src/interfaces/web/src/screens/project/RoutinesTab.tsx +2 -2
- package/src/interfaces/web/src/screens/project/StructureTab.tsx +1 -1
- package/src/interfaces/web/src/screens/project/TasksTab.tsx +1 -1
- package/src/interfaces/web/src/screens/project/VarsTab.tsx +1 -1
- package/src/interfaces/web/vite.config.ts +13 -18
- package/src/interfaces/web/dist/assets/index-BWWpTTSd.js +0 -824
- package/src/interfaces/web/dist/assets/index-BWWpTTSd.js.map +0 -1
- package/src/skills/apc-context/SKILL.md +0 -159
- /package/src/{host/daemon → core}/runtimes/_spawn.js +0 -0
- /package/src/{host/daemon → core}/runtimes/aider.js +0 -0
- /package/src/{host/daemon → core}/runtimes/antigravity.js +0 -0
- /package/src/{host/daemon → core}/runtimes/claude-code.js +0 -0
- /package/src/{host/daemon → core}/runtimes/codex.js +0 -0
- /package/src/{host/daemon → core}/runtimes/cursor-agent.js +0 -0
- /package/src/{host/daemon → core}/runtimes/gemini-cli.js +0 -0
- /package/src/{host/daemon → core}/runtimes/index.js +0 -0
- /package/src/{host/daemon → core}/runtimes/opencode.js +0 -0
- /package/src/{host/daemon → core}/runtimes/qwen-code.js +0 -0
|
@@ -5,174 +5,12 @@ import fs from "node:fs";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
|
-
import { cmdInit } from "./commands/init.js";
|
|
9
|
-
import {
|
|
10
|
-
cmdProjectAdd,
|
|
11
|
-
cmdProjectList,
|
|
12
|
-
cmdProjectRemove,
|
|
13
|
-
cmdProjectRebuild,
|
|
14
|
-
} from "./commands/project.js";
|
|
15
|
-
import {
|
|
16
|
-
cmdAgentAdd,
|
|
17
|
-
cmdAgentList,
|
|
18
|
-
cmdAgentGet,
|
|
19
|
-
cmdAgentRemove,
|
|
20
|
-
cmdAgentImport,
|
|
21
|
-
cmdAgentVaultList,
|
|
22
|
-
cmdAgentVaultAdd,
|
|
23
|
-
cmdAgentVaultRm,
|
|
24
|
-
cmdAgentVaultRestore,
|
|
25
|
-
} from "./commands/agent.js";
|
|
26
|
-
import { cmdMemory } from "./commands/memory.js";
|
|
27
|
-
import {
|
|
28
|
-
cmdSessionNew,
|
|
29
|
-
cmdSessionList,
|
|
30
|
-
cmdSessionGet,
|
|
31
|
-
cmdSessionUpdate,
|
|
32
|
-
cmdSessionClose,
|
|
33
|
-
cmdSessionCheck,
|
|
34
|
-
cmdSessionCloseStale,
|
|
35
|
-
cmdSessionResume,
|
|
36
|
-
cmdSessionCompact,
|
|
37
|
-
cmdSessionSummary,
|
|
38
|
-
cmdSessionAsk,
|
|
39
|
-
} from "./commands/session.js";
|
|
40
|
-
import { cmdSessionsList, cmdSessionFind } from "./commands/sessions.js";
|
|
41
|
-
import {
|
|
42
|
-
cmdMcpList,
|
|
43
|
-
cmdMcpAdd,
|
|
44
|
-
cmdMcpRemove,
|
|
45
|
-
cmdMcpEnable,
|
|
46
|
-
cmdMcpDisable,
|
|
47
|
-
cmdMcpRun,
|
|
48
|
-
cmdMcpTools,
|
|
49
|
-
cmdMcpLogs,
|
|
50
|
-
cmdMcpCheck,
|
|
51
|
-
} from "./commands/mcp.js";
|
|
52
|
-
import {
|
|
53
|
-
cmdDaemonStart,
|
|
54
|
-
cmdDaemonStop,
|
|
55
|
-
cmdDaemonRestart,
|
|
56
|
-
cmdDaemonStatus,
|
|
57
|
-
cmdDaemonLogs,
|
|
58
|
-
cmdDaemonReload,
|
|
59
|
-
} from "./commands/daemon.js";
|
|
60
|
-
import {
|
|
61
|
-
cmdTelegramSend,
|
|
62
|
-
cmdTelegramStatus,
|
|
63
|
-
cmdTelegramSetup,
|
|
64
|
-
cmdTelegramStart,
|
|
65
|
-
cmdTelegramStop,
|
|
66
|
-
cmdTelegramChannelAdd,
|
|
67
|
-
cmdTelegramChannelList,
|
|
68
|
-
cmdTelegramChannelShow,
|
|
69
|
-
cmdTelegramChannelSet,
|
|
70
|
-
cmdTelegramChannelUnset,
|
|
71
|
-
cmdTelegramChannelRemove,
|
|
72
|
-
cmdTelegramContacts,
|
|
73
|
-
cmdTelegramContactRemove,
|
|
74
|
-
cmdTelegramRole,
|
|
75
|
-
cmdTelegramRoles,
|
|
76
|
-
cmdTelegramOwner,
|
|
77
|
-
} from "./commands/telegram.js";
|
|
78
|
-
import {
|
|
79
|
-
cmdProjectConfigShow,
|
|
80
|
-
cmdProjectConfigSet,
|
|
81
|
-
cmdProjectConfigUnset,
|
|
82
|
-
cmdProjectConfigEdit,
|
|
83
|
-
} from "./commands/project-config.js";
|
|
84
|
-
import { cmdMessagesTail, cmdMessagesSearch, cmdMessagesChat } from "./commands/messages.js";
|
|
85
|
-
import { cmdLog } from "./commands/log.js";
|
|
86
|
-
import { cmdSearch } from "./commands/search.js";
|
|
87
|
-
import { cmdExec } from "./commands/exec.js";
|
|
88
|
-
import {
|
|
89
|
-
cmdChat,
|
|
90
|
-
cmdConversationsList,
|
|
91
|
-
cmdConversationsGet,
|
|
92
|
-
} from "./commands/chat.js";
|
|
93
|
-
import { cmdCode } from "./commands/code.js";
|
|
94
|
-
import { cmdAcp } from "./commands/acp.js";
|
|
95
|
-
import { cmdRun, cmdEnvDetect } from "./commands/runtime.js";
|
|
96
|
-
import { cmdSend, cmdConnections } from "./commands/a2a.js";
|
|
97
|
-
import {
|
|
98
|
-
cmdConfigShow,
|
|
99
|
-
cmdConfigSet,
|
|
100
|
-
cmdConfigUnset,
|
|
101
|
-
cmdPermission,
|
|
102
|
-
} from "./commands/config.js";
|
|
103
|
-
import { cmdPluginsList, cmdPluginStatus } from "./commands/plugins.js";
|
|
104
|
-
import {
|
|
105
|
-
cmdObsidianSet,
|
|
106
|
-
cmdObsidianStatus,
|
|
107
|
-
cmdObsidianSync,
|
|
108
|
-
cmdObsidianRemove,
|
|
109
|
-
} from "./commands/obsidian.js";
|
|
110
|
-
import { cmdDesktopStart, cmdDesktopStop, cmdDesktopRestart, cmdDesktopStatus, cmdDesktopInstall, cmdDesktopUninstall, desktopRunning } from "./commands/desktop.js";
|
|
111
|
-
import { cmdVoiceSay, cmdVoiceListen, cmdVoiceProviders } from "./commands/voice.js";
|
|
112
|
-
import { cmdSkillsAdd, cmdSkillsList, cmdSkillsStatus, cmdSkillsSync, cmdSkillsIndex, cmdSkillsInspect, cmdSkillsInspector } from "./commands/skills.js";
|
|
113
|
-
import { cmdIdentity } from "./commands/identity.js";
|
|
114
|
-
import { cmdCommandList, cmdCommandShow } from "./commands/command.js";
|
|
115
|
-
import { cmdUpdate } from "./commands/update.js";
|
|
116
|
-
import { cmdSetup } from "./commands/setup.js";
|
|
117
|
-
import { cmdStatus } from "./commands/status.js";
|
|
118
|
-
import { cmdModel } from "./commands/model.js";
|
|
119
|
-
import { cmdPair, cmdPairWeb, cmdPairList, cmdPairRevoke } from "./commands/pair.js";
|
|
120
8
|
import { checkForUpdate } from "#core/update-check.js";
|
|
121
9
|
import { mascot } from "#core/mascot.js";
|
|
122
10
|
import { apxHeader, apxBanner } from "./branding.js";
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
cmdRoutineAdd,
|
|
127
|
-
cmdRoutineRemove,
|
|
128
|
-
cmdRoutineEnable,
|
|
129
|
-
cmdRoutineDisable,
|
|
130
|
-
cmdRoutineRun,
|
|
131
|
-
cmdRoutineHistory,
|
|
132
|
-
cmdRoutineMemory,
|
|
133
|
-
} from "./commands/routine.js";
|
|
134
|
-
import {
|
|
135
|
-
cmdArtifactCreate,
|
|
136
|
-
cmdArtifactList,
|
|
137
|
-
cmdArtifactShow,
|
|
138
|
-
cmdArtifactRemove,
|
|
139
|
-
cmdArtifactRun,
|
|
140
|
-
cmdArtifactPreview,
|
|
141
|
-
cmdArtifactShare,
|
|
142
|
-
cmdArtifactPreviews,
|
|
143
|
-
cmdArtifactStop,
|
|
144
|
-
} from "./commands/artifact.js";
|
|
145
|
-
import {
|
|
146
|
-
cmdTaskAdd,
|
|
147
|
-
cmdTaskList,
|
|
148
|
-
cmdTaskShow,
|
|
149
|
-
cmdTaskDone,
|
|
150
|
-
cmdTaskDrop,
|
|
151
|
-
cmdTaskReopen,
|
|
152
|
-
cmdTaskPatch,
|
|
153
|
-
} from "./commands/task.js";
|
|
154
|
-
import {
|
|
155
|
-
cmdProfileList,
|
|
156
|
-
cmdProfileShow,
|
|
157
|
-
cmdProfileInstall,
|
|
158
|
-
cmdProfileUse,
|
|
159
|
-
cmdProfileOff,
|
|
160
|
-
cmdProfileConfig,
|
|
161
|
-
cmdProfileDoctor,
|
|
162
|
-
cmdProfileUninstall,
|
|
163
|
-
} from "./commands/profile.js";
|
|
164
|
-
import {
|
|
165
|
-
cmdPanelStatus,
|
|
166
|
-
cmdPanelShare,
|
|
167
|
-
cmdPanelUnshare,
|
|
168
|
-
} from "./commands/panel.js";
|
|
169
|
-
import {
|
|
170
|
-
cmdOrgShow,
|
|
171
|
-
cmdOrgAreaAdd,
|
|
172
|
-
cmdOrgAreaRm,
|
|
173
|
-
cmdOrgRoleAdd,
|
|
174
|
-
cmdOrgRoleRm,
|
|
175
|
-
} from "./commands/org.js";
|
|
11
|
+
|
|
12
|
+
import { buildHelp, buildTopicHelp, findHelpTopic } from "./help/index.js";
|
|
13
|
+
import { resolveRoute } from "./routes/index.js";
|
|
176
14
|
|
|
177
15
|
const __filename = fileURLToPath(import.meta.url);
|
|
178
16
|
const __dirname = path.dirname(__filename);
|
|
@@ -180,2242 +18,6 @@ const VERSION = JSON.parse(
|
|
|
180
18
|
fs.readFileSync(path.join(__dirname, "..", "..", "..", "package.json"), "utf8")
|
|
181
19
|
).version;
|
|
182
20
|
|
|
183
|
-
// ── ANSI helpers (help only) ─────────────────────────────────────────────────
|
|
184
|
-
const H = {
|
|
185
|
-
R: "\x1b[0m",
|
|
186
|
-
B: "\x1b[1m",
|
|
187
|
-
DI: "\x1b[2m",
|
|
188
|
-
CY: "\x1b[36m",
|
|
189
|
-
GR: "\x1b[32m",
|
|
190
|
-
YE: "\x1b[33m",
|
|
191
|
-
WH: "\x1b[97m",
|
|
192
|
-
MA: "\x1b[35m",
|
|
193
|
-
};
|
|
194
|
-
const hSec = (s) => `\n${H.B}${H.CY} ${s}${H.R}\n`;
|
|
195
|
-
const hCmd = (cmd, pad, desc) => ` ${H.WH}${cmd.padEnd(pad)}${H.R} ${H.DI}${desc}${H.R}`;
|
|
196
|
-
const hSub = (sub, pad, desc) => ` ${H.CY}${sub.padEnd(pad)}${H.R} ${H.DI}${desc}${H.R}`;
|
|
197
|
-
const hFlag = (f, pad, desc) => ` ${H.YE}${f.padEnd(pad)}${H.R} ${H.DI}${desc}${H.R}`;
|
|
198
|
-
|
|
199
|
-
const topic = ({ title, summary, usage = [], commands = [], options = [], examples = [], notes = [] }) => ({
|
|
200
|
-
title,
|
|
201
|
-
summary,
|
|
202
|
-
usage,
|
|
203
|
-
commands,
|
|
204
|
-
options,
|
|
205
|
-
examples,
|
|
206
|
-
notes,
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
const HELP_TOPICS = new Map(Object.entries({
|
|
210
|
-
init: topic({
|
|
211
|
-
title: "apx init",
|
|
212
|
-
summary: "Initialize APC project files in the current directory or a target path.",
|
|
213
|
-
usage: ["apx init [path] [--name <name>]"],
|
|
214
|
-
options: [
|
|
215
|
-
["--name <name>", "Project display name written to .apc/project.json."],
|
|
216
|
-
],
|
|
217
|
-
examples: ["apx init", "apx init ./my-project --name \"My Project\""],
|
|
218
|
-
}),
|
|
219
|
-
setup: topic({
|
|
220
|
-
title: "apx setup",
|
|
221
|
-
summary: "Run the interactive APX setup wizard.",
|
|
222
|
-
usage: ["apx setup", "apx install"],
|
|
223
|
-
examples: ["apx setup"],
|
|
224
|
-
}),
|
|
225
|
-
install: topic({
|
|
226
|
-
title: "apx install",
|
|
227
|
-
summary: "Alias for apx setup.",
|
|
228
|
-
usage: ["apx install"],
|
|
229
|
-
examples: ["apx install"],
|
|
230
|
-
}),
|
|
231
|
-
status: topic({
|
|
232
|
-
title: "apx status",
|
|
233
|
-
summary: "Print daemon, super-agent, engine, Telegram, and project status.",
|
|
234
|
-
usage: ["apx status"],
|
|
235
|
-
examples: ["apx status"],
|
|
236
|
-
}),
|
|
237
|
-
update: topic({
|
|
238
|
-
title: "apx update",
|
|
239
|
-
summary: "Check for a published APX update and upgrade the global install.",
|
|
240
|
-
usage: ["apx update", "apx upgrade"],
|
|
241
|
-
examples: ["apx update"],
|
|
242
|
-
}),
|
|
243
|
-
upgrade: topic({
|
|
244
|
-
title: "apx upgrade",
|
|
245
|
-
summary: "Alias for apx update.",
|
|
246
|
-
usage: ["apx upgrade"],
|
|
247
|
-
examples: ["apx upgrade"],
|
|
248
|
-
}),
|
|
249
|
-
project: topic({
|
|
250
|
-
title: "apx project",
|
|
251
|
-
summary: "Register, list, remove, and rebuild daemon project entries.",
|
|
252
|
-
usage: ["apx project <subcommand> [args] [--flags]"],
|
|
253
|
-
commands: [
|
|
254
|
-
["add [path]", "Register a project path with the daemon."],
|
|
255
|
-
["list | ls", "List known daemon projects."],
|
|
256
|
-
["remove | rm <id>", "Remove a daemon project entry."],
|
|
257
|
-
["rebuild [id]", "Rebuild daemon index from project files."],
|
|
258
|
-
["<name|id> <command>", "Run another APX command pinned to that project."],
|
|
259
|
-
],
|
|
260
|
-
options: [["--project <name|id|path>", "Pin command to a specific project where supported."]],
|
|
261
|
-
examples: ["apx project add .", "apx project list", "apx project testing mcp list"],
|
|
262
|
-
}),
|
|
263
|
-
"project add": topic({
|
|
264
|
-
title: "apx project add",
|
|
265
|
-
summary: "Register a project with the APX daemon.",
|
|
266
|
-
usage: ["apx project add [path]"],
|
|
267
|
-
examples: ["apx project add .", "apx project add ../repo"],
|
|
268
|
-
}),
|
|
269
|
-
"project list": topic({
|
|
270
|
-
title: "apx project list",
|
|
271
|
-
summary: "List projects known by the daemon.",
|
|
272
|
-
usage: ["apx project list", "apx project ls"],
|
|
273
|
-
examples: ["apx project list"],
|
|
274
|
-
}),
|
|
275
|
-
"project remove": topic({
|
|
276
|
-
title: "apx project remove",
|
|
277
|
-
summary: "Remove a project entry from daemon storage.",
|
|
278
|
-
usage: ["apx project remove <id>", "apx project rm <id>"],
|
|
279
|
-
examples: ["apx project remove default"],
|
|
280
|
-
}),
|
|
281
|
-
"project rebuild": topic({
|
|
282
|
-
title: "apx project rebuild",
|
|
283
|
-
summary: "Rebuild a daemon project index from filesystem context.",
|
|
284
|
-
usage: ["apx project rebuild [id]"],
|
|
285
|
-
examples: ["apx project rebuild", "apx project rebuild default"],
|
|
286
|
-
}),
|
|
287
|
-
"project config": topic({
|
|
288
|
-
title: "apx project config",
|
|
289
|
-
summary: "Read / write the per-project config (.apc/config.json) via the daemon API.",
|
|
290
|
-
usage: ["apx project config <show|set|unset|edit> <project> [args]"],
|
|
291
|
-
commands: [
|
|
292
|
-
["show <project>", "Print effective + project_only config. Use --key dotted.key for one value."],
|
|
293
|
-
["set <project> <key> <value>", "Set a dotted key in the project config (PATCH set)."],
|
|
294
|
-
["unset <project> <key>", "Remove a dotted key from the project config (PATCH unset)."],
|
|
295
|
-
["edit <project>", "Open the project_only config in $EDITOR; full replace on save."],
|
|
296
|
-
],
|
|
297
|
-
options: [
|
|
298
|
-
["--key <dotted.key>", "Limit `show` to one key — prints effective and project_only side by side."],
|
|
299
|
-
["--json", "Emit JSON instead of human-readable lines (show --key only)."],
|
|
300
|
-
],
|
|
301
|
-
examples: [
|
|
302
|
-
"apx project config show iacrmar",
|
|
303
|
-
"apx project config show iacrmar --key super_agent.model",
|
|
304
|
-
"apx project config set iacrmar super_agent.model groq:llama-3.3-70b-versatile",
|
|
305
|
-
"apx project config unset iacrmar super_agent.model",
|
|
306
|
-
"apx project config edit iacrmar",
|
|
307
|
-
],
|
|
308
|
-
}),
|
|
309
|
-
"project config show": topic({
|
|
310
|
-
title: "apx project config show",
|
|
311
|
-
summary: "Print the effective and project_only config for a project.",
|
|
312
|
-
usage: ["apx project config show <project> [--key dotted.key] [--json]"],
|
|
313
|
-
options: [
|
|
314
|
-
["--key <dotted.key>", "Print just one key (effective + project_only)."],
|
|
315
|
-
["--json", "JSON output (only with --key)."],
|
|
316
|
-
],
|
|
317
|
-
examples: ["apx project config show iacrmar", "apx project config show iacrmar --key super_agent.model"],
|
|
318
|
-
}),
|
|
319
|
-
"project config set": topic({
|
|
320
|
-
title: "apx project config set",
|
|
321
|
-
summary: "Set a dotted-key value in .apc/config.json (PATCH).",
|
|
322
|
-
usage: ["apx project config set <project> <dotted.key> <value>"],
|
|
323
|
-
examples: ["apx project config set iacrmar super_agent.model groq:llama-3.3-70b-versatile"],
|
|
324
|
-
}),
|
|
325
|
-
"project config unset": topic({
|
|
326
|
-
title: "apx project config unset",
|
|
327
|
-
summary: "Remove a dotted-key from .apc/config.json (PATCH unset).",
|
|
328
|
-
usage: ["apx project config unset <project> <dotted.key>"],
|
|
329
|
-
examples: ["apx project config unset iacrmar super_agent.model"],
|
|
330
|
-
}),
|
|
331
|
-
"project config edit": topic({
|
|
332
|
-
title: "apx project config edit",
|
|
333
|
-
summary: "Open the project_only config in $EDITOR. Saves with PUT on exit.",
|
|
334
|
-
usage: ["apx project config edit <project>"],
|
|
335
|
-
examples: ["apx project config edit iacrmar"],
|
|
336
|
-
}),
|
|
337
|
-
agent: topic({
|
|
338
|
-
title: "apx agent",
|
|
339
|
-
summary: "Create, inspect, import, and vault agent definitions.",
|
|
340
|
-
usage: ["apx agent <subcommand> [args] [--flags]"],
|
|
341
|
-
commands: [
|
|
342
|
-
["add <slug>", "Create a project-local agent."],
|
|
343
|
-
["list | ls", "List project agents."],
|
|
344
|
-
["get | show <slug>", "Print one agent definition."],
|
|
345
|
-
["remove | rm <slug>", "Delete a project agent (file + runtime memory)."],
|
|
346
|
-
["import <slug>", "Import an agent template from ~/.apx/agents."],
|
|
347
|
-
["vault list | ls", "List vault templates (bundled defaults + your overrides)."],
|
|
348
|
-
["vault add <slug>", "Create a new vault template in the user layer (~/.apx/agents/)."],
|
|
349
|
-
["vault rm <slug>", "Delete a vault template (tombstones the bundled default so it stays hidden)."],
|
|
350
|
-
["vault restore <slug>", "Lift a tombstone so a previously-removed bundled default is visible again."],
|
|
351
|
-
],
|
|
352
|
-
examples: ["apx agent add reviewer --role Reviewer --model gpt-5.2", "apx agent list"],
|
|
353
|
-
}),
|
|
354
|
-
"agent add": topic({
|
|
355
|
-
title: "apx agent add",
|
|
356
|
-
summary: "Create a project-local agent definition.",
|
|
357
|
-
usage: ["apx agent add <slug> [--role <role>] [--model <model>] [--skills a,b] [--language <tag>] [--description <text>] [--tools a,b]"],
|
|
358
|
-
options: [
|
|
359
|
-
["--role <role>", "Human-readable role."],
|
|
360
|
-
["--model <model>", "Preferred model id."],
|
|
361
|
-
["--skills a,b", "Comma-separated skill names."],
|
|
362
|
-
["--language <tag>", "Default response language, for example en-US or es-AR."],
|
|
363
|
-
["--description <text>", "Short agent description."],
|
|
364
|
-
["--tools a,b", "Comma-separated tool hints."],
|
|
365
|
-
],
|
|
366
|
-
examples: ["apx agent add reviewer --role Reviewer --model gpt-5.2 --skills review,test"],
|
|
367
|
-
}),
|
|
368
|
-
"agent list": topic({
|
|
369
|
-
title: "apx agent list",
|
|
370
|
-
summary: "List agents available in the current APC project.",
|
|
371
|
-
usage: ["apx agent list", "apx agent ls"],
|
|
372
|
-
examples: ["apx agent list"],
|
|
373
|
-
}),
|
|
374
|
-
"agent get": topic({
|
|
375
|
-
title: "apx agent get",
|
|
376
|
-
summary: "Print one project agent definition.",
|
|
377
|
-
usage: ["apx agent get <slug>", "apx agent show <slug>"],
|
|
378
|
-
examples: ["apx agent get reviewer"],
|
|
379
|
-
}),
|
|
380
|
-
"agent remove": topic({
|
|
381
|
-
title: "apx agent remove",
|
|
382
|
-
summary: "Delete a project agent (its .apc file + runtime memory).",
|
|
383
|
-
usage: ["apx agent remove <slug>", "apx agent rm <slug>"],
|
|
384
|
-
examples: ["apx agent remove reviewer"],
|
|
385
|
-
}),
|
|
386
|
-
"agent import": topic({
|
|
387
|
-
title: "apx agent import",
|
|
388
|
-
summary: "Import a reusable agent template from the APX vault into the current project.",
|
|
389
|
-
usage: ["apx agent import <slug> [--copy] [--force]"],
|
|
390
|
-
options: [
|
|
391
|
-
["--copy", "Copy the vault markdown file into the project instead of linking it."],
|
|
392
|
-
["--force", "Overwrite an existing project-local definition when used with --copy."],
|
|
393
|
-
],
|
|
394
|
-
examples: ["apx agent import reviewer", "apx agent import reviewer --copy --force"],
|
|
395
|
-
}),
|
|
396
|
-
"agent vault": topic({
|
|
397
|
-
title: "apx agent vault",
|
|
398
|
-
summary: "Manage reusable global agent templates under ~/.apx/agents.",
|
|
399
|
-
usage: ["apx agent vault <subcommand> [args] [--flags]"],
|
|
400
|
-
commands: [
|
|
401
|
-
["list | ls", "List vault templates."],
|
|
402
|
-
["add <slug>", "Create a vault template or copy a local project agent into the vault."],
|
|
403
|
-
],
|
|
404
|
-
examples: ["apx agent vault list", "apx agent vault add reviewer"],
|
|
405
|
-
}),
|
|
406
|
-
"agent vault list": topic({
|
|
407
|
-
title: "apx agent vault list",
|
|
408
|
-
summary: "List reusable global agent templates.",
|
|
409
|
-
usage: ["apx agent vault list", "apx agent vault ls"],
|
|
410
|
-
examples: ["apx agent vault list"],
|
|
411
|
-
}),
|
|
412
|
-
"agent vault add": topic({
|
|
413
|
-
title: "apx agent vault add",
|
|
414
|
-
summary: "Create a reusable global agent template.",
|
|
415
|
-
usage: ["apx agent vault add <slug> [--role <role>] [--model <model>] [--skills a,b] [--language <tag>] [--description <text>]"],
|
|
416
|
-
options: [
|
|
417
|
-
["--role <role>", "Human-readable role."],
|
|
418
|
-
["--model <model>", "Preferred model id."],
|
|
419
|
-
["--skills a,b", "Comma-separated skill names."],
|
|
420
|
-
["--language <tag>", "Default response language."],
|
|
421
|
-
["--description <text>", "Short agent description."],
|
|
422
|
-
],
|
|
423
|
-
examples: ["apx agent vault add reviewer --role Reviewer --model gpt-5.2"],
|
|
424
|
-
}),
|
|
425
|
-
"agent vault rm": topic({
|
|
426
|
-
title: "apx agent vault rm",
|
|
427
|
-
summary: "Delete a vault template. Bundled defaults are tombstoned, not erased; restore them with `apx agent vault restore`.",
|
|
428
|
-
usage: ["apx agent vault rm <slug>"],
|
|
429
|
-
examples: ["apx agent vault rm tessa-qa"],
|
|
430
|
-
}),
|
|
431
|
-
"agent vault restore": topic({
|
|
432
|
-
title: "apx agent vault restore",
|
|
433
|
-
summary: "Lift a tombstone so a previously-removed bundled default is visible again.",
|
|
434
|
-
usage: ["apx agent vault restore <slug>"],
|
|
435
|
-
examples: ["apx agent vault restore tessa-qa"],
|
|
436
|
-
}),
|
|
437
|
-
identity: topic({
|
|
438
|
-
title: "apx identity",
|
|
439
|
-
summary: "Read or edit APX profile identity fields.",
|
|
440
|
-
usage: ["apx identity <show|set|wizard> [args]"],
|
|
441
|
-
commands: [
|
|
442
|
-
["show", "Print current identity."],
|
|
443
|
-
["set <key> <value>", "Set one identity field."],
|
|
444
|
-
["wizard", "Run interactive identity setup."],
|
|
445
|
-
],
|
|
446
|
-
examples: ["apx identity show", "apx identity set agent_name Ada"],
|
|
447
|
-
}),
|
|
448
|
-
"identity show": topic({
|
|
449
|
-
title: "apx identity show",
|
|
450
|
-
summary: "Print current APX profile identity.",
|
|
451
|
-
usage: ["apx identity show"],
|
|
452
|
-
examples: ["apx identity show"],
|
|
453
|
-
}),
|
|
454
|
-
"identity set": topic({
|
|
455
|
-
title: "apx identity set",
|
|
456
|
-
summary: "Set one APX profile identity field.",
|
|
457
|
-
usage: ["apx identity set <key> <value>"],
|
|
458
|
-
examples: ["apx identity set agent_name Ada", "apx identity set owner_name Sam"],
|
|
459
|
-
}),
|
|
460
|
-
"identity wizard": topic({
|
|
461
|
-
title: "apx identity wizard",
|
|
462
|
-
summary: "Run interactive identity setup.",
|
|
463
|
-
usage: ["apx identity wizard"],
|
|
464
|
-
examples: ["apx identity wizard"],
|
|
465
|
-
}),
|
|
466
|
-
config: topic({
|
|
467
|
-
title: "apx config",
|
|
468
|
-
summary: "Read and edit project configuration in .apc/config.json.",
|
|
469
|
-
usage: ["apx config [show] [--effective] [--only-overrides]", "apx config set <key.path> <value>", "apx config unset <key.path>"],
|
|
470
|
-
commands: [
|
|
471
|
-
["show | ls", "Print config."],
|
|
472
|
-
["set <key> <value>", "Set a JSON-aware value."],
|
|
473
|
-
["unset | rm <key>", "Remove a key."],
|
|
474
|
-
],
|
|
475
|
-
options: [
|
|
476
|
-
["--effective", "Show merged effective config."],
|
|
477
|
-
["--only-overrides", "Show only project overrides."],
|
|
478
|
-
],
|
|
479
|
-
examples: ["apx config show --effective", "apx config set engines.openai.model gpt-5.2"],
|
|
480
|
-
}),
|
|
481
|
-
"config show": topic({
|
|
482
|
-
title: "apx config show",
|
|
483
|
-
summary: "Print project config.",
|
|
484
|
-
usage: ["apx config show [--effective] [--only-overrides]", "apx config ls"],
|
|
485
|
-
options: [
|
|
486
|
-
["--effective", "Show merged effective config."],
|
|
487
|
-
["--only-overrides", "Show only project overrides."],
|
|
488
|
-
],
|
|
489
|
-
examples: ["apx config show", "apx config show --effective"],
|
|
490
|
-
}),
|
|
491
|
-
"config set": topic({
|
|
492
|
-
title: "apx config set",
|
|
493
|
-
summary: "Set a JSON-aware value in .apc/config.json.",
|
|
494
|
-
usage: ["apx config set <key.path> <value>"],
|
|
495
|
-
examples: ["apx config set super_agent.enabled true", "apx config set engines.openai.model gpt-5.2"],
|
|
496
|
-
}),
|
|
497
|
-
"config unset": topic({
|
|
498
|
-
title: "apx config unset",
|
|
499
|
-
summary: "Remove a key from .apc/config.json.",
|
|
500
|
-
usage: ["apx config unset <key.path>", "apx config rm <key.path>"],
|
|
501
|
-
examples: ["apx config unset engines.openai.model"],
|
|
502
|
-
}),
|
|
503
|
-
permission: topic({
|
|
504
|
-
title: "apx permission",
|
|
505
|
-
summary: "Show or set APX tool permission mode.",
|
|
506
|
-
usage: ["apx permission show", "apx permission set <total|automatico|permiso>"],
|
|
507
|
-
commands: [
|
|
508
|
-
["show", "Print current permission mode."],
|
|
509
|
-
["set <mode>", "Set permission mode."],
|
|
510
|
-
],
|
|
511
|
-
examples: ["apx permission show", "apx permission set automatico"],
|
|
512
|
-
}),
|
|
513
|
-
"permission show": topic({
|
|
514
|
-
title: "apx permission show",
|
|
515
|
-
summary: "Print current APX tool permission mode.",
|
|
516
|
-
usage: ["apx permission show"],
|
|
517
|
-
examples: ["apx permission show"],
|
|
518
|
-
}),
|
|
519
|
-
"permission set": topic({
|
|
520
|
-
title: "apx permission set",
|
|
521
|
-
summary: "Set APX tool permission mode.",
|
|
522
|
-
usage: ["apx permission set <total|automatico|permiso>"],
|
|
523
|
-
examples: ["apx permission set permiso"],
|
|
524
|
-
}),
|
|
525
|
-
memory: topic({
|
|
526
|
-
title: "apx memory",
|
|
527
|
-
summary: "Read, append, or replace an agent memory.md file.",
|
|
528
|
-
usage: ["apx memory <slug>", "apx memory <slug> --append \"<note>\"", "apx memory <slug> --replace < memory.md"],
|
|
529
|
-
options: [
|
|
530
|
-
["--append <note>", "Append a durable note under Recent context."],
|
|
531
|
-
["--replace", "Replace memory from stdin."],
|
|
532
|
-
],
|
|
533
|
-
examples: ["apx memory reviewer", "apx memory reviewer --append \"Prefers short PR summaries\""],
|
|
534
|
-
}),
|
|
535
|
-
session: topic({
|
|
536
|
-
title: "apx session",
|
|
537
|
-
summary: "Manage local runtime sessions stored under ~/.apx/projects/<project-id>.",
|
|
538
|
-
usage: ["apx session <subcommand> [args] [--flags]"],
|
|
539
|
-
commands: [
|
|
540
|
-
["new <slug>", "Create a session file."],
|
|
541
|
-
["list | ls [slug]", "List sessions."],
|
|
542
|
-
["get | show <id>", "Print session metadata or body."],
|
|
543
|
-
["update <id>", "Update session frontmatter."],
|
|
544
|
-
["close <id>", "Mark a session complete."],
|
|
545
|
-
["check", "Exit non-zero if an active session exists."],
|
|
546
|
-
["close-stale", "Auto-close stale active sessions."],
|
|
547
|
-
["resume <id>", "Show APC session and optional external transcript summary."],
|
|
548
|
-
["compact <slug>", "Compact latest or selected conversation into summary."],
|
|
549
|
-
["find | search <text>", "Find sessions by title (cross-engine). --deep also searches content."],
|
|
550
|
-
["summary <id>", "LLM summary of any session by id (alias for resume --summary)."],
|
|
551
|
-
["ask <id> \"<q>\"", "Ask a question about a session; map-reduces large transcripts."],
|
|
552
|
-
],
|
|
553
|
-
examples: ["apx session find \"mejorar interfaz web\"", "apx session ask 019abc... \"¿qué cambios al sidebar?\""],
|
|
554
|
-
}),
|
|
555
|
-
"session find": topic({
|
|
556
|
-
title: "apx session find",
|
|
557
|
-
summary: "Find sessions by title across every engine, newest first. The fast way to turn a remembered title into a session id.",
|
|
558
|
-
usage: [
|
|
559
|
-
"apx session find \"<text>\" [--deep] [--engine <id>] [--dir <path>|--project <name>] [--limit N] [--json]",
|
|
560
|
-
],
|
|
561
|
-
options: [
|
|
562
|
-
["--deep", "Also search inside transcript content, not just titles (slower)."],
|
|
563
|
-
["--engine <id>", "Restrict to one engine (apx | claude | codex)."],
|
|
564
|
-
["--dir <path> / --project <name>", "Scope to one project (reaches unregistered Claude projects)."],
|
|
565
|
-
["--limit N", "Max results (default 20)."],
|
|
566
|
-
["--json", "Machine-readable output."],
|
|
567
|
-
],
|
|
568
|
-
examples: [
|
|
569
|
-
"apx session find \"mejorar interfaz web\"",
|
|
570
|
-
"apx session find \"sidebar\" --deep --engine codex",
|
|
571
|
-
],
|
|
572
|
-
}),
|
|
573
|
-
"session summary": topic({
|
|
574
|
-
title: "apx session summary",
|
|
575
|
-
summary: "Print an LLM summary of any session by id (resolves the owning engine automatically).",
|
|
576
|
-
usage: ["apx session summary <id> [--engine <id>]"],
|
|
577
|
-
examples: ["apx session summary 019abc...", "apx session summary 2e3c84 --engine claude"],
|
|
578
|
-
}),
|
|
579
|
-
"session ask": topic({
|
|
580
|
-
title: "apx session ask",
|
|
581
|
-
summary: "Ask a free-form question about a session. Small transcripts answered in one shot; large ones are map-reduced (mine each part, then synthesize).",
|
|
582
|
-
usage: ["apx session ask <id> \"<question>\" [--engine <id>] [--max-chunks N]"],
|
|
583
|
-
options: [
|
|
584
|
-
["--max-chunks N", "Cap how many transcript parts are mined (default 20)."],
|
|
585
|
-
["--engine <id>", "Restrict to one engine (apx | claude | codex)."],
|
|
586
|
-
],
|
|
587
|
-
examples: ["apx session ask 019abc... \"¿qué decidimos sobre el sidebar?\""],
|
|
588
|
-
}),
|
|
589
|
-
"session new": topic({
|
|
590
|
-
title: "apx session new",
|
|
591
|
-
summary: "Create a local runtime session file for an agent.",
|
|
592
|
-
usage: ["apx session new <slug> --title \"<title>\" [--task-ref <ref>] [--body -|\"text\"]"],
|
|
593
|
-
options: [
|
|
594
|
-
["--title <title>", "Required session title."],
|
|
595
|
-
["--task-ref <ref>", "External task id or URL."],
|
|
596
|
-
["--body -|text", "Initial session body from stdin or inline text."],
|
|
597
|
-
],
|
|
598
|
-
examples: ["apx session new reviewer --title \"Review PR\" --body -"],
|
|
599
|
-
}),
|
|
600
|
-
"session list": topic({
|
|
601
|
-
title: "apx session list",
|
|
602
|
-
summary: "List local runtime sessions.",
|
|
603
|
-
usage: ["apx session list [slug] [--last N]", "apx session ls [slug]"],
|
|
604
|
-
options: [["--last N", "Limit output to the most recent N sessions."]],
|
|
605
|
-
examples: ["apx session list", "apx session list reviewer --last 5"],
|
|
606
|
-
}),
|
|
607
|
-
"session get": topic({
|
|
608
|
-
title: "apx session get",
|
|
609
|
-
summary: "Print one session record (APX local, or any detected engine).",
|
|
610
|
-
usage: [
|
|
611
|
-
"apx session get <id> [--body|--full|--tail N] [--json]",
|
|
612
|
-
"apx session get <id> --engine <apx|claude|codex> [--full|--tail N]",
|
|
613
|
-
"apx session get <id> --any [--full|--tail N]",
|
|
614
|
-
],
|
|
615
|
-
options: [
|
|
616
|
-
["--body / --full", "Print the full session file (markdown or JSONL transcript)."],
|
|
617
|
-
["--tail N[k|m]", "Print the last N bytes of the transcript (e.g. --tail 32k)."],
|
|
618
|
-
["--engine <id>", "Look inside one engine's storage: apx | claude | codex."],
|
|
619
|
-
["--any", "Search every detected engine; errors on id collisions."],
|
|
620
|
-
["--json", "Machine-readable metadata."],
|
|
621
|
-
],
|
|
622
|
-
examples: [
|
|
623
|
-
"apx session get 2026-05-09-01",
|
|
624
|
-
"apx session get 2026-05-09-01 --body",
|
|
625
|
-
"apx session get b3f0c... --engine claude --tail 16k",
|
|
626
|
-
"apx session get b3f0c... --any --full",
|
|
627
|
-
],
|
|
628
|
-
}),
|
|
629
|
-
"session update": topic({
|
|
630
|
-
title: "apx session update",
|
|
631
|
-
summary: "Update session frontmatter fields.",
|
|
632
|
-
usage: ["apx session update <id> [--status <s>] [--result <r>] [--title <t>] [--task_ref <ref>] [--completed <iso>]"],
|
|
633
|
-
options: [
|
|
634
|
-
["--status <s>", "Set status."],
|
|
635
|
-
["--result <r>", "Set result summary."],
|
|
636
|
-
["--title <t>", "Set title."],
|
|
637
|
-
["--task_ref <ref>", "Set task reference."],
|
|
638
|
-
["--completed <iso>", "Set completion timestamp."],
|
|
639
|
-
],
|
|
640
|
-
examples: ["apx session update 2026-05-09-01 --status \"in progress\""],
|
|
641
|
-
}),
|
|
642
|
-
"session close": topic({
|
|
643
|
-
title: "apx session close",
|
|
644
|
-
summary: "Mark a session complete and optionally store a result.",
|
|
645
|
-
usage: ["apx session close <id> [--result \"<text>\"]"],
|
|
646
|
-
options: [["--result <text>", "One-line completion result."]],
|
|
647
|
-
examples: ["apx session close 2026-05-09-01 --result \"Tests passing\""],
|
|
648
|
-
}),
|
|
649
|
-
"session check": topic({
|
|
650
|
-
title: "apx session check",
|
|
651
|
-
summary: "Detect active sessions to avoid agent collision.",
|
|
652
|
-
usage: ["apx session check"],
|
|
653
|
-
examples: ["apx session check"],
|
|
654
|
-
}),
|
|
655
|
-
"session close-stale": topic({
|
|
656
|
-
title: "apx session close-stale",
|
|
657
|
-
summary: "Auto-close active sessions older than the stale threshold.",
|
|
658
|
-
usage: ["apx session close-stale"],
|
|
659
|
-
examples: ["apx session close-stale"],
|
|
660
|
-
}),
|
|
661
|
-
"session resume": topic({
|
|
662
|
-
title: "apx session resume",
|
|
663
|
-
summary:
|
|
664
|
-
"Locate <id> across every detected engine (apx | claude | codex), show it, and optionally continue.",
|
|
665
|
-
usage: [
|
|
666
|
-
"apx session resume <id> [--engine <id>] [--summary] [--full|--tail N]",
|
|
667
|
-
"apx session resume <id> --continue # spawn native CLI to resume",
|
|
668
|
-
"apx session resume <id> --into apx[:slug] # create a new APX session seeded with the summary",
|
|
669
|
-
],
|
|
670
|
-
options: [
|
|
671
|
-
["--engine <id>", "Restrict the search to one engine: apx | claude | codex."],
|
|
672
|
-
["--summary", "Ask the super-agent to summarize the transcript (needs daemon)."],
|
|
673
|
-
["--tail N[k|m]", "Print the last N bytes of the transcript (default = metadata only)."],
|
|
674
|
-
["--full / --body", "Print the entire transcript."],
|
|
675
|
-
["--continue", "Spawn the engine's native CLI (claude --resume / codex resume)."],
|
|
676
|
-
["--into apx[:slug]", "Create a new APX session whose body is the summary of <id>."],
|
|
677
|
-
["--project <name|id|path>", "Pin to a specific APX project (apx-engine summaries only)."],
|
|
678
|
-
],
|
|
679
|
-
examples: [
|
|
680
|
-
"apx session resume b3f0c12a... --summary",
|
|
681
|
-
"apx session resume 2026-05-09-01 --continue",
|
|
682
|
-
"apx session resume b3f0c12a... --engine claude --into apx:reviewer",
|
|
683
|
-
],
|
|
684
|
-
}),
|
|
685
|
-
"session compact": topic({
|
|
686
|
-
title: "apx session compact",
|
|
687
|
-
summary: "Compact an agent conversation into a durable summary.",
|
|
688
|
-
usage: ["apx session compact <slug> [--conversation <id>] [--model <model>] [--project <name|id|path>]"],
|
|
689
|
-
options: [
|
|
690
|
-
["--conversation <id>", "Compact a specific conversation instead of latest."],
|
|
691
|
-
["--model <model>", "Override summarizer model."],
|
|
692
|
-
["--project <name|id|path>", "Pin to a specific daemon project."],
|
|
693
|
-
],
|
|
694
|
-
examples: ["apx session compact reviewer --conversation abc123"],
|
|
695
|
-
}),
|
|
696
|
-
sessions: topic({
|
|
697
|
-
title: "apx sessions",
|
|
698
|
-
summary:
|
|
699
|
-
"List AI engine sessions (APX, Claude Code, Codex, …). Without --engine, lists every detected engine.",
|
|
700
|
-
usage: ["apx sessions list [--engine <id>] [--project <name>|--dir <path>] [--limit N]"],
|
|
701
|
-
commands: [
|
|
702
|
-
["list | ls", "List engine projects, or sessions of one project."],
|
|
703
|
-
],
|
|
704
|
-
options: [
|
|
705
|
-
["--engine <id>", "Filter to one engine: apx | claude | codex | antigravity. Omit to list every detected engine."],
|
|
706
|
-
["--project <name>", "A registered APX project to resolve the directory from."],
|
|
707
|
-
["--dir <path>", "An explicit project directory (for unregistered projects)."],
|
|
708
|
-
["--limit N", "Show only the N most recent sessions per engine."],
|
|
709
|
-
],
|
|
710
|
-
examples: [
|
|
711
|
-
"apx sessions list # every engine, every project",
|
|
712
|
-
"apx sessions list --engine claude",
|
|
713
|
-
"apx sessions list --engine claude --project iacrmar",
|
|
714
|
-
"apx sessions list --dir /path/to/project # this dir across every engine",
|
|
715
|
-
],
|
|
716
|
-
}),
|
|
717
|
-
"sessions list": topic({
|
|
718
|
-
title: "apx sessions list",
|
|
719
|
-
summary:
|
|
720
|
-
"List sessions. No --engine → every detected engine (empty engines show '(sin nada)', missing engines are skipped).",
|
|
721
|
-
usage: [
|
|
722
|
-
"apx sessions list # multi-engine view",
|
|
723
|
-
"apx sessions list --engine <id> # one engine",
|
|
724
|
-
"apx sessions list --engine <id> --project <name>",
|
|
725
|
-
"apx sessions list --engine <id> --dir <path>",
|
|
726
|
-
],
|
|
727
|
-
options: [
|
|
728
|
-
["--engine <id>", "apx | claude | codex | antigravity. Omit to scan all."],
|
|
729
|
-
["--project <name>", "Resolve directory from a registered APX project."],
|
|
730
|
-
["--dir <path>", "Explicit project directory."],
|
|
731
|
-
["--limit N", "Show only the N most recent sessions per engine."],
|
|
732
|
-
],
|
|
733
|
-
examples: [
|
|
734
|
-
"apx sessions list # every engine, every project",
|
|
735
|
-
"apx sessions list --engine claude --project iacrmar",
|
|
736
|
-
"apx sessions list --engine codex --dir /Volumes/work/iacrmar",
|
|
737
|
-
],
|
|
738
|
-
}),
|
|
739
|
-
obsidian: topic({
|
|
740
|
-
title: "apx obsidian",
|
|
741
|
-
summary: "Connect an Obsidian vault so agents can read, search and write notes; mirror APX memory into it.",
|
|
742
|
-
usage: ["apx obsidian <subcommand> [--global | --project <name|id|path>]"],
|
|
743
|
-
commands: [
|
|
744
|
-
["set <vault-path>", "Connect a vault (validates the path). Add --mcp / --memory to enable extras."],
|
|
745
|
-
["status", "Show the configured vault, note count and toggles for the scope."],
|
|
746
|
-
["sync", "Mirror APX memory (global + projects) into the vault, without duplicates."],
|
|
747
|
-
["remove | rm", "Disconnect the vault (also removes any auto-registered MCP)."],
|
|
748
|
-
],
|
|
749
|
-
options: [
|
|
750
|
-
["--global", "Target the default space (shared by all projects) instead of the current project."],
|
|
751
|
-
["--scope <project|global>", "Explicit scope (alias of --global)."],
|
|
752
|
-
["--mcp", "On `set`: auto-register an 'obsidian' MCP server pointing at the vault."],
|
|
753
|
-
["--memory", "On `set`: enable memory sync (then run `apx obsidian sync`)."],
|
|
754
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
755
|
-
],
|
|
756
|
-
examples: [
|
|
757
|
-
"apx obsidian set ~/Obsidian/Work --project appsi",
|
|
758
|
-
"apx obsidian set ~/Obsidian/Personal --global --mcp --memory",
|
|
759
|
-
"apx obsidian sync --global",
|
|
760
|
-
"apx obsidian status",
|
|
761
|
-
],
|
|
762
|
-
}),
|
|
763
|
-
mcp: topic({
|
|
764
|
-
title: "apx mcp",
|
|
765
|
-
summary: "Manage and call MCP servers merged from APC and supported IDE configs.",
|
|
766
|
-
usage: ["apx mcp <subcommand> [args] [--flags]"],
|
|
767
|
-
commands: [
|
|
768
|
-
["list | ls", "List MCP servers for a project."],
|
|
769
|
-
["add <name>", "Add a project-owned MCP server."],
|
|
770
|
-
["remove | rm <name>", "Remove a project-owned MCP server."],
|
|
771
|
-
["enable <name>", "Enable a project-owned MCP server."],
|
|
772
|
-
["disable <name>", "Disable a project-owned MCP server."],
|
|
773
|
-
["run <name> <tool>", "Call one MCP tool."],
|
|
774
|
-
["tools <name> [<tool>]", "List a server's tools, or show one tool's schema."],
|
|
775
|
-
["logs <name>", "Show spawn/init logs and stderr tail for a server."],
|
|
776
|
-
["check", "Audit source files, merge order, and conflicts."],
|
|
777
|
-
],
|
|
778
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
779
|
-
examples: ["apx mcp list", "apx mcp run filesystem read_file '{\"path\":\"README.md\"}'"],
|
|
780
|
-
}),
|
|
781
|
-
"mcp list": topic({
|
|
782
|
-
title: "apx mcp list",
|
|
783
|
-
summary: "List MCP servers available to a project.",
|
|
784
|
-
usage: ["apx mcp list [--project <name|id|path>]", "apx mcp ls [--project <name|id|path>]"],
|
|
785
|
-
options: [
|
|
786
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
787
|
-
["--scope <shared|runtime|global|all>", "Filter by scope (default: all). shared = .apc/mcps.json, runtime = ~/.apx/projects/<id>/mcps.json, global = ~/.apx/mcps.json."],
|
|
788
|
-
],
|
|
789
|
-
examples: [
|
|
790
|
-
"apx mcp list",
|
|
791
|
-
"apx mcp list --project default",
|
|
792
|
-
"apx mcp list --scope runtime --project iacrmar",
|
|
793
|
-
],
|
|
794
|
-
}),
|
|
795
|
-
"mcp add": topic({
|
|
796
|
-
title: "apx mcp add",
|
|
797
|
-
summary: "Add an APX-owned MCP server. Default scope is `shared` (commit to repo) inside an APC project, else `global`.",
|
|
798
|
-
usage: ["apx mcp add <name> --command <cmd> [--scope <shared|runtime|global>] [--env KEY=VAL ...] [--project <name|id|path>] [-- <arg> ...]"],
|
|
799
|
-
options: [
|
|
800
|
-
["--command <cmd>", "Executable command for stdio MCP server."],
|
|
801
|
-
["--scope <s>", "shared = .apc/mcps.json (committable); runtime = ~/.apx/projects/<id>/mcps.json (per-project, local, chmod 0600 — use for tokens); global = ~/.apx/mcps.json (machine-wide)."],
|
|
802
|
-
["--env KEY=VAL", "Environment variable. Repeatable."],
|
|
803
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
804
|
-
["-- <arg> ...", "Arguments passed to the MCP command."],
|
|
805
|
-
],
|
|
806
|
-
examples: [
|
|
807
|
-
"apx mcp add filesystem --command npx -- -y @modelcontextprotocol/server-filesystem .",
|
|
808
|
-
"apx mcp add github --scope runtime --project iacrmar --command npx -- -y @modelcontextprotocol/server-github",
|
|
809
|
-
],
|
|
810
|
-
}),
|
|
811
|
-
"mcp remove": topic({
|
|
812
|
-
title: "apx mcp remove",
|
|
813
|
-
summary: "Remove an APX-owned MCP server from a given scope.",
|
|
814
|
-
usage: [
|
|
815
|
-
"apx mcp remove <name> [--scope <shared|runtime|global>] [--project <name|id|path>]",
|
|
816
|
-
"apx mcp rm <name> [--scope <shared|runtime|global>] [--project <name|id|path>]",
|
|
817
|
-
],
|
|
818
|
-
options: [
|
|
819
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
820
|
-
["--scope <s>", "Which scope to remove from. Defaults to `shared` inside an APC project, else `global`."],
|
|
821
|
-
],
|
|
822
|
-
examples: ["apx mcp remove filesystem", "apx mcp remove github --scope runtime --project iacrmar"],
|
|
823
|
-
}),
|
|
824
|
-
"mcp enable": topic({
|
|
825
|
-
title: "apx mcp enable",
|
|
826
|
-
summary: "Enable a project-owned MCP server.",
|
|
827
|
-
usage: ["apx mcp enable <name> [--project <name|id|path>]"],
|
|
828
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
829
|
-
examples: ["apx mcp enable filesystem"],
|
|
830
|
-
}),
|
|
831
|
-
"mcp disable": topic({
|
|
832
|
-
title: "apx mcp disable",
|
|
833
|
-
summary: "Disable a project-owned MCP server.",
|
|
834
|
-
usage: ["apx mcp disable <name> [--project <name|id|path>]"],
|
|
835
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
836
|
-
examples: ["apx mcp disable filesystem"],
|
|
837
|
-
}),
|
|
838
|
-
"mcp run": topic({
|
|
839
|
-
title: "apx mcp run",
|
|
840
|
-
summary: "Call a tool on an MCP server through the daemon.",
|
|
841
|
-
usage: ["apx mcp run <name> <tool> ['<json-args>'] [--project <name|id|path>]"],
|
|
842
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
843
|
-
examples: ["apx mcp run filesystem read_file '{\"path\":\"README.md\"}'"],
|
|
844
|
-
}),
|
|
845
|
-
"mcp tools": topic({
|
|
846
|
-
title: "apx mcp tools",
|
|
847
|
-
summary: "List an MCP server's tools, or show one tool's input schema with a ready-to-run example.",
|
|
848
|
-
usage: ["apx mcp tools <name> [<tool>] [--json] [--project <name|id|path>]"],
|
|
849
|
-
options: [
|
|
850
|
-
["--json", "Raw JSON output (full tool objects with inputSchema)."],
|
|
851
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
852
|
-
],
|
|
853
|
-
examples: [
|
|
854
|
-
"apx mcp tools filesystem",
|
|
855
|
-
"apx mcp tools filesystem read_file",
|
|
856
|
-
"apx mcp tools dokploy-mcp --json",
|
|
857
|
-
],
|
|
858
|
-
}),
|
|
859
|
-
"mcp logs": topic({
|
|
860
|
-
title: "apx mcp logs",
|
|
861
|
-
summary: "Show an MCP server's spawn/init event log and stderr tail — first stop when a server doesn't list tools.",
|
|
862
|
-
usage: ["apx mcp logs <name> [--json] [--project <name|id|path>]"],
|
|
863
|
-
options: [
|
|
864
|
-
["--json", "Raw JSON output."],
|
|
865
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
866
|
-
],
|
|
867
|
-
examples: ["apx mcp logs dokploy-mcp"],
|
|
868
|
-
}),
|
|
869
|
-
"mcp check": topic({
|
|
870
|
-
title: "apx mcp check",
|
|
871
|
-
summary: "Audit MCP source files, active entries, and merge conflicts.",
|
|
872
|
-
usage: ["apx mcp check [--project <name|id|path>]"],
|
|
873
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
874
|
-
examples: ["apx mcp check"],
|
|
875
|
-
}),
|
|
876
|
-
daemon: topic({
|
|
877
|
-
title: "apx daemon",
|
|
878
|
-
summary: "Start, stop, restart, inspect, reload, and read logs from the local APX daemon.",
|
|
879
|
-
usage: ["apx daemon <start|stop|restart|reload|status|logs> [--flags]"],
|
|
880
|
-
commands: [
|
|
881
|
-
["start", "Start daemon."],
|
|
882
|
-
["stop", "Stop daemon."],
|
|
883
|
-
["restart", "Stop then start — picks up code, prompt, and tool changes."],
|
|
884
|
-
["reload", "Re-read ~/.apx/config.json only (NOT code/prompts) without restart."],
|
|
885
|
-
["status", "Show daemon health."],
|
|
886
|
-
["logs", "Print daemon log tail."],
|
|
887
|
-
],
|
|
888
|
-
examples: ["apx daemon status", "apx daemon restart", "apx daemon logs --tail 100"],
|
|
889
|
-
}),
|
|
890
|
-
"daemon restart": topic({
|
|
891
|
-
title: "apx daemon restart",
|
|
892
|
-
summary: "Restart the local APX daemon (stop + start in one step).",
|
|
893
|
-
usage: ["apx daemon restart"],
|
|
894
|
-
examples: ["apx daemon restart"],
|
|
895
|
-
}),
|
|
896
|
-
"daemon start": topic({
|
|
897
|
-
title: "apx daemon start",
|
|
898
|
-
summary: "Start the local APX daemon.",
|
|
899
|
-
usage: ["apx daemon start"],
|
|
900
|
-
examples: ["apx daemon start"],
|
|
901
|
-
}),
|
|
902
|
-
"daemon stop": topic({
|
|
903
|
-
title: "apx daemon stop",
|
|
904
|
-
summary: "Stop the local APX daemon.",
|
|
905
|
-
usage: ["apx daemon stop"],
|
|
906
|
-
examples: ["apx daemon stop"],
|
|
907
|
-
}),
|
|
908
|
-
"daemon status": topic({
|
|
909
|
-
title: "apx daemon status",
|
|
910
|
-
summary: "Show local APX daemon status.",
|
|
911
|
-
usage: ["apx daemon status"],
|
|
912
|
-
examples: ["apx daemon status"],
|
|
913
|
-
}),
|
|
914
|
-
"daemon logs": topic({
|
|
915
|
-
title: "apx daemon logs",
|
|
916
|
-
summary: "Print daemon logs.",
|
|
917
|
-
usage: ["apx daemon logs [--tail N]"],
|
|
918
|
-
options: [["--tail N", "Number of lines to print."]],
|
|
919
|
-
examples: ["apx daemon logs --tail 100"],
|
|
920
|
-
}),
|
|
921
|
-
telegram: topic({
|
|
922
|
-
title: "apx telegram",
|
|
923
|
-
summary: "Configure, inspect, and send through the Telegram bridge.",
|
|
924
|
-
usage: ["apx telegram <send|status|start|stop|setup|channel|contacts|role|roles|owner> [args] [--flags]"],
|
|
925
|
-
commands: [
|
|
926
|
-
["send \"text\"", "Send a Telegram message."],
|
|
927
|
-
["status", "Show Telegram plugin status."],
|
|
928
|
-
["start", "Start polling on every configured channel."],
|
|
929
|
-
["stop", "Stop polling (config stays intact)."],
|
|
930
|
-
["setup", "Print setup guidance."],
|
|
931
|
-
["channel <sub>", "Manage channels: add | list | show | set | unset | remove."],
|
|
932
|
-
["contacts", "List the known-people roster (auto-recorded from inbound messages)."],
|
|
933
|
-
["role <user_id> <role>", "Assign a role to a contact (owner-only / terminal)."],
|
|
934
|
-
["roles <sub>", "Define role→tools: list | set <name> --tools a,b | rm <name>."],
|
|
935
|
-
["owner <channel> <user_id>", "Set who owns a channel."],
|
|
936
|
-
],
|
|
937
|
-
examples: [
|
|
938
|
-
"apx telegram status",
|
|
939
|
-
"apx telegram channel add",
|
|
940
|
-
"apx telegram contacts",
|
|
941
|
-
"apx telegram role 889721252 editor",
|
|
942
|
-
"apx telegram owner default 889721252",
|
|
943
|
-
"apx telegram send \"hello\" --chat 123456",
|
|
944
|
-
],
|
|
945
|
-
}),
|
|
946
|
-
"telegram contacts": topic({
|
|
947
|
-
title: "apx telegram contacts",
|
|
948
|
-
summary: "List the global contacts roster, with each person's role and last-seen.",
|
|
949
|
-
usage: ["apx telegram contacts", "apx telegram contacts rm <user_id>"],
|
|
950
|
-
examples: ["apx telegram contacts", "apx telegram contacts rm 123456"],
|
|
951
|
-
}),
|
|
952
|
-
"telegram role": topic({
|
|
953
|
-
title: "apx telegram role",
|
|
954
|
-
summary: "Assign a role to a contact by Telegram user_id. Roles gate which tools they can use.",
|
|
955
|
-
usage: ["apx telegram role <user_id> <role>"],
|
|
956
|
-
examples: ["apx telegram role 889721252 editor", "apx telegram role 123456 guest"],
|
|
957
|
-
}),
|
|
958
|
-
"telegram roles": topic({
|
|
959
|
-
title: "apx telegram roles",
|
|
960
|
-
summary: "Define role→tools capability maps. owner/guest are built-in.",
|
|
961
|
-
usage: [
|
|
962
|
-
"apx telegram roles",
|
|
963
|
-
"apx telegram roles set <name> --tools call_agent,list_tasks",
|
|
964
|
-
"apx telegram roles set <name> --tools '*'",
|
|
965
|
-
"apx telegram roles rm <name>",
|
|
966
|
-
],
|
|
967
|
-
examples: [
|
|
968
|
-
"apx telegram roles",
|
|
969
|
-
"apx telegram roles set editor --tools call_agent,create_task,list_tasks",
|
|
970
|
-
],
|
|
971
|
-
}),
|
|
972
|
-
"telegram owner": topic({
|
|
973
|
-
title: "apx telegram owner",
|
|
974
|
-
summary: "Set who owns a channel (overrides their role to owner on that channel).",
|
|
975
|
-
usage: ["apx telegram owner <channel> <user_id>"],
|
|
976
|
-
examples: ["apx telegram owner default 889721252"],
|
|
977
|
-
}),
|
|
978
|
-
"telegram send": topic({
|
|
979
|
-
title: "apx telegram send",
|
|
980
|
-
summary: "Send a Telegram message through the configured bridge.",
|
|
981
|
-
usage: ["apx telegram send \"<text>\" [--chat <id>] [--interrupt]"],
|
|
982
|
-
options: [
|
|
983
|
-
["--chat <id>", "Override configured chat id."],
|
|
984
|
-
["--interrupt", "Send immediately, bypassing any pending agent queue (alias: --force)."],
|
|
985
|
-
["--force", "Alias for --interrupt."],
|
|
986
|
-
],
|
|
987
|
-
examples: [
|
|
988
|
-
"apx telegram send \"Deploy finished\" --chat 123456",
|
|
989
|
-
"apx telegram send \"Urgent!\" --interrupt",
|
|
990
|
-
],
|
|
991
|
-
}),
|
|
992
|
-
"telegram status": topic({
|
|
993
|
-
title: "apx telegram status",
|
|
994
|
-
summary: "Show Telegram bridge status.",
|
|
995
|
-
usage: ["apx telegram status"],
|
|
996
|
-
examples: ["apx telegram status"],
|
|
997
|
-
}),
|
|
998
|
-
"telegram start": topic({
|
|
999
|
-
title: "apx telegram start",
|
|
1000
|
-
summary: "Start Telegram polling on every configured channel.",
|
|
1001
|
-
usage: ["apx telegram start"],
|
|
1002
|
-
examples: ["apx telegram start"],
|
|
1003
|
-
}),
|
|
1004
|
-
"telegram stop": topic({
|
|
1005
|
-
title: "apx telegram stop",
|
|
1006
|
-
summary: "Stop Telegram polling (config stays intact; resume with apx telegram start).",
|
|
1007
|
-
usage: ["apx telegram stop"],
|
|
1008
|
-
examples: ["apx telegram stop"],
|
|
1009
|
-
}),
|
|
1010
|
-
"telegram setup": topic({
|
|
1011
|
-
title: "apx telegram setup",
|
|
1012
|
-
summary: "Print Telegram setup guidance.",
|
|
1013
|
-
usage: ["apx telegram setup"],
|
|
1014
|
-
examples: ["apx telegram setup"],
|
|
1015
|
-
}),
|
|
1016
|
-
"telegram channel": topic({
|
|
1017
|
-
title: "apx telegram channel",
|
|
1018
|
-
summary: "Manage entries in cfg.telegram.channels[] — name, bot, chat, pinned project, master agent.",
|
|
1019
|
-
usage: ["apx telegram channel <subcommand> [args] [--flags]"],
|
|
1020
|
-
commands: [
|
|
1021
|
-
["add [name]", "Interactive wizard (or non-interactive with flags)."],
|
|
1022
|
-
["list | ls", "List configured channels."],
|
|
1023
|
-
["show <name>", "Print one channel as JSON."],
|
|
1024
|
-
["set <name>", "Patch fields (--project, --agent, --respond-engine true|false, --bot-token, --chat-id)."],
|
|
1025
|
-
["unset <name>", "Clear optional fields (--project, --agent, --bot-token, --chat-id)."],
|
|
1026
|
-
["remove | rm <name>", "Delete the channel from the array."],
|
|
1027
|
-
],
|
|
1028
|
-
options: [
|
|
1029
|
-
["--project <name|id|path>", "Pin channel to a project for inbound routing."],
|
|
1030
|
-
["--agent <slug>", "Route inbound to this agent instead of the super-agent."],
|
|
1031
|
-
["--respond-engine <true|false>", "Whether the engine auto-replies on this channel."],
|
|
1032
|
-
["--bot-token <token>", "Override bot_token (use `add` non-interactively or `set` to rotate)."],
|
|
1033
|
-
["--chat-id <id>", "Default outbound chat id."],
|
|
1034
|
-
],
|
|
1035
|
-
examples: [
|
|
1036
|
-
"apx telegram channel add",
|
|
1037
|
-
"apx telegram channel add clientes --bot-token TOKEN --chat-id 1234 --project iacrmar --agent comercial",
|
|
1038
|
-
"apx telegram channel list",
|
|
1039
|
-
"apx telegram channel set clientes --agent reviewer",
|
|
1040
|
-
"apx telegram channel unset clientes --agent",
|
|
1041
|
-
"apx telegram channel remove clientes",
|
|
1042
|
-
],
|
|
1043
|
-
}),
|
|
1044
|
-
"telegram channel add": topic({
|
|
1045
|
-
title: "apx telegram channel add",
|
|
1046
|
-
summary: "Interactive wizard (or one-shot non-interactive form) to add a Telegram channel.",
|
|
1047
|
-
usage: [
|
|
1048
|
-
"apx telegram channel add",
|
|
1049
|
-
"apx telegram channel add <name> --bot-token TOKEN --chat-id ID [--project P] [--agent A] [--respond-engine true|false]",
|
|
1050
|
-
],
|
|
1051
|
-
examples: [
|
|
1052
|
-
"apx telegram channel add",
|
|
1053
|
-
"apx telegram channel add support --bot-token 12345:ABC --chat-id 1234 --project default",
|
|
1054
|
-
],
|
|
1055
|
-
}),
|
|
1056
|
-
"telegram channel list": topic({
|
|
1057
|
-
title: "apx telegram channel list",
|
|
1058
|
-
summary: "List configured Telegram channels.",
|
|
1059
|
-
usage: ["apx telegram channel list", "apx telegram channel ls"],
|
|
1060
|
-
examples: ["apx telegram channel list"],
|
|
1061
|
-
}),
|
|
1062
|
-
"telegram channel show": topic({
|
|
1063
|
-
title: "apx telegram channel show",
|
|
1064
|
-
summary: "Print one Telegram channel as pretty JSON.",
|
|
1065
|
-
usage: ["apx telegram channel show <name>"],
|
|
1066
|
-
examples: ["apx telegram channel show clientes"],
|
|
1067
|
-
}),
|
|
1068
|
-
"telegram channel set": topic({
|
|
1069
|
-
title: "apx telegram channel set",
|
|
1070
|
-
summary: "Patch fields on an existing Telegram channel and reload the daemon.",
|
|
1071
|
-
usage: ["apx telegram channel set <name> [--project P] [--agent A] [--respond-engine true|false] [--bot-token T] [--chat-id ID]"],
|
|
1072
|
-
examples: [
|
|
1073
|
-
"apx telegram channel set clientes --project iacrmar --agent comercial",
|
|
1074
|
-
"apx telegram channel set clientes --respond-engine false",
|
|
1075
|
-
],
|
|
1076
|
-
}),
|
|
1077
|
-
"telegram channel unset": topic({
|
|
1078
|
-
title: "apx telegram channel unset",
|
|
1079
|
-
summary: "Clear optional fields on a channel (project pin, master agent, etc).",
|
|
1080
|
-
usage: ["apx telegram channel unset <name> [--project] [--agent] [--bot-token] [--chat-id]"],
|
|
1081
|
-
examples: ["apx telegram channel unset clientes --agent", "apx telegram channel unset clientes --project"],
|
|
1082
|
-
}),
|
|
1083
|
-
"telegram channel remove": topic({
|
|
1084
|
-
title: "apx telegram channel remove",
|
|
1085
|
-
summary: "Delete a channel from cfg.telegram.channels[] and reload the daemon.",
|
|
1086
|
-
usage: ["apx telegram channel remove <name>", "apx telegram channel rm <name>"],
|
|
1087
|
-
examples: ["apx telegram channel remove clientes"],
|
|
1088
|
-
}),
|
|
1089
|
-
messages: topic({
|
|
1090
|
-
title: "apx messages",
|
|
1091
|
-
summary: "Read APX message logs.",
|
|
1092
|
-
usage: ["apx messages <tail|chat|search> [args] [--flags]"],
|
|
1093
|
-
commands: [
|
|
1094
|
-
["tail", "Print recent messages."],
|
|
1095
|
-
["chat", "Print recent messages as a chat transcript with actor types."],
|
|
1096
|
-
["search \"query\"", "Search message logs."],
|
|
1097
|
-
],
|
|
1098
|
-
examples: ["apx messages chat --channel telegram -n 20", "apx messages search \"deploy\""],
|
|
1099
|
-
}),
|
|
1100
|
-
"messages tail": topic({
|
|
1101
|
-
title: "apx messages tail",
|
|
1102
|
-
summary: "Print recent APX messages.",
|
|
1103
|
-
usage: ["apx messages tail [--agent <slug>] [--channel <name>] [-n N] [--global] [--project <name|id|path>]"],
|
|
1104
|
-
options: [
|
|
1105
|
-
["--agent <slug>", "Filter by agent."],
|
|
1106
|
-
["--channel <name>", "Filter by channel, for example runtime, telegram, exec."],
|
|
1107
|
-
["-n N", "Number of messages to print."],
|
|
1108
|
-
["--global", "Read global message store where supported."],
|
|
1109
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1110
|
-
],
|
|
1111
|
-
examples: ["apx messages tail", "apx messages tail --channel runtime -n 20"],
|
|
1112
|
-
}),
|
|
1113
|
-
"messages search": topic({
|
|
1114
|
-
title: "apx messages search",
|
|
1115
|
-
summary: "Search APX message logs.",
|
|
1116
|
-
usage: ["apx messages search \"<query>\" [--project <name|id|path>]"],
|
|
1117
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1118
|
-
examples: ["apx messages search \"deploy\""],
|
|
1119
|
-
}),
|
|
1120
|
-
search: topic({
|
|
1121
|
-
title: "apx search",
|
|
1122
|
-
summary: "Web search from the terminal (DuckDuckGo / Brave / Puppeteer fallback).",
|
|
1123
|
-
usage: ["apx search \"<query>\" [--mode auto|ddg|brave|browser] [-n N] [--json]"],
|
|
1124
|
-
options: [
|
|
1125
|
-
["--mode <m>", "auto (default) | ddg | brave | browser. Brave needs BRAVE_API_KEY."],
|
|
1126
|
-
["-n N", "Number of results (default 5, max 20)."],
|
|
1127
|
-
["--json", "Output raw JSON instead of the formatted list."],
|
|
1128
|
-
],
|
|
1129
|
-
examples: [
|
|
1130
|
-
"apx search \"agent project context\"",
|
|
1131
|
-
"apx search \"node 22 release notes\" --mode ddg -n 10",
|
|
1132
|
-
"apx search \"weather buenos aires\" --json",
|
|
1133
|
-
],
|
|
1134
|
-
}),
|
|
1135
|
-
"messages chat": topic({
|
|
1136
|
-
title: "apx messages chat",
|
|
1137
|
-
summary: "Print APX messages as a chat transcript with user, agent, tool, or system type.",
|
|
1138
|
-
usage: ["apx messages chat [--channel <name>] [-n N] [--global] [--agent <slug>] [--project <name|id|path>]"],
|
|
1139
|
-
options: [
|
|
1140
|
-
["--channel <name>", "Filter by channel; telegram defaults to global message store."],
|
|
1141
|
-
["-n N", "Number of messages to print."],
|
|
1142
|
-
["--global", "Read global message store."],
|
|
1143
|
-
["--agent <slug>", "Filter project messages by agent."],
|
|
1144
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1145
|
-
],
|
|
1146
|
-
examples: ["apx messages chat --channel telegram -n 20", "apx messages chat --channel a2a --project default"],
|
|
1147
|
-
}),
|
|
1148
|
-
exec: topic({
|
|
1149
|
-
title: "apx exec",
|
|
1150
|
-
summary: "One-shot LLM call. Default target is the APX super-agent (daemon); use -a for an APC agent slug.",
|
|
1151
|
-
usage: [
|
|
1152
|
-
"apx exec \"<prompt>\" [--model <id>] [--project <name|id|path>]",
|
|
1153
|
-
"apx exec --code \"<prompt>\" (coding channel: code system prompt + git tools)",
|
|
1154
|
-
"apx exec -- \"<prompt>\"",
|
|
1155
|
-
"apx exec -a <agent> \"<prompt>\" [--model <id>]",
|
|
1156
|
-
"apx exec <agent> \"<prompt>\" (legacy positional agent)",
|
|
1157
|
-
],
|
|
1158
|
-
options: [
|
|
1159
|
-
["-a, --agent <slug>", "APC agent slug (omit for super-agent default)."],
|
|
1160
|
-
["-c, --code", "Run on the 'code' channel (coding system prompt + code tools)."],
|
|
1161
|
-
["--channel <name>", "Explicit channel (cli, code, api, …). Default cli."],
|
|
1162
|
-
["--model <id>", "Override configured model."],
|
|
1163
|
-
["--max-tokens N", "Output token limit."],
|
|
1164
|
-
["--temperature T", "Sampling temperature."],
|
|
1165
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1166
|
-
],
|
|
1167
|
-
examples: [
|
|
1168
|
-
"apx exec \"What time is it in UTC?\"",
|
|
1169
|
-
"apx exec --code \"refactor the auth middleware\"",
|
|
1170
|
-
"apx exec -- \"decime qué hora es\"",
|
|
1171
|
-
"apx exec -a reviewer \"Summarize your role\"",
|
|
1172
|
-
"apx exec reviewer \"Summarize your role\" --model gpt-5.2",
|
|
1173
|
-
],
|
|
1174
|
-
}),
|
|
1175
|
-
chat: topic({
|
|
1176
|
-
title: "apx chat",
|
|
1177
|
-
summary: "Start an interactive agent chat REPL.",
|
|
1178
|
-
usage: ["apx chat <agent> [--conversation <id>] [--model <id>] [--project <name|id|path>]"],
|
|
1179
|
-
options: [
|
|
1180
|
-
["--conversation <id>", "Continue an existing conversation."],
|
|
1181
|
-
["--model <id>", "Override configured model."],
|
|
1182
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1183
|
-
],
|
|
1184
|
-
examples: ["apx chat reviewer", "apx chat reviewer --conversation abc123"],
|
|
1185
|
-
}),
|
|
1186
|
-
acp: topic({
|
|
1187
|
-
title: "apx acp",
|
|
1188
|
-
summary: "Serve the APX super-agent over the Agent Client Protocol (ACP) on stdio.",
|
|
1189
|
-
usage: ["apx acp"],
|
|
1190
|
-
notes: [
|
|
1191
|
-
"For ACP clients (Zed, JetBrains, marimo, …) that spawn agents as subprocesses.",
|
|
1192
|
-
"stdout carries the protocol — logs go to stderr and ~/.apx/logs/apx.log.",
|
|
1193
|
-
"Sessions resolve the APC project from the client's workspace cwd.",
|
|
1194
|
-
],
|
|
1195
|
-
examples: ["apx acp"],
|
|
1196
|
-
}),
|
|
1197
|
-
code: topic({
|
|
1198
|
-
title: "apx code",
|
|
1199
|
-
summary: "Start the APX terminal coding assistant with system and workspace context.",
|
|
1200
|
-
usage: ["apx code [--project <name|id|path>] [--agent <slug>]"],
|
|
1201
|
-
options: [
|
|
1202
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1203
|
-
["--agent <slug>", "Route chat to a project agent instead of the APX default (super-agent mode)."],
|
|
1204
|
-
],
|
|
1205
|
-
examples: ["apx code", "apx code --project default", "apx code --agent reviewer"],
|
|
1206
|
-
}),
|
|
1207
|
-
conversations: topic({
|
|
1208
|
-
title: "apx conversations",
|
|
1209
|
-
summary: "List or read stored agent conversations.",
|
|
1210
|
-
usage: ["apx conversations <list|get> <agent> [id] [--project <name|id|path>]", "apx conv <list|get> <agent> [id]"],
|
|
1211
|
-
commands: [
|
|
1212
|
-
["list | ls <agent>", "List conversations for an agent."],
|
|
1213
|
-
["get | show <agent> <id>", "Print one conversation."],
|
|
1214
|
-
],
|
|
1215
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1216
|
-
examples: ["apx conversations list reviewer", "apx conversations get reviewer abc123"],
|
|
1217
|
-
}),
|
|
1218
|
-
"conversations list": topic({
|
|
1219
|
-
title: "apx conversations list",
|
|
1220
|
-
summary: "List stored conversations for an agent.",
|
|
1221
|
-
usage: ["apx conversations list <agent> [--project <name|id|path>]", "apx conv ls <agent>"],
|
|
1222
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1223
|
-
examples: ["apx conversations list reviewer"],
|
|
1224
|
-
}),
|
|
1225
|
-
"conversations get": topic({
|
|
1226
|
-
title: "apx conversations get",
|
|
1227
|
-
summary: "Print one stored conversation.",
|
|
1228
|
-
usage: ["apx conversations get <agent> <id> [--project <name|id|path>]", "apx conv show <agent> <id>"],
|
|
1229
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1230
|
-
examples: ["apx conversations get reviewer abc123"],
|
|
1231
|
-
}),
|
|
1232
|
-
conv: topic({
|
|
1233
|
-
title: "apx conv",
|
|
1234
|
-
summary: "Alias for apx conversations.",
|
|
1235
|
-
usage: ["apx conv <list|get> <agent> [id]"],
|
|
1236
|
-
examples: ["apx conv list reviewer"],
|
|
1237
|
-
}),
|
|
1238
|
-
run: topic({
|
|
1239
|
-
title: "apx run",
|
|
1240
|
-
summary: "Launch a full external runtime session for an agent.",
|
|
1241
|
-
usage: ["apx run <agent> --runtime <claude-code|codex|opencode|aider|cursor-agent|gemini-cli|qwen-code|antigravity> \"<prompt>\" [--timeout <seconds>] [--project <name|id|path>]"],
|
|
1242
|
-
options: [
|
|
1243
|
-
["--runtime <id>", "Runtime CLI to launch: claude-code, codex, opencode, aider, cursor-agent, gemini-cli, qwen-code, antigravity."],
|
|
1244
|
-
["--timeout <seconds>", "Runtime timeout."],
|
|
1245
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1246
|
-
],
|
|
1247
|
-
examples: ["apx run reviewer --runtime codex \"Review this repo\" --timeout 600"],
|
|
1248
|
-
}),
|
|
1249
|
-
env: topic({
|
|
1250
|
-
title: "apx env",
|
|
1251
|
-
summary: "Inspect local agent runtime environment.",
|
|
1252
|
-
usage: ["apx env detect", "apx env list"],
|
|
1253
|
-
commands: [["detect | list", "Show which supported runtime CLIs are installed."]],
|
|
1254
|
-
examples: ["apx env detect"],
|
|
1255
|
-
}),
|
|
1256
|
-
"env detect": topic({
|
|
1257
|
-
title: "apx env detect",
|
|
1258
|
-
summary: "Show which supported runtime CLIs are installed.",
|
|
1259
|
-
usage: ["apx env detect", "apx env list"],
|
|
1260
|
-
examples: ["apx env detect"],
|
|
1261
|
-
}),
|
|
1262
|
-
send: topic({
|
|
1263
|
-
title: "apx send",
|
|
1264
|
-
summary: "Log an agent-to-agent message, optionally delivering it through the target engine.",
|
|
1265
|
-
usage: ["apx send <from> <to> \"<message>\" [--deliver] [--project <name|id|path>]"],
|
|
1266
|
-
options: [
|
|
1267
|
-
["--deliver", "Run the target engine after logging the message."],
|
|
1268
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1269
|
-
],
|
|
1270
|
-
examples: ["apx send planner reviewer \"Please review this plan\" --deliver"],
|
|
1271
|
-
}),
|
|
1272
|
-
connections: topic({
|
|
1273
|
-
title: "apx connections",
|
|
1274
|
-
summary: "Show an agent communication map.",
|
|
1275
|
-
usage: ["apx connections <agent> [--project <name|id|path>]"],
|
|
1276
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1277
|
-
examples: ["apx connections reviewer"],
|
|
1278
|
-
}),
|
|
1279
|
-
routine: topic({
|
|
1280
|
-
title: "apx routine",
|
|
1281
|
-
summary: "Manage scheduled APX routines.",
|
|
1282
|
-
usage: ["apx routine <subcommand> [args] [--flags]"],
|
|
1283
|
-
commands: [
|
|
1284
|
-
["list | ls", "List routines with next and last run."],
|
|
1285
|
-
["add | new <name>", "Create a routine."],
|
|
1286
|
-
["get | show <name>", "Print routine definition."],
|
|
1287
|
-
["history | hist <name>", "Show execution history."],
|
|
1288
|
-
["run <name>", "Trigger manually."],
|
|
1289
|
-
["enable <name>", "Enable routine."],
|
|
1290
|
-
["disable <name>", "Disable routine."],
|
|
1291
|
-
["remove | rm <name>", "Remove routine."],
|
|
1292
|
-
],
|
|
1293
|
-
examples: ["apx routine list", "apx routine add heartbeat --kind heartbeat --schedule every:5m"],
|
|
1294
|
-
}),
|
|
1295
|
-
routines: topic({
|
|
1296
|
-
title: "apx routines",
|
|
1297
|
-
summary: "Alias for apx routine.",
|
|
1298
|
-
usage: ["apx routines <subcommand> [args] [--flags]"],
|
|
1299
|
-
examples: ["apx routines list"],
|
|
1300
|
-
}),
|
|
1301
|
-
"routine list": topic({
|
|
1302
|
-
title: "apx routine list",
|
|
1303
|
-
summary: "List routines with next and last run details.",
|
|
1304
|
-
usage: ["apx routine list [--project <name|id|path>]", "apx routine ls [--project <name|id|path>]"],
|
|
1305
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1306
|
-
examples: ["apx routine list"],
|
|
1307
|
-
}),
|
|
1308
|
-
"routine add": topic({
|
|
1309
|
-
title: "apx routine add",
|
|
1310
|
-
summary: "Create a scheduled routine.",
|
|
1311
|
-
usage: ["apx routine add <name> --kind <kind> --schedule <schedule> [--spec '<json>'] [--pre-commands 'cmd1,cmd2'] [--post-commands 'cmd'] [--skip-prompt-on signal|pre_failure|pre_success|always|never] [--project <name|id|path>]"],
|
|
1312
|
-
options: [
|
|
1313
|
-
["--kind <kind>", "heartbeat, exec_agent, super_agent, telegram, or shell."],
|
|
1314
|
-
["--schedule <schedule>", "every:60s, every:5m, every:1h, or once:<iso>."],
|
|
1315
|
-
["--spec '<json>'", "Routine-specific JSON config."],
|
|
1316
|
-
["--pre-commands 'cmd'", "Comma-separated shell commands to run BEFORE the LLM. Use 'artifact:<name>' shorthand."],
|
|
1317
|
-
["--post-commands 'cmd'", "Comma-separated shell commands to run AFTER the LLM. Env: APX_LLM_OUTPUT, APX_PRE_OUTPUT, APX_STATUS."],
|
|
1318
|
-
["--skip-prompt-on <mode>", "signal (default), pre_failure, pre_success, always, never."],
|
|
1319
|
-
["--permission-mode <mode>", "total, automatico, or permiso."],
|
|
1320
|
-
["--allowed-tools a,b", "Comma-separated allowed tool names."],
|
|
1321
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1322
|
-
],
|
|
1323
|
-
examples: [
|
|
1324
|
-
"apx routine add check --kind shell --schedule every:1h --spec '{\"cmd\":\"npm test\"}'",
|
|
1325
|
-
"apx routine add asana-check --kind super_agent --schedule '*/5 * * * *' --pre-commands 'artifact:check_asana.sh' --skip-prompt-on pre_success --project 0",
|
|
1326
|
-
],
|
|
1327
|
-
}),
|
|
1328
|
-
"routine get": topic({
|
|
1329
|
-
title: "apx routine get",
|
|
1330
|
-
summary: "Print one routine definition.",
|
|
1331
|
-
usage: ["apx routine get <name> [--project <name|id|path>]", "apx routine show <name> [--project <name|id|path>]"],
|
|
1332
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1333
|
-
examples: ["apx routine get check"],
|
|
1334
|
-
}),
|
|
1335
|
-
"routine history": topic({
|
|
1336
|
-
title: "apx routine history",
|
|
1337
|
-
summary: "Show execution history for one routine.",
|
|
1338
|
-
usage: ["apx routine history <name> [--project <name|id|path>]", "apx routine hist <name> [--project <name|id|path>]"],
|
|
1339
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1340
|
-
examples: ["apx routine history check"],
|
|
1341
|
-
}),
|
|
1342
|
-
"routine run": topic({
|
|
1343
|
-
title: "apx routine run",
|
|
1344
|
-
summary: "Trigger a routine manually, ignoring schedule.",
|
|
1345
|
-
usage: ["apx routine run <name> [--project <name|id|path>]"],
|
|
1346
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1347
|
-
examples: ["apx routine run check"],
|
|
1348
|
-
}),
|
|
1349
|
-
"routine enable": topic({
|
|
1350
|
-
title: "apx routine enable",
|
|
1351
|
-
summary: "Enable one routine.",
|
|
1352
|
-
usage: ["apx routine enable <name> [--project <name|id|path>]"],
|
|
1353
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1354
|
-
examples: ["apx routine enable check"],
|
|
1355
|
-
}),
|
|
1356
|
-
"routine disable": topic({
|
|
1357
|
-
title: "apx routine disable",
|
|
1358
|
-
summary: "Disable one routine.",
|
|
1359
|
-
usage: ["apx routine disable <name> [--project <name|id|path>]"],
|
|
1360
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1361
|
-
examples: ["apx routine disable check"],
|
|
1362
|
-
}),
|
|
1363
|
-
"routine remove": topic({
|
|
1364
|
-
title: "apx routine remove",
|
|
1365
|
-
summary: "Remove one routine.",
|
|
1366
|
-
usage: ["apx routine remove <name> [--project <name|id|path>]", "apx routine rm <name> [--project <name|id|path>]"],
|
|
1367
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1368
|
-
examples: ["apx routine remove check"],
|
|
1369
|
-
}),
|
|
1370
|
-
artifact: topic({
|
|
1371
|
-
title: "apx artifact",
|
|
1372
|
-
summary: "Managed files stored in project storage. Used as pre/post-commands scripts or data files for routines.",
|
|
1373
|
-
usage: ["apx artifact <subcommand> [args] [--flags]"],
|
|
1374
|
-
commands: [
|
|
1375
|
-
["create <name>", "Create a new empty artifact. Prints its absolute path."],
|
|
1376
|
-
["list | ls", "List artifacts in the project."],
|
|
1377
|
-
["show <name>", "Print artifact content."],
|
|
1378
|
-
["run <name> [args...]", "Execute a runnable artifact (shebang or +x). Stdio is inherited."],
|
|
1379
|
-
["preview <name> [--open] [--share]", "Serve HTML/React/static artifacts on an ephemeral local server with live-reload."],
|
|
1380
|
-
["share <name> [--open]", "Preview + open a public tunnel URL (cloudflared/localtunnel)."],
|
|
1381
|
-
["previews", "List running preview servers."],
|
|
1382
|
-
["stop <id> | --all", "Stop a preview server."],
|
|
1383
|
-
["remove | rm <name>", "Delete an artifact."],
|
|
1384
|
-
],
|
|
1385
|
-
examples: [
|
|
1386
|
-
"apx artifact create check_asana.sh --project 0",
|
|
1387
|
-
"apx artifact list",
|
|
1388
|
-
"apx artifact show check_asana.sh",
|
|
1389
|
-
"apx artifact run check_asana.sh",
|
|
1390
|
-
"apx artifact preview dashboard.html --open",
|
|
1391
|
-
"apx artifact share report.jsx",
|
|
1392
|
-
],
|
|
1393
|
-
}),
|
|
1394
|
-
"artifact preview": topic({
|
|
1395
|
-
title: "apx artifact preview",
|
|
1396
|
-
summary: "Serve an artifact on an ephemeral local web server and print an interactive link. HTML, single-file React (.jsx/.tsx), static dirs, and text are all rendered; the page auto-reloads when the file changes.",
|
|
1397
|
-
usage: ["apx artifact preview <name> [--open] [--share] [--no-watch] [--project <name|id|path>]"],
|
|
1398
|
-
options: [
|
|
1399
|
-
["--open", "Open the local URL in your default browser."],
|
|
1400
|
-
["--share", "Also create a public tunnel URL for quick sharing."],
|
|
1401
|
-
["--no-watch", "Disable live-reload on file change."],
|
|
1402
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1403
|
-
],
|
|
1404
|
-
examples: [
|
|
1405
|
-
"apx artifact preview dashboard.html --open",
|
|
1406
|
-
"apx artifact preview app.jsx --share",
|
|
1407
|
-
],
|
|
1408
|
-
}),
|
|
1409
|
-
"artifact share": topic({
|
|
1410
|
-
title: "apx artifact share",
|
|
1411
|
-
summary: "Preview an artifact and expose it through a secure public tunnel (cloudflared, falling back to localtunnel). Prints a temporary public URL anyone can open.",
|
|
1412
|
-
usage: ["apx artifact share <name> [--open] [--no-watch] [--project <name|id|path>]"],
|
|
1413
|
-
options: [
|
|
1414
|
-
["--open", "Open the public URL in your default browser."],
|
|
1415
|
-
["--no-watch", "Disable live-reload on file change."],
|
|
1416
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1417
|
-
],
|
|
1418
|
-
examples: ["apx artifact share report.jsx --open"],
|
|
1419
|
-
}),
|
|
1420
|
-
"artifact previews": topic({
|
|
1421
|
-
title: "apx artifact previews",
|
|
1422
|
-
summary: "List running artifact preview servers (id, name, kind, local + public URLs).",
|
|
1423
|
-
usage: ["apx artifact previews"],
|
|
1424
|
-
examples: ["apx artifact previews"],
|
|
1425
|
-
}),
|
|
1426
|
-
"artifact stop": topic({
|
|
1427
|
-
title: "apx artifact stop",
|
|
1428
|
-
summary: "Stop a running preview server (and its tunnel).",
|
|
1429
|
-
usage: ["apx artifact stop <id>", "apx artifact stop --all"],
|
|
1430
|
-
options: [["--all", "Stop every running preview."]],
|
|
1431
|
-
examples: ["apx artifact stop 3f9a1c2b", "apx artifact stop --all"],
|
|
1432
|
-
}),
|
|
1433
|
-
"artifact create": topic({
|
|
1434
|
-
title: "apx artifact create",
|
|
1435
|
-
summary: "Create a new managed artifact file.",
|
|
1436
|
-
usage: ["apx artifact create <name> [--content 'text'] [--project <name|id|path>]"],
|
|
1437
|
-
options: [
|
|
1438
|
-
["--content 'text'", "Initial file content (default: empty)."],
|
|
1439
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1440
|
-
],
|
|
1441
|
-
examples: ["apx artifact create check_asana.sh --project 0"],
|
|
1442
|
-
}),
|
|
1443
|
-
"artifact list": topic({
|
|
1444
|
-
title: "apx artifact list",
|
|
1445
|
-
summary: "List artifacts in the project storage.",
|
|
1446
|
-
usage: ["apx artifact list [--project <name|id|path>]"],
|
|
1447
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1448
|
-
examples: ["apx artifact list"],
|
|
1449
|
-
}),
|
|
1450
|
-
"artifact show": topic({
|
|
1451
|
-
title: "apx artifact show",
|
|
1452
|
-
summary: "Print artifact content.",
|
|
1453
|
-
usage: ["apx artifact show <name> [--project <name|id|path>]"],
|
|
1454
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1455
|
-
examples: ["apx artifact show check_asana.sh"],
|
|
1456
|
-
}),
|
|
1457
|
-
"artifact remove": topic({
|
|
1458
|
-
title: "apx artifact remove",
|
|
1459
|
-
summary: "Delete an artifact.",
|
|
1460
|
-
usage: ["apx artifact remove <name> [--project <name|id|path>]", "apx artifact rm <name>"],
|
|
1461
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1462
|
-
examples: ["apx artifact remove check_asana.sh"],
|
|
1463
|
-
}),
|
|
1464
|
-
command: topic({
|
|
1465
|
-
title: "apx command",
|
|
1466
|
-
summary: "List or show workflow commands from .apc/commands/.",
|
|
1467
|
-
usage: ["apx command [list] [--project <name|id|path>]", "apx command show <name> [--project <name|id|path>]"],
|
|
1468
|
-
commands: [
|
|
1469
|
-
["list | ls", "List workflow commands."],
|
|
1470
|
-
["show | get <name>", "Print one command file."],
|
|
1471
|
-
],
|
|
1472
|
-
options: [["--project <name|id|path>", "Pin command to a specific project; defaults to current APC project or default."]],
|
|
1473
|
-
examples: ["apx command list", "apx command show release"],
|
|
1474
|
-
}),
|
|
1475
|
-
commands: topic({
|
|
1476
|
-
title: "apx commands",
|
|
1477
|
-
summary: "Alias for apx command.",
|
|
1478
|
-
usage: ["apx commands [list]", "apx commands show <name>"],
|
|
1479
|
-
examples: ["apx commands list"],
|
|
1480
|
-
}),
|
|
1481
|
-
"command list": topic({
|
|
1482
|
-
title: "apx command list",
|
|
1483
|
-
summary: "List workflow commands in .apc/commands/.",
|
|
1484
|
-
usage: ["apx command list [--project <name|id|path>]", "apx command ls [--project <name|id|path>]"],
|
|
1485
|
-
options: [["--project <name|id|path>", "Pin command to a specific project; defaults to current APC project or default."]],
|
|
1486
|
-
examples: ["apx command list"],
|
|
1487
|
-
}),
|
|
1488
|
-
"command show": topic({
|
|
1489
|
-
title: "apx command show",
|
|
1490
|
-
summary: "Print one workflow command file.",
|
|
1491
|
-
usage: ["apx command show <name> [--project <name|id|path>]", "apx command get <name> [--project <name|id|path>]"],
|
|
1492
|
-
options: [["--project <name|id|path>", "Pin command to a specific project; defaults to current APC project or default."]],
|
|
1493
|
-
examples: ["apx command show release"],
|
|
1494
|
-
}),
|
|
1495
|
-
skills: topic({
|
|
1496
|
-
title: "apx skills",
|
|
1497
|
-
summary: "Install and inspect APX skill files for IDEs and agent tools.",
|
|
1498
|
-
usage: [
|
|
1499
|
-
"apx skills [add] [targets] [--global]",
|
|
1500
|
-
"apx skills sync",
|
|
1501
|
-
"apx skills list",
|
|
1502
|
-
"apx skills status",
|
|
1503
|
-
"apx skills index [--reset] [--force]",
|
|
1504
|
-
"apx skills inspect \"<prompt>\"",
|
|
1505
|
-
"apx skills inspector [status|enable|disable|set <key> <value>]",
|
|
1506
|
-
],
|
|
1507
|
-
commands: [
|
|
1508
|
-
["add [targets]", "Install APX skills into selected targets."],
|
|
1509
|
-
["sync | refresh", "Re-install every bundled skill to every global skill dir (idempotent)."],
|
|
1510
|
-
["list | ls", "List skills installed in this project's .apc/skills/."],
|
|
1511
|
-
["status", "Show which bundled skills are present in each global dir."],
|
|
1512
|
-
["index", "Build/refresh the local RAG vector index used by the Skill Inspector."],
|
|
1513
|
-
["inspect", "Show which skills the Inspector would surface for a given prompt (debug)."],
|
|
1514
|
-
["inspector", "Toggle and tune the Skill Inspector (per-turn skill RAG middleware)."],
|
|
1515
|
-
],
|
|
1516
|
-
examples: [
|
|
1517
|
-
"apx skills add claude-code cursor",
|
|
1518
|
-
"apx skills add --global",
|
|
1519
|
-
"apx skills sync # force-refresh after editing skills/ in the repo",
|
|
1520
|
-
"apx skills sync --verbose # show every (skill × target) line",
|
|
1521
|
-
],
|
|
1522
|
-
}),
|
|
1523
|
-
"skills add": topic({
|
|
1524
|
-
title: "apx skills add",
|
|
1525
|
-
summary: "Install APX skill files into local or global agent-tool targets.",
|
|
1526
|
-
usage: ["apx skills add [targets] [--global]"],
|
|
1527
|
-
options: [["--global", "Install to global user-level skill targets."]],
|
|
1528
|
-
examples: ["apx skills add claude-code cursor", "apx skills add --global"],
|
|
1529
|
-
}),
|
|
1530
|
-
"skills sync": topic({
|
|
1531
|
-
title: "apx skills sync",
|
|
1532
|
-
summary:
|
|
1533
|
-
"Refresh bundled APX skills (auto-discovered from skills/) into every global skill dir (.claude, .cursor, .codex, .agents). Pushes only `scope: public` skills by default; pass --include-optional / --include-internal to push the other tiers. Prunes copies of slugs no longer included (use --no-prune to keep them).",
|
|
1534
|
-
usage: [
|
|
1535
|
-
"apx skills sync [--verbose] [--include-optional] [--include-internal] [--no-prune]",
|
|
1536
|
-
"apx skills refresh",
|
|
1537
|
-
],
|
|
1538
|
-
options: [
|
|
1539
|
-
["--include-optional", "Also push `scope: optional` skills (apx-voice, …)."],
|
|
1540
|
-
["--include-internal", "Also push `scope: internal` APX-dev skills (apx-mcp-builder, …)."],
|
|
1541
|
-
["--no-prune", "Don't remove global copies of slugs that aren't included this run."],
|
|
1542
|
-
["--verbose", "List each (skill × dir) result, not just the rollup."],
|
|
1543
|
-
],
|
|
1544
|
-
examples: [
|
|
1545
|
-
"apx skills sync",
|
|
1546
|
-
"apx skills sync --include-optional",
|
|
1547
|
-
"apx skills sync --include-internal --verbose",
|
|
1548
|
-
],
|
|
1549
|
-
}),
|
|
1550
|
-
"skills list": topic({
|
|
1551
|
-
title: "apx skills list",
|
|
1552
|
-
summary: "List known APX skill targets.",
|
|
1553
|
-
usage: ["apx skills list", "apx skills ls"],
|
|
1554
|
-
examples: ["apx skills list"],
|
|
1555
|
-
}),
|
|
1556
|
-
"skills status": topic({
|
|
1557
|
-
title: "apx skills status",
|
|
1558
|
-
summary: "Show which APX skill targets are installed.",
|
|
1559
|
-
usage: ["apx skills status"],
|
|
1560
|
-
examples: ["apx skills status"],
|
|
1561
|
-
}),
|
|
1562
|
-
"skills index": topic({
|
|
1563
|
-
title: "apx skills index",
|
|
1564
|
-
summary:
|
|
1565
|
-
"Build or refresh the local vector index that powers the Skill Inspector. Embeds each skill's condensed description with the configured embeddings provider (defaults to local: ollama → tf fallback). Idempotent: skills with unchanged file+description are kept. Use --force to re-embed everything; --reset to also delete the on-disk index first.",
|
|
1566
|
-
usage: ["apx skills index [--reset] [--force]"],
|
|
1567
|
-
options: [
|
|
1568
|
-
["--force", "Re-embed every skill, ignoring cached vectors."],
|
|
1569
|
-
["--reset", "Delete the index file before rebuilding."],
|
|
1570
|
-
],
|
|
1571
|
-
examples: ["apx skills index", "apx skills index --force", "apx skills index --reset"],
|
|
1572
|
-
}),
|
|
1573
|
-
"skills inspect": topic({
|
|
1574
|
-
title: "apx skills inspect",
|
|
1575
|
-
summary:
|
|
1576
|
-
"Dry-run the Skill Inspector against a prompt. Shows top similarity scores, which skill (if any) would be loaded inline, which would be hinted, and the actual contextNote that would be injected into the next turn's system prompt. The model is NOT called.",
|
|
1577
|
-
usage: ["apx skills inspect \"<prompt text>\""],
|
|
1578
|
-
examples: [
|
|
1579
|
-
"apx skills inspect \"crear un video promocional\"",
|
|
1580
|
-
"apx skills inspect \"profile the slow endpoint\"",
|
|
1581
|
-
],
|
|
1582
|
-
}),
|
|
1583
|
-
"skills inspector": topic({
|
|
1584
|
-
title: "apx skills inspector",
|
|
1585
|
-
summary:
|
|
1586
|
-
"Toggle and tune the Skill Inspector (per-turn skill RAG). When ON: the static slug-dump in the system prompt is suppressed and a local RAG picks 0–N skills per turn — loading the body of high-confidence matches, hinting mid-confidence ones, injecting nothing below threshold. When OFF: legacy behaviour (full slug list + passive suggestion). Opt-in test feature.",
|
|
1587
|
-
usage: ["apx skills inspector [status|enable|disable|set <key> <value>]"],
|
|
1588
|
-
examples: [
|
|
1589
|
-
"apx skills inspector enable",
|
|
1590
|
-
"apx skills inspector disable",
|
|
1591
|
-
"apx skills inspector status",
|
|
1592
|
-
"apx skills inspector set load_threshold 0.5",
|
|
1593
|
-
"apx skills inspector set max_loaded 2",
|
|
1594
|
-
],
|
|
1595
|
-
}),
|
|
1596
|
-
plugins: topic({
|
|
1597
|
-
title: "apx plugins",
|
|
1598
|
-
summary: "Inspect loaded APX daemon plugins.",
|
|
1599
|
-
usage: ["apx plugins [list]", "apx plugins status <id>"],
|
|
1600
|
-
commands: [
|
|
1601
|
-
["list | ls", "Show loaded plugins and status."],
|
|
1602
|
-
["status <id>", "Print detailed status for one plugin."],
|
|
1603
|
-
],
|
|
1604
|
-
examples: ["apx plugins list", "apx plugins status telegram"],
|
|
1605
|
-
}),
|
|
1606
|
-
plugin: topic({
|
|
1607
|
-
title: "apx plugin",
|
|
1608
|
-
summary: "Alias for apx plugins.",
|
|
1609
|
-
usage: ["apx plugin [list]", "apx plugin status <id>"],
|
|
1610
|
-
examples: ["apx plugin list"],
|
|
1611
|
-
}),
|
|
1612
|
-
"plugins list": topic({
|
|
1613
|
-
title: "apx plugins list",
|
|
1614
|
-
summary: "Show loaded plugins and their status.",
|
|
1615
|
-
usage: ["apx plugins list", "apx plugins ls"],
|
|
1616
|
-
examples: ["apx plugins list"],
|
|
1617
|
-
}),
|
|
1618
|
-
"plugins status": topic({
|
|
1619
|
-
title: "apx plugins status",
|
|
1620
|
-
summary: "Show detailed status for one plugin.",
|
|
1621
|
-
usage: ["apx plugins status <id>"],
|
|
1622
|
-
examples: ["apx plugins status telegram"],
|
|
1623
|
-
}),
|
|
1624
|
-
|
|
1625
|
-
panel: topic({
|
|
1626
|
-
title: "apx panel",
|
|
1627
|
-
summary:
|
|
1628
|
-
"Reach the admin panel from another device on the same network. Not a tunnel — nothing leaves your LAN, and loopback stays the default.",
|
|
1629
|
-
usage: ["apx panel <status|share|unshare>"],
|
|
1630
|
-
commands: [
|
|
1631
|
-
["status", "Whether the panel is local only or shared, and on what address."],
|
|
1632
|
-
["share", "Bind a LAN address and print the URL to open on your phone."],
|
|
1633
|
-
["unshare", "Go back to local only."],
|
|
1634
|
-
],
|
|
1635
|
-
options: [["--host <ip>", "share: bind this address instead of the detected one."]],
|
|
1636
|
-
examples: ["apx panel status", "apx panel share", "apx panel unshare"],
|
|
1637
|
-
}),
|
|
1638
|
-
profile: topic({
|
|
1639
|
-
title: "apx profile",
|
|
1640
|
-
summary:
|
|
1641
|
-
"Install, activate and configure the super-agent's line of work. With no profile active, APX behaves exactly as it always has.",
|
|
1642
|
-
usage: ["apx profile <subcommand> [args] [--flags]"],
|
|
1643
|
-
commands: [
|
|
1644
|
-
["list | ls", "Show every available profile and which one is active."],
|
|
1645
|
-
["show | get <id>", "Details, settings and token cost of one profile."],
|
|
1646
|
-
["install | add <id|path>", "Validate and install a profile. Does NOT activate it."],
|
|
1647
|
-
["use | activate <id>", "Make a profile active and install its routines."],
|
|
1648
|
-
["off | deactivate", "Go back to vanilla. Disables its routines, deletes nothing."],
|
|
1649
|
-
["config", "Show or change the active profile's settings."],
|
|
1650
|
-
["doctor [<id>]", "What is missing for this profile to do its job."],
|
|
1651
|
-
["uninstall | remove <id>", "Remove a profile, keeping anything you edited."],
|
|
1652
|
-
],
|
|
1653
|
-
options: [
|
|
1654
|
-
["--preview", "show: also print the rendered prompt block."],
|
|
1655
|
-
["--set <key=value>", "config: set one setting. Repeatable."],
|
|
1656
|
-
["--interactive", "config: walk through every setting."],
|
|
1657
|
-
["--force", "install: overwrite. use: replace the active profile."],
|
|
1658
|
-
],
|
|
1659
|
-
examples: [
|
|
1660
|
-
"apx profile list",
|
|
1661
|
-
"apx profile install secretary",
|
|
1662
|
-
"apx profile use secretary",
|
|
1663
|
-
"apx profile config --set day_open_at=08:30 --set nudge_budget_per_day=3",
|
|
1664
|
-
"apx profile show secretary --preview",
|
|
1665
|
-
"apx profile off",
|
|
1666
|
-
],
|
|
1667
|
-
}),
|
|
1668
|
-
profiles: topic({
|
|
1669
|
-
title: "apx profiles",
|
|
1670
|
-
summary: "Alias for apx profile.",
|
|
1671
|
-
usage: ["apx profiles <subcommand>"],
|
|
1672
|
-
examples: ["apx profiles list"],
|
|
1673
|
-
}),
|
|
1674
|
-
task: topic({
|
|
1675
|
-
title: "apx task",
|
|
1676
|
-
summary: "Per-project TODO list backed by the daemon (/projects/:pid/tasks).",
|
|
1677
|
-
usage: ["apx task <subcommand> [args] [--flags]"],
|
|
1678
|
-
commands: [
|
|
1679
|
-
["add | new | create \"<title>\"", "Create a task. Tags repeatable."],
|
|
1680
|
-
["list | ls", "List tasks (default state=open)."],
|
|
1681
|
-
["show | get <id>", "Print one task as JSON."],
|
|
1682
|
-
["done | complete <id>", "Mark task done."],
|
|
1683
|
-
["drop | archive <id>", "Drop / archive a task."],
|
|
1684
|
-
["reopen <id>", "Reopen a done or dropped task."],
|
|
1685
|
-
["patch | edit <id>", "Edit fields on an existing task."],
|
|
1686
|
-
],
|
|
1687
|
-
options: [
|
|
1688
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1689
|
-
["--all", "list: fold every registered project into one list, each row labelled."],
|
|
1690
|
-
["--status <s>", "list: workflow sub-status — pending | running | in_review | blocked."],
|
|
1691
|
-
["--updated-since <ISO>", "list: only what moved since that moment."],
|
|
1692
|
-
],
|
|
1693
|
-
examples: [
|
|
1694
|
-
"apx task add \"Ship release notes\" --tag release --due 2026-06-01",
|
|
1695
|
-
"apx task list --state open --tag release",
|
|
1696
|
-
"apx task list --all --status blocked",
|
|
1697
|
-
"apx task done t_abc123",
|
|
1698
|
-
],
|
|
1699
|
-
}),
|
|
1700
|
-
tasks: topic({
|
|
1701
|
-
title: "apx tasks",
|
|
1702
|
-
summary: "Alias for apx task.",
|
|
1703
|
-
usage: ["apx tasks <subcommand> [args] [--flags]"],
|
|
1704
|
-
examples: ["apx tasks list"],
|
|
1705
|
-
}),
|
|
1706
|
-
org: topic({
|
|
1707
|
-
title: "apx org",
|
|
1708
|
-
summary: "Organization structure (areas + roles) for a project — the org chart companies/enterprises use to group agents.",
|
|
1709
|
-
usage: ["apx org <show|area|role> [args] [--flags]"],
|
|
1710
|
-
commands: [
|
|
1711
|
-
["show | list", "Print the project's areas and roles."],
|
|
1712
|
-
["area add \"<name>\"", "Create an area. --slug, --goal optional."],
|
|
1713
|
-
["area rm <slug>", "Remove an area (its roles are detached, not deleted)."],
|
|
1714
|
-
["role add \"<name>\"", "Create a role. --slug, --area, --desc optional."],
|
|
1715
|
-
["role rm <slug>", "Remove a role."],
|
|
1716
|
-
],
|
|
1717
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1718
|
-
examples: [
|
|
1719
|
-
"apx org area add \"Engineering\" --goal \"Build the product\"",
|
|
1720
|
-
"apx org role add \"Tech Lead\" --area engineering",
|
|
1721
|
-
"apx org show",
|
|
1722
|
-
],
|
|
1723
|
-
}),
|
|
1724
|
-
"task add": topic({
|
|
1725
|
-
title: "apx task add",
|
|
1726
|
-
summary: "Create a task on a project's TODO list.",
|
|
1727
|
-
usage: ["apx task add \"<title>\" [--project X] [--body Y] [--tag t]... [--due 2026-05-30] [--agent A] [--source S]"],
|
|
1728
|
-
options: [
|
|
1729
|
-
["--body <text>", "Optional task body / description."],
|
|
1730
|
-
["--tag <name>", "Tag the task. Repeatable for multiple tags."],
|
|
1731
|
-
["--due <date>", "Due date (any ISO-ish string the daemon accepts)."],
|
|
1732
|
-
["--agent <slug>", "Pre-assign the task to an agent."],
|
|
1733
|
-
["--source <name>", "Origin label (default: cli)."],
|
|
1734
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1735
|
-
],
|
|
1736
|
-
examples: [
|
|
1737
|
-
"apx task add \"Review PR #42\" --agent reviewer --tag review",
|
|
1738
|
-
"apx task add \"Release notes\" --tag release --tag docs --due 2026-06-01",
|
|
1739
|
-
],
|
|
1740
|
-
}),
|
|
1741
|
-
"task list": topic({
|
|
1742
|
-
title: "apx task list",
|
|
1743
|
-
summary: "List tasks in the current project (defaults to open).",
|
|
1744
|
-
usage: ["apx task list [--state open|done|dropped|all] [--tag X] [--agent Y] [--due-before ISO] [--limit N] [--project P]"],
|
|
1745
|
-
options: [
|
|
1746
|
-
["--state <s>", "open (default) | done | dropped | all."],
|
|
1747
|
-
["--tag <name>", "Filter by tag."],
|
|
1748
|
-
["--agent <slug>", "Filter by assigned agent."],
|
|
1749
|
-
["--due-before <iso>", "Only tasks with due date before this ISO date."],
|
|
1750
|
-
["--limit N", "Cap the number of rows."],
|
|
1751
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1752
|
-
],
|
|
1753
|
-
examples: [
|
|
1754
|
-
"apx task list",
|
|
1755
|
-
"apx task list --state all --limit 50",
|
|
1756
|
-
"apx task list --agent reviewer --tag review",
|
|
1757
|
-
],
|
|
1758
|
-
}),
|
|
1759
|
-
"task show": topic({
|
|
1760
|
-
title: "apx task show",
|
|
1761
|
-
summary: "Print one task as JSON.",
|
|
1762
|
-
usage: ["apx task show <id> [--project <name|id|path>]"],
|
|
1763
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1764
|
-
examples: ["apx task show t_abc123"],
|
|
1765
|
-
}),
|
|
1766
|
-
"task done": topic({
|
|
1767
|
-
title: "apx task done",
|
|
1768
|
-
summary: "Mark a task as done.",
|
|
1769
|
-
usage: ["apx task done <id> [--by <name>] [--project <name|id|path>]"],
|
|
1770
|
-
options: [
|
|
1771
|
-
["--by <name>", "Who marked it done (free-form label)."],
|
|
1772
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1773
|
-
],
|
|
1774
|
-
examples: ["apx task done t_abc123", "apx task done t_abc123 --by reviewer"],
|
|
1775
|
-
}),
|
|
1776
|
-
"task drop": topic({
|
|
1777
|
-
title: "apx task drop",
|
|
1778
|
-
summary: "Drop / archive a task (kept in history, hidden from default list).",
|
|
1779
|
-
usage: ["apx task drop <id> [--by <name>] [--project <name|id|path>]"],
|
|
1780
|
-
options: [
|
|
1781
|
-
["--by <name>", "Who dropped it (free-form label)."],
|
|
1782
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1783
|
-
],
|
|
1784
|
-
examples: ["apx task drop t_abc123"],
|
|
1785
|
-
}),
|
|
1786
|
-
"task reopen": topic({
|
|
1787
|
-
title: "apx task reopen",
|
|
1788
|
-
summary: "Reopen a previously done or dropped task.",
|
|
1789
|
-
usage: ["apx task reopen <id> [--project <name|id|path>]"],
|
|
1790
|
-
options: [["--project <name|id|path>", "Pin command to a specific project."]],
|
|
1791
|
-
examples: ["apx task reopen t_abc123"],
|
|
1792
|
-
}),
|
|
1793
|
-
"task patch": topic({
|
|
1794
|
-
title: "apx task patch",
|
|
1795
|
-
summary: "Edit fields on an existing task (title/body/due/agent/tags).",
|
|
1796
|
-
usage: ["apx task patch <id> [--title T] [--body B] [--due D] [--agent A] [--tag t]... [--project P]"],
|
|
1797
|
-
options: [
|
|
1798
|
-
["--title <text>", "Replace the title."],
|
|
1799
|
-
["--body <text>", "Replace the body."],
|
|
1800
|
-
["--due <date>", "Replace the due date (empty string clears)."],
|
|
1801
|
-
["--agent <slug>", "Reassign (empty string clears)."],
|
|
1802
|
-
["--tag <name>", "Replace tags. Repeatable; passing none clears."],
|
|
1803
|
-
["--project <name|id|path>", "Pin command to a specific project."],
|
|
1804
|
-
],
|
|
1805
|
-
examples: [
|
|
1806
|
-
"apx task patch t_abc123 --title \"New title\"",
|
|
1807
|
-
"apx task patch t_abc123 --tag review --tag urgent",
|
|
1808
|
-
],
|
|
1809
|
-
}),
|
|
1810
|
-
|
|
1811
|
-
// ── Pair (companion-device pairing) ───────────────────────────────────────
|
|
1812
|
-
pair: topic({
|
|
1813
|
-
title: "apx pair",
|
|
1814
|
-
summary: "Pair a companion device (Deck app, etc.) with the local APX daemon via QR code.",
|
|
1815
|
-
usage: [
|
|
1816
|
-
"apx pair [label] [--label <name>]",
|
|
1817
|
-
"apx pair web",
|
|
1818
|
-
"apx pair list | ls",
|
|
1819
|
-
"apx pair revoke <id>",
|
|
1820
|
-
],
|
|
1821
|
-
commands: [
|
|
1822
|
-
["(no arg) | deck | device", "QR for the APX Deck app (JSON payload). Poll until the device confirms."],
|
|
1823
|
-
["web", "QR + link for a browser on the LAN — scan with the phone camera or share the link."],
|
|
1824
|
-
["list | ls", "List currently-paired clients."],
|
|
1825
|
-
["revoke | rm <id>", "Revoke a paired client token."],
|
|
1826
|
-
],
|
|
1827
|
-
options: [["--label <name>", "Friendly label stored with the pairing."]],
|
|
1828
|
-
examples: ["apx pair", "apx pair web", "apx pair list", "apx pair revoke d_abc123"],
|
|
1829
|
-
notes: [
|
|
1830
|
-
"`apx pair` (deck) QR carries a JSON payload only the Deck app understands.",
|
|
1831
|
-
"`apx pair web` QR carries a URL a browser/phone-camera can open — see `apx help pair web`.",
|
|
1832
|
-
"Both share one engine: a per-client token, listable with `apx pair list`, revocable with `apx pair revoke`.",
|
|
1833
|
-
],
|
|
1834
|
-
}),
|
|
1835
|
-
"pair web": topic({
|
|
1836
|
-
title: "apx pair web",
|
|
1837
|
-
summary: "Pair a browser on the LAN. Mints a one-shot code (90s) and renders a QR + a shareable link.",
|
|
1838
|
-
usage: ["apx pair web"],
|
|
1839
|
-
commands: [
|
|
1840
|
-
["scan QR", "Point the phone's native camera at the QR → it opens the web already linked."],
|
|
1841
|
-
["share link", "Copy the printed `link:` (…/#pair=<code>) into Telegram/chat; tapping it pairs the browser."],
|
|
1842
|
-
["paste code", "Type the printed `code:` into the web pairing screen (manual fallback)."],
|
|
1843
|
-
],
|
|
1844
|
-
examples: ["apx pair web"],
|
|
1845
|
-
notes: [
|
|
1846
|
-
"The QR/link encode a URL, so they only work for browsers — for the APX Deck app use `apx pair`.",
|
|
1847
|
-
"The daemon must be reachable from the device: bind LAN (host=0.0.0.0) or use a tunnel (Tailscale/Cloudflare).",
|
|
1848
|
-
"The code expires in 90s and is single-use; re-run to get a fresh one.",
|
|
1849
|
-
"Each paired browser shows up in Settings › Dispositivos (kind=web) and is revocable with `apx pair revoke <id>`.",
|
|
1850
|
-
],
|
|
1851
|
-
}),
|
|
1852
|
-
"pair new": topic({
|
|
1853
|
-
title: "apx pair new",
|
|
1854
|
-
summary: "Issue a pairing nonce, render the QR, and poll the daemon until the device confirms.",
|
|
1855
|
-
usage: ["apx pair [label] [--label <name>]", "apx pair new", "apx pair device"],
|
|
1856
|
-
options: [["--label <name>", "Friendly label stored with the pairing."]],
|
|
1857
|
-
examples: ["apx pair", "apx pair \"phone\"", "apx pair new --label tablet"],
|
|
1858
|
-
}),
|
|
1859
|
-
"pair list": topic({
|
|
1860
|
-
title: "apx pair list",
|
|
1861
|
-
summary: "List currently-paired companion clients.",
|
|
1862
|
-
usage: ["apx pair list", "apx pair ls"],
|
|
1863
|
-
examples: ["apx pair list"],
|
|
1864
|
-
}),
|
|
1865
|
-
"pair revoke": topic({
|
|
1866
|
-
title: "apx pair revoke",
|
|
1867
|
-
summary: "Revoke a paired client token by id.",
|
|
1868
|
-
usage: ["apx pair revoke <id>", "apx pair rm <id>"],
|
|
1869
|
-
examples: ["apx pair revoke d_abc123"],
|
|
1870
|
-
}),
|
|
1871
|
-
|
|
1872
|
-
// ── Desktop (floating voice window) ───────────────────────────────────────
|
|
1873
|
-
desktop: topic({
|
|
1874
|
-
title: "apx desktop",
|
|
1875
|
-
summary: "Launch, stop, or inspect the floating Electron voice desktop window.",
|
|
1876
|
-
usage: ["apx desktop <start|stop|status|install|uninstall> [--flags]"],
|
|
1877
|
-
commands: [
|
|
1878
|
-
["start", "Start the desktop window (or report if already running)."],
|
|
1879
|
-
["stop", "Stop the desktop window."],
|
|
1880
|
-
["status", "Print desktop process state, PID, and autostart status."],
|
|
1881
|
-
["install", "Activate autostart at user login (per-user, no sudo)."],
|
|
1882
|
-
["uninstall", "Deactivate autostart at user login."],
|
|
1883
|
-
],
|
|
1884
|
-
options: [["--debug, -d", "Verbose start-up logs (start only)."]],
|
|
1885
|
-
examples: [
|
|
1886
|
-
"apx desktop start", "apx desktop status", "apx desktop stop",
|
|
1887
|
-
"apx desktop install", "apx desktop uninstall",
|
|
1888
|
-
],
|
|
1889
|
-
}),
|
|
1890
|
-
"desktop start": topic({
|
|
1891
|
-
title: "apx desktop start",
|
|
1892
|
-
summary: "Start the floating Electron voice desktop window. No-op if it is already running.",
|
|
1893
|
-
usage: ["apx desktop start [--debug]"],
|
|
1894
|
-
options: [["--debug, -d", "Verbose start-up logs."]],
|
|
1895
|
-
examples: ["apx desktop start", "apx desktop start --debug"],
|
|
1896
|
-
}),
|
|
1897
|
-
"desktop stop": topic({
|
|
1898
|
-
title: "apx desktop stop",
|
|
1899
|
-
summary: "Stop the floating Electron voice desktop window.",
|
|
1900
|
-
usage: ["apx desktop stop"],
|
|
1901
|
-
examples: ["apx desktop stop"],
|
|
1902
|
-
}),
|
|
1903
|
-
"desktop status": topic({
|
|
1904
|
-
title: "apx desktop status",
|
|
1905
|
-
summary: "Print desktop process state and PID (read from ~/.apx/desktop.pid).",
|
|
1906
|
-
usage: ["apx desktop status"],
|
|
1907
|
-
examples: ["apx desktop status"],
|
|
1908
|
-
}),
|
|
1909
|
-
overlay: topic({
|
|
1910
|
-
title: "apx overlay (deprecated)",
|
|
1911
|
-
summary: "Renamed to `apx desktop`. The old name still works and forwards.",
|
|
1912
|
-
usage: ["apx desktop <start|stop|status>"],
|
|
1913
|
-
examples: ["apx desktop start"],
|
|
1914
|
-
}),
|
|
1915
|
-
|
|
1916
|
-
// ── Voice (TTS / mic round-trip) ──────────────────────────────────────────
|
|
1917
|
-
voice: topic({
|
|
1918
|
-
title: "apx voice",
|
|
1919
|
-
summary: "Speak text through the daemon TTS, run a mic→reply round-trip, or list providers.",
|
|
1920
|
-
usage: [
|
|
1921
|
-
"apx voice say \"<text>\" [--provider <id>] [--voice <name>] [--no-play]",
|
|
1922
|
-
"apx voice listen [--seconds N] [--provider <id>] [--no-play]",
|
|
1923
|
-
"apx voice providers",
|
|
1924
|
-
],
|
|
1925
|
-
commands: [
|
|
1926
|
-
["say \"<text>\"", "Synthesize and play text via /tts/say."],
|
|
1927
|
-
["listen", "Record from mic, send to /voice/turn, play the reply."],
|
|
1928
|
-
["providers | list", "List configured TTS / STT providers."],
|
|
1929
|
-
],
|
|
1930
|
-
options: [
|
|
1931
|
-
["--provider <id>", "Override configured provider for this call."],
|
|
1932
|
-
["--voice <name>", "Override voice id (say only)."],
|
|
1933
|
-
["--seconds N", "Record for N seconds (listen). 0 = stop on silence."],
|
|
1934
|
-
["--no-play", "Do not play audio after synthesis / reply."],
|
|
1935
|
-
],
|
|
1936
|
-
examples: [
|
|
1937
|
-
"apx voice say \"hola, ¿cómo estás?\"",
|
|
1938
|
-
"apx voice listen --seconds 5",
|
|
1939
|
-
"apx voice providers",
|
|
1940
|
-
],
|
|
1941
|
-
}),
|
|
1942
|
-
"voice say": topic({
|
|
1943
|
-
title: "apx voice say",
|
|
1944
|
-
summary: "Synthesize text through the daemon TTS pipeline (/tts/say) and (by default) play it.",
|
|
1945
|
-
usage: ["apx voice say \"<text>\" [--provider <id>] [--voice <name>] [--no-play]"],
|
|
1946
|
-
options: [
|
|
1947
|
-
["--provider <id>", "Override configured TTS provider."],
|
|
1948
|
-
["--voice <name>", "Override voice id."],
|
|
1949
|
-
["--no-play", "Synthesize but do not play the audio file."],
|
|
1950
|
-
],
|
|
1951
|
-
examples: [
|
|
1952
|
-
"apx voice say \"hola\"",
|
|
1953
|
-
"apx voice say \"prueba\" --provider piper --voice es_AR",
|
|
1954
|
-
"apx voice say \"silenciado\" --no-play",
|
|
1955
|
-
],
|
|
1956
|
-
}),
|
|
1957
|
-
"voice listen": topic({
|
|
1958
|
-
title: "apx voice listen",
|
|
1959
|
-
summary: "Record from the local mic, send to /voice/turn (STT + super-agent + TTS), and play the reply.",
|
|
1960
|
-
usage: ["apx voice listen [--seconds N] [--provider <id>] [--no-play]"],
|
|
1961
|
-
options: [
|
|
1962
|
-
["--seconds N", "Record N seconds. 0 (default) = stop on silence."],
|
|
1963
|
-
["--provider <id>", "Override STT provider."],
|
|
1964
|
-
["--no-play", "Do not play the reply audio."],
|
|
1965
|
-
],
|
|
1966
|
-
examples: ["apx voice listen", "apx voice listen --seconds 5"],
|
|
1967
|
-
}),
|
|
1968
|
-
"voice providers": topic({
|
|
1969
|
-
title: "apx voice providers",
|
|
1970
|
-
summary: "List configured TTS / STT providers known to the daemon.",
|
|
1971
|
-
usage: ["apx voice providers", "apx voice list"],
|
|
1972
|
-
examples: ["apx voice providers"],
|
|
1973
|
-
}),
|
|
1974
|
-
|
|
1975
|
-
// ── Unified daemon log ────────────────────────────────────────────────────
|
|
1976
|
-
log: topic({
|
|
1977
|
-
title: "apx log",
|
|
1978
|
-
summary: "Read the unified daemon log (~/.apx/logs/apx.log). Covers every module: telegram, whisper, super-agent, tools, desktop.",
|
|
1979
|
-
usage: ["apx log [--tail N] [-f|--follow] [--errors]"],
|
|
1980
|
-
options: [
|
|
1981
|
-
["--tail N", "Print the last N lines (default 100)."],
|
|
1982
|
-
["-f, --follow", "Keep tailing as new lines are appended."],
|
|
1983
|
-
["--errors", "Show only [ERROR] lines (also includes structured errors.jsonl)."],
|
|
1984
|
-
],
|
|
1985
|
-
examples: ["apx log", "apx log --tail 50", "apx log -f", "apx log --errors --tail 20"],
|
|
1986
|
-
}),
|
|
1987
|
-
logs: topic({
|
|
1988
|
-
title: "apx logs",
|
|
1989
|
-
summary: "Alias for apx log.",
|
|
1990
|
-
usage: ["apx logs [--tail N] [-f|--follow] [--errors]"],
|
|
1991
|
-
examples: ["apx logs --tail 50"],
|
|
1992
|
-
}),
|
|
1993
|
-
|
|
1994
|
-
// ── Model router ──────────────────────────────────────────────────────────
|
|
1995
|
-
model: topic({
|
|
1996
|
-
title: "apx model",
|
|
1997
|
-
summary: "Inspect or edit the super-agent model fallback router (~/.apx/config.json super_agent.model_fallback).",
|
|
1998
|
-
usage: ["apx model <subcommand> [args]"],
|
|
1999
|
-
commands: [
|
|
2000
|
-
["status | show", "Print fallback order, configured keys, per-provider probe results, and active model."],
|
|
2001
|
-
["order <p1> <p2> …", "Set the fallback order (e.g. ollama openrouter groq)."],
|
|
2002
|
-
["key <provider> <api-key>", "Save an API key under engines.<provider>.api_key."],
|
|
2003
|
-
["set <provider> <model-id>", "Pin a specific model id for one provider in the fallback map."],
|
|
2004
|
-
["test", "Resolve which model the router would pick right now."],
|
|
2005
|
-
["enable", "Enable the fallback router."],
|
|
2006
|
-
["disable", "Disable the fallback router (primary only)."],
|
|
2007
|
-
],
|
|
2008
|
-
examples: [
|
|
2009
|
-
"apx model status",
|
|
2010
|
-
"apx model order ollama openrouter groq",
|
|
2011
|
-
"apx model key groq sk-xxxx",
|
|
2012
|
-
"apx model set openrouter openrouter/anthropic/claude-3.7-sonnet",
|
|
2013
|
-
"apx model test",
|
|
2014
|
-
],
|
|
2015
|
-
}),
|
|
2016
|
-
"model status": topic({
|
|
2017
|
-
title: "apx model status",
|
|
2018
|
-
summary: "Show provider health + active model picked by the fallback router.",
|
|
2019
|
-
usage: ["apx model status", "apx model show"],
|
|
2020
|
-
examples: ["apx model status"],
|
|
2021
|
-
}),
|
|
2022
|
-
"model order": topic({
|
|
2023
|
-
title: "apx model order",
|
|
2024
|
-
summary: "Set the fallback order across providers.",
|
|
2025
|
-
usage: ["apx model order <p1> <p2> …"],
|
|
2026
|
-
examples: ["apx model order ollama openrouter groq"],
|
|
2027
|
-
}),
|
|
2028
|
-
"model key": topic({
|
|
2029
|
-
title: "apx model key",
|
|
2030
|
-
summary: "Save an API key for one provider in ~/.apx/config.json (engines.<provider>.api_key).",
|
|
2031
|
-
usage: ["apx model key <groq|openrouter|openai|…> <api-key>"],
|
|
2032
|
-
examples: ["apx model key groq sk-xxxx"],
|
|
2033
|
-
}),
|
|
2034
|
-
"model set": topic({
|
|
2035
|
-
title: "apx model set",
|
|
2036
|
-
summary: "Pin a specific model id for one provider in the fallback map.",
|
|
2037
|
-
usage: ["apx model set <provider> <provider:model-id>"],
|
|
2038
|
-
examples: ["apx model set openrouter openrouter/anthropic/claude-3.7-sonnet"],
|
|
2039
|
-
}),
|
|
2040
|
-
"model test": topic({
|
|
2041
|
-
title: "apx model test",
|
|
2042
|
-
summary: "Resolve which model the router would pick right now.",
|
|
2043
|
-
usage: ["apx model test"],
|
|
2044
|
-
examples: ["apx model test"],
|
|
2045
|
-
}),
|
|
2046
|
-
"model enable": topic({
|
|
2047
|
-
title: "apx model enable",
|
|
2048
|
-
summary: "Enable the fallback router.",
|
|
2049
|
-
usage: ["apx model enable"],
|
|
2050
|
-
examples: ["apx model enable"],
|
|
2051
|
-
}),
|
|
2052
|
-
"model disable": topic({
|
|
2053
|
-
title: "apx model disable",
|
|
2054
|
-
summary: "Disable the fallback router (primary model only).",
|
|
2055
|
-
usage: ["apx model disable"],
|
|
2056
|
-
examples: ["apx model disable"],
|
|
2057
|
-
}),
|
|
2058
|
-
|
|
2059
|
-
"daemon reload": topic({
|
|
2060
|
-
title: "apx daemon reload",
|
|
2061
|
-
summary: "Reload ~/.apx/config.json into the daemon without restarting.",
|
|
2062
|
-
usage: ["apx daemon reload"],
|
|
2063
|
-
examples: ["apx daemon reload"],
|
|
2064
|
-
}),
|
|
2065
|
-
}));
|
|
2066
|
-
|
|
2067
|
-
const HELP_ALIASES = new Map(Object.entries({
|
|
2068
|
-
"project ls": "project list",
|
|
2069
|
-
"project rm": "project remove",
|
|
2070
|
-
"agent ls": "agent list",
|
|
2071
|
-
"agent show": "agent get",
|
|
2072
|
-
"agent vault ls": "agent vault list",
|
|
2073
|
-
"session ls": "session list",
|
|
2074
|
-
"session show": "session get",
|
|
2075
|
-
"session search": "session find",
|
|
2076
|
-
"sessions ls": "sessions list",
|
|
2077
|
-
"mcp ls": "mcp list",
|
|
2078
|
-
"mcp rm": "mcp remove",
|
|
2079
|
-
"conv list": "conversations list",
|
|
2080
|
-
"conv ls": "conversations list",
|
|
2081
|
-
"conv get": "conversations get",
|
|
2082
|
-
"conv show": "conversations get",
|
|
2083
|
-
"env list": "env detect",
|
|
2084
|
-
"routines list": "routine list",
|
|
2085
|
-
"routines ls": "routine list",
|
|
2086
|
-
"routines add": "routine add",
|
|
2087
|
-
"routines new": "routine add",
|
|
2088
|
-
"routine new": "routine add",
|
|
2089
|
-
"routines get": "routine get",
|
|
2090
|
-
"routines show": "routine get",
|
|
2091
|
-
"routine show": "routine get",
|
|
2092
|
-
"routines history": "routine history",
|
|
2093
|
-
"routines hist": "routine history",
|
|
2094
|
-
"routine hist": "routine history",
|
|
2095
|
-
"routines run": "routine run",
|
|
2096
|
-
"routines enable": "routine enable",
|
|
2097
|
-
"routines disable": "routine disable",
|
|
2098
|
-
"routines remove": "routine remove",
|
|
2099
|
-
"routines rm": "routine remove",
|
|
2100
|
-
"routine rm": "routine remove",
|
|
2101
|
-
"commands list": "command list",
|
|
2102
|
-
"commands ls": "command list",
|
|
2103
|
-
"command ls": "command list",
|
|
2104
|
-
"commands show": "command show",
|
|
2105
|
-
"commands get": "command show",
|
|
2106
|
-
"command get": "command show",
|
|
2107
|
-
"skills ls": "skills list",
|
|
2108
|
-
"plugin list": "plugins list",
|
|
2109
|
-
"plugin ls": "plugins list",
|
|
2110
|
-
"plugin status": "plugins status",
|
|
2111
|
-
"telegram channels": "telegram channel",
|
|
2112
|
-
"telegram channels list": "telegram channel list",
|
|
2113
|
-
"telegram channels ls": "telegram channel list",
|
|
2114
|
-
"telegram channels add": "telegram channel add",
|
|
2115
|
-
"telegram channels show": "telegram channel show",
|
|
2116
|
-
"telegram channels set": "telegram channel set",
|
|
2117
|
-
"telegram channels unset": "telegram channel unset",
|
|
2118
|
-
"telegram channels remove": "telegram channel remove",
|
|
2119
|
-
"telegram channels rm": "telegram channel remove",
|
|
2120
|
-
"telegram channel ls": "telegram channel list",
|
|
2121
|
-
"telegram channel get": "telegram channel show",
|
|
2122
|
-
"telegram channel rm": "telegram channel remove",
|
|
2123
|
-
"project config get": "project config show",
|
|
2124
|
-
"project config rm": "project config unset",
|
|
2125
|
-
|
|
2126
|
-
// tasks (alias of task)
|
|
2127
|
-
"tasks list": "task list",
|
|
2128
|
-
"tasks ls": "task list",
|
|
2129
|
-
"task ls": "task list",
|
|
2130
|
-
"tasks add": "task add",
|
|
2131
|
-
"tasks new": "task add",
|
|
2132
|
-
"tasks create": "task add",
|
|
2133
|
-
"task new": "task add",
|
|
2134
|
-
"task create": "task add",
|
|
2135
|
-
"tasks show": "task show",
|
|
2136
|
-
"tasks get": "task show",
|
|
2137
|
-
"task get": "task show",
|
|
2138
|
-
"tasks done": "task done",
|
|
2139
|
-
"tasks complete": "task done",
|
|
2140
|
-
"task complete": "task done",
|
|
2141
|
-
"tasks drop": "task drop",
|
|
2142
|
-
"tasks archive": "task drop",
|
|
2143
|
-
"task archive": "task drop",
|
|
2144
|
-
"tasks reopen": "task reopen",
|
|
2145
|
-
"tasks patch": "task patch",
|
|
2146
|
-
"tasks edit": "task patch",
|
|
2147
|
-
"task edit": "task patch",
|
|
2148
|
-
|
|
2149
|
-
// pair
|
|
2150
|
-
"pair device": "pair new",
|
|
2151
|
-
"pair ls": "pair list",
|
|
2152
|
-
"pair rm": "pair revoke",
|
|
2153
|
-
|
|
2154
|
-
// voice
|
|
2155
|
-
"voice list": "voice providers",
|
|
2156
|
-
|
|
2157
|
-
// model
|
|
2158
|
-
"model show": "model status",
|
|
2159
|
-
"model set-order": "model order",
|
|
2160
|
-
"model set-key": "model key",
|
|
2161
|
-
}));
|
|
2162
|
-
|
|
2163
|
-
function buildHelp(version) {
|
|
2164
|
-
return [
|
|
2165
|
-
"",
|
|
2166
|
-
` ${H.B}${H.WH}apx${H.R} ${H.DI}Agent Project Context v${version}${H.R}`,
|
|
2167
|
-
` ${H.DI}Docs: https://agentprojectcontext.com${H.R}`,
|
|
2168
|
-
"",
|
|
2169
|
-
` ${H.DI}Usage:${H.R} ${H.WH}apx${H.R} ${H.CY}<command>${H.R} ${H.DI}[subcommand] [args] [--flags]${H.R}`,
|
|
2170
|
-
"",
|
|
2171
|
-
|
|
2172
|
-
hSec("Bootstrap"),
|
|
2173
|
-
hCmd("apx init [path]", 36, "--name \"<name>\" initialize a new APC project"),
|
|
2174
|
-
hCmd("apx setup", 36, "interactive wizard: provider → model → channels → daemon (alias: install)"),
|
|
2175
|
-
hCmd("apx status", 36, "full system status: daemon, super-agent, engines, telegram, projects"),
|
|
2176
|
-
hCmd("apx update", 36, "check for updates and upgrade (alias: upgrade)"),
|
|
2177
|
-
|
|
2178
|
-
hSec("Projects"),
|
|
2179
|
-
hCmd("apx project add [path]", 36, "register a project with the daemon"),
|
|
2180
|
-
hCmd("apx project list", 36, ""),
|
|
2181
|
-
hCmd("apx project remove <id>", 36, ""),
|
|
2182
|
-
hCmd("apx project rebuild [id]", 36, "rebuild project index from filesystem"),
|
|
2183
|
-
|
|
2184
|
-
hSec("Agents"),
|
|
2185
|
-
hCmd("apx agent add <slug>", 36, "--role R --model M --skills a,b --language es-AR --description D"),
|
|
2186
|
-
hCmd("apx agent list", 36, ""),
|
|
2187
|
-
hCmd("apx agent get <slug>", 36, ""),
|
|
2188
|
-
hCmd("apx agent remove <slug>", 36, "delete a project agent (file + runtime memory)"),
|
|
2189
|
-
hCmd("apx agent import", 36, ""),
|
|
2190
|
-
hCmd("apx agent vault list", 36, ""),
|
|
2191
|
-
hCmd("apx agent vault add", 36, ""),
|
|
2192
|
-
|
|
2193
|
-
hSec("APX Profile"),
|
|
2194
|
-
hCmd("apx identity show", 36, "print current APX identity (name, owner, personality)"),
|
|
2195
|
-
hCmd("apx identity set <k> <v>", 36, "set identity field"),
|
|
2196
|
-
hCmd("apx identity wizard", 36, "interactive identity setup"),
|
|
2197
|
-
|
|
2198
|
-
hSec("Config"),
|
|
2199
|
-
hCmd("apx config show", 36, "--effective --only-overrides"),
|
|
2200
|
-
hCmd("apx config set|unset", 36, "<key> [value] edit .apc/config.json (JSON-aware)"),
|
|
2201
|
-
hCmd("apx model status", 36, "provider health + active model (fallback router)"),
|
|
2202
|
-
hCmd("apx model order", 36, "<p1> <p2> … fallback order e.g. ollama openrouter groq"),
|
|
2203
|
-
hCmd("apx model key", 36, "<groq|openrouter> <api-key> → ~/.apx/config.json"),
|
|
2204
|
-
hCmd("apx model test", 36, "resolve which model the router picks now"),
|
|
2205
|
-
hCmd("apx permission show", 36, "show APX tool permission mode"),
|
|
2206
|
-
hCmd("apx permission set <mode>", 36, "mode: total | automatico | permiso"),
|
|
2207
|
-
|
|
2208
|
-
hSec("Memory"),
|
|
2209
|
-
hCmd("apx memory <slug>", 36, "print memory.md"),
|
|
2210
|
-
hCmd("apx memory <slug> --append", 36, "\"<note>\" append under '## Recent context'"),
|
|
2211
|
-
hCmd("apx memory <slug> --replace",36, "replace from stdin"),
|
|
2212
|
-
|
|
2213
|
-
hSec("Sessions"),
|
|
2214
|
-
hCmd("apx session new <slug>", 36, "--title \"T\" [--task-ref REF] [--body -|\"text\"]"),
|
|
2215
|
-
hCmd("apx session list [slug]", 36, "--last N"),
|
|
2216
|
-
hCmd("apx session get <id>", 36, "--body"),
|
|
2217
|
-
hCmd("apx session update <id>", 36, "--status S --result R --title T"),
|
|
2218
|
-
hCmd("apx session close <id>", 36, "--result \"text\""),
|
|
2219
|
-
hCmd("apx session check", 36, "anti-collision: exit 1 if active session"),
|
|
2220
|
-
hCmd("apx session close-stale", 36, "auto-close sessions older than 1h"),
|
|
2221
|
-
hCmd("apx session resume <id>", 36, "--summary --full (APC + Claude Code transcript)"),
|
|
2222
|
-
hCmd("apx session compact <slug>", 36, "--conversation <id> collapse history into summary"),
|
|
2223
|
-
hCmd("apx session find <text>", 36, "find sessions by title (cross-engine) --deep --engine X"),
|
|
2224
|
-
hCmd("apx session summary <id>", 36, "LLM summary of any session by id"),
|
|
2225
|
-
hCmd("apx session ask <id> \"<q>\"", 36, "ask about a session --max-chunks N"),
|
|
2226
|
-
hCmd("apx sessions list", 36, "list AI engine sessions --engine claude|codex|apx --project P | --dir D"),
|
|
2227
|
-
|
|
2228
|
-
hSec("MCPs"),
|
|
2229
|
-
hCmd("apx mcp list", 36, ""),
|
|
2230
|
-
hCmd("apx mcp add <name>", 36, "--command <cmd> [args] --env KEY=VAL"),
|
|
2231
|
-
hCmd("apx mcp remove <name>", 36, ""),
|
|
2232
|
-
hCmd("apx mcp enable/disable", 36, "<name>"),
|
|
2233
|
-
hCmd("apx mcp run <name> <tool>", 36, "[<json-args>] call a tool through the daemon"),
|
|
2234
|
-
hCmd("apx mcp tools <name>", 36, "[<tool>] list tools, or one tool's schema + run example"),
|
|
2235
|
-
hCmd("apx mcp logs <name>", 36, "spawn/init log + stderr tail"),
|
|
2236
|
-
hCmd("apx mcp check", 36, "audit multi-source merge"),
|
|
2237
|
-
|
|
2238
|
-
hSec("Obsidian"),
|
|
2239
|
-
hCmd("apx obsidian set <path>", 36, "connect a vault --global --project P --mcp --memory"),
|
|
2240
|
-
hCmd("apx obsidian status", 36, "show configured vault + toggles"),
|
|
2241
|
-
hCmd("apx obsidian sync", 36, "mirror APX memory into the vault (no duplicates)"),
|
|
2242
|
-
hCmd("apx obsidian remove", 36, "disconnect the vault"),
|
|
2243
|
-
|
|
2244
|
-
hSec("Daemon Service"),
|
|
2245
|
-
hCmd("apx daemon start", 36, ""),
|
|
2246
|
-
hCmd("apx daemon reload", 36, "reload ~/.apx/config.json without restart"),
|
|
2247
|
-
hCmd("apx daemon stop", 36, ""),
|
|
2248
|
-
hCmd("apx daemon status", 36, ""),
|
|
2249
|
-
hCmd("apx daemon logs", 36, "--tail N legacy daemon stdout log"),
|
|
2250
|
-
hCmd("apx log", 36, "unified log (all modules) -f follow --tail N --errors only"),
|
|
2251
|
-
|
|
2252
|
-
hSec("Telegram"),
|
|
2253
|
-
hCmd("apx telegram send \"text\"", 36, "--chat <id>"),
|
|
2254
|
-
hCmd("apx telegram status", 36, ""),
|
|
2255
|
-
hCmd("apx telegram setup", 36, ""),
|
|
2256
|
-
|
|
2257
|
-
hSec("Messages"),
|
|
2258
|
-
hCmd("apx messages tail", 36, "--agent <slug> --channel <ch> -n 50 --global"),
|
|
2259
|
-
hCmd("apx messages chat", 36, "--channel telegram -n 50"),
|
|
2260
|
-
hCmd("apx messages search \"q\"", 36, ""),
|
|
2261
|
-
|
|
2262
|
-
hSec("LLM / Code"),
|
|
2263
|
-
hCmd("apx code", 36, "APX terminal coding assistant"),
|
|
2264
|
-
hCmd("apx exec \"prompt\"", 36, "super-agent (default) --code coding channel -a <agent> for APC slug"),
|
|
2265
|
-
hCmd("apx chat <agent>", 36, "interactive agent REPL --conversation <id>"),
|
|
2266
|
-
hCmd("apx search \"query\"", 36, "web search (ddg | brave | browser) --mode <m> -n N"),
|
|
2267
|
-
hCmd("apx conversations list", 36, "stored exec/chat conversations for <agent>"),
|
|
2268
|
-
hCmd("apx conversations get", 36, "<agent> <id>"),
|
|
2269
|
-
hCmd("apx acp", 36, "serve the super-agent over the Agent Client Protocol (stdio, for IDEs)"),
|
|
2270
|
-
|
|
2271
|
-
hSec("Runtimes"),
|
|
2272
|
-
hCmd("apx run <agent>", 36, "--runtime <id> \"prompt\" --timeout <s>"),
|
|
2273
|
-
` ${H.DI}runtimes: claude-code | codex | opencode | aider | cursor-agent | gemini-cli | qwen-code | antigravity${H.R}`,
|
|
2274
|
-
hCmd("apx env detect", 36, "which agent CLIs are installed"),
|
|
2275
|
-
|
|
2276
|
-
hSec("Agent-to-Agent"),
|
|
2277
|
-
hCmd("apx send <from> <to> \"msg\"",36, "--deliver log A2A message; --deliver runs target engine"),
|
|
2278
|
-
hCmd("apx connections <agent>", 36, "mental map: who/how/when this agent talked"),
|
|
2279
|
-
|
|
2280
|
-
hSec("Routines & Pipeline"),
|
|
2281
|
-
hCmd("apx routine list", 36, "list routines + next/last run"),
|
|
2282
|
-
hCmd("apx routine add <name>", 36, "--kind K --schedule S [--spec '{...}']"),
|
|
2283
|
-
` ${H.DI}kinds: heartbeat | exec_agent | super_agent | telegram | shell${H.R}`,
|
|
2284
|
-
` ${H.DI}flags: --permission-mode total|automatico|permiso --allowed-tools a,b${H.R}`,
|
|
2285
|
-
` ${H.DI}pipeline: --pre-commands 'cmd1,cmd2' --post-commands 'cmd'${H.R}`,
|
|
2286
|
-
` ${H.DI} --skip-prompt-on signal|pre_failure|pre_success|always|never${H.R}`,
|
|
2287
|
-
` ${H.DI}schedule: every:60s | every:5m | every:1h | once:<iso>${H.R}`,
|
|
2288
|
-
hCmd("apx routine get <name>", 36, ""),
|
|
2289
|
-
hCmd("apx routine history <name>", 36, "show routine execution history"),
|
|
2290
|
-
hCmd("apx routine run <name>", 36, "manual trigger (ignores schedule)"),
|
|
2291
|
-
hCmd("apx routine enable <name>", 36, ""),
|
|
2292
|
-
hCmd("apx routine disable <name>", 36, ""),
|
|
2293
|
-
hCmd("apx routine remove <name>", 36, ""),
|
|
2294
|
-
|
|
2295
|
-
hSec("Tasks"),
|
|
2296
|
-
hCmd("apx task add \"<title>\"", 36, "--tag t --due 2026-06-01 --agent A --body \"...\""),
|
|
2297
|
-
hCmd("apx task list", 36, "--state open|done|dropped|all --tag X --agent Y --limit N"),
|
|
2298
|
-
hCmd("apx task show <id>", 36, "print one task as JSON"),
|
|
2299
|
-
hCmd("apx task done <id>", 36, "--by <name> mark task done"),
|
|
2300
|
-
hCmd("apx task drop <id>", 36, "drop / archive a task"),
|
|
2301
|
-
hCmd("apx task reopen <id>", 36, "reopen a done/dropped task"),
|
|
2302
|
-
hCmd("apx task patch <id>", 36, "--title T --body B --due D --agent A --tag t"),
|
|
2303
|
-
|
|
2304
|
-
hSec("Artifacts"),
|
|
2305
|
-
hCmd("apx artifact create <name>", 36, "create managed file in project storage [--content '...'] [--project 0]"),
|
|
2306
|
-
hCmd("apx artifact list", 36, "list artifacts"),
|
|
2307
|
-
hCmd("apx artifact show <name>", 36, "print artifact content"),
|
|
2308
|
-
hCmd("apx artifact preview <name>",36, "serve HTML/React on a local URL w/ live-reload [--open] [--share]"),
|
|
2309
|
-
hCmd("apx artifact share <name>", 36, "preview + public tunnel URL"),
|
|
2310
|
-
hCmd("apx artifact previews", 36, "list running previews (stop with: apx artifact stop <id>)"),
|
|
2311
|
-
hCmd("apx artifact remove <name>", 36, ""),
|
|
2312
|
-
|
|
2313
|
-
hSec("Commands & Skills"),
|
|
2314
|
-
hCmd("apx command list", 36, "list workflow commands (.apc/commands/)"),
|
|
2315
|
-
hCmd("apx command show <name>", 36, "print command content"),
|
|
2316
|
-
hCmd("apx skills add [targets]", 36, "install skill into IDE rule files (claude-code cursor windsurf copilot trae)"),
|
|
2317
|
-
hCmd("apx skills add --global", 36, "install to ~/.claude/skills/ etc."),
|
|
2318
|
-
hCmd("apx skills list", 36, ""),
|
|
2319
|
-
hCmd("apx skills status", 36, "show which IDE targets are installed"),
|
|
2320
|
-
|
|
2321
|
-
hSec("Plugins"),
|
|
2322
|
-
hCmd("apx plugins list", 36, "show loaded plugins and their status"),
|
|
2323
|
-
hCmd("apx plugins status <id>", 36, "detailed status of one plugin (e.g. telegram)"),
|
|
2324
|
-
|
|
2325
|
-
hSec("Voice & Overlay"),
|
|
2326
|
-
hCmd("apx voice say \"text\"", 36, "TTS via daemon --provider <id> --voice <name> --no-play"),
|
|
2327
|
-
hCmd("apx voice listen", 36, "mic → /voice/turn → reply --seconds N --no-play"),
|
|
2328
|
-
hCmd("apx voice providers", 36, "list configured TTS / STT providers"),
|
|
2329
|
-
hCmd("apx desktop start", 36, "launch floating voice desktop window (Electron)"),
|
|
2330
|
-
hCmd("apx desktop stop", 36, ""),
|
|
2331
|
-
hCmd("apx desktop status", 36, "show desktop process + autostart state"),
|
|
2332
|
-
hCmd("apx desktop install", 36, "auto-launch the window at login (mac/win/linux)"),
|
|
2333
|
-
hCmd("apx desktop uninstall", 36, "remove the auto-launch entry"),
|
|
2334
|
-
|
|
2335
|
-
hSec("Pair (companion devices)"),
|
|
2336
|
-
hCmd("apx pair [label]", 36, "QR pairing for Deck app / companion clients"),
|
|
2337
|
-
hCmd("apx pair web", 36, "QR + link to pair a browser on the LAN"),
|
|
2338
|
-
hCmd("apx pair list", 36, "list paired clients"),
|
|
2339
|
-
hCmd("apx pair revoke <id>", 36, "revoke a paired client token"),
|
|
2340
|
-
|
|
2341
|
-
hSec("Flags"),
|
|
2342
|
-
hFlag("--project <name|id|path>", 36, "pin commands to a specific project"),
|
|
2343
|
-
hFlag("--help", 36, "show this help"),
|
|
2344
|
-
hFlag("--version", 36, "print version"),
|
|
2345
|
-
"",
|
|
2346
|
-
].join("\n") + "\n";
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
function buildTopicHelp(t) {
|
|
2350
|
-
const lines = [
|
|
2351
|
-
"",
|
|
2352
|
-
` ${H.B}${H.WH}${t.title}${H.R}`,
|
|
2353
|
-
` ${H.DI}${t.summary}${H.R}`,
|
|
2354
|
-
"",
|
|
2355
|
-
];
|
|
2356
|
-
if (t.usage.length) {
|
|
2357
|
-
lines.push(hSec("Usage"));
|
|
2358
|
-
for (const u of t.usage) lines.push(` ${H.WH}${u}${H.R}`);
|
|
2359
|
-
}
|
|
2360
|
-
if (t.commands.length) {
|
|
2361
|
-
lines.push(hSec("Commands"));
|
|
2362
|
-
for (const [name, desc] of t.commands) lines.push(hSub(name, 28, desc));
|
|
2363
|
-
}
|
|
2364
|
-
if (t.options.length) {
|
|
2365
|
-
lines.push(hSec("Options"));
|
|
2366
|
-
for (const [flag, desc] of t.options) lines.push(hFlag(flag, 28, desc));
|
|
2367
|
-
}
|
|
2368
|
-
if (t.examples.length) {
|
|
2369
|
-
lines.push(hSec("Examples"));
|
|
2370
|
-
for (const ex of t.examples) lines.push(` ${H.WH}${ex}${H.R}`);
|
|
2371
|
-
}
|
|
2372
|
-
if (t.notes?.length) {
|
|
2373
|
-
lines.push(hSec("Notes"));
|
|
2374
|
-
for (const n of t.notes) lines.push(` ${H.DI}${n}${H.R}`);
|
|
2375
|
-
}
|
|
2376
|
-
lines.push(
|
|
2377
|
-
hSec("Global Flags"),
|
|
2378
|
-
hFlag("--help", 28, "show this help"),
|
|
2379
|
-
hFlag("--version", 28, "print version"),
|
|
2380
|
-
"",
|
|
2381
|
-
);
|
|
2382
|
-
return lines.join("\n") + "\n";
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
function normalizeHelpKey(key) {
|
|
2386
|
-
return HELP_ALIASES.get(key) || key;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
function findHelpTopic(argv) {
|
|
2390
|
-
const hasHelpFlag = argv.some((a) => a === "--help" || a === "-h");
|
|
2391
|
-
const hasHelpCommand = argv[0] === "help" || argv[1] === "help";
|
|
2392
|
-
const wantsHelp = hasHelpFlag || hasHelpCommand;
|
|
2393
|
-
if (!wantsHelp) return null;
|
|
2394
|
-
|
|
2395
|
-
const withoutFlags = argv.filter((a) => a !== "--help" && a !== "-h");
|
|
2396
|
-
const tokens = withoutFlags[0] === "help"
|
|
2397
|
-
? withoutFlags.slice(1)
|
|
2398
|
-
: withoutFlags[1] === "help"
|
|
2399
|
-
? [withoutFlags[0], ...withoutFlags.slice(2)]
|
|
2400
|
-
: withoutFlags;
|
|
2401
|
-
if (tokens.length === 0) return { global: true };
|
|
2402
|
-
|
|
2403
|
-
const projectSubcommands = new Set(["add", "list", "ls", "remove", "rm", "rebuild", "config"]);
|
|
2404
|
-
if (tokens[0] === "project" && tokens.length >= 3 && !projectSubcommands.has(tokens[1])) {
|
|
2405
|
-
for (let n = tokens.length - 2; n > 0; n--) {
|
|
2406
|
-
const key = normalizeHelpKey(tokens.slice(2, 2 + n).join(" "));
|
|
2407
|
-
if (HELP_TOPICS.has(key)) return { topic: HELP_TOPICS.get(key) };
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
for (let n = tokens.length; n > 0; n--) {
|
|
2412
|
-
const key = normalizeHelpKey(tokens.slice(0, n).join(" "));
|
|
2413
|
-
if (HELP_TOPICS.has(key)) return { topic: HELP_TOPICS.get(key) };
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
return { global: true };
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
21
|
// Flags that never take a value. Without this the parser would greedily
|
|
2420
22
|
// swallow the following positional (e.g. `apx exec --code "hi"` would set
|
|
2421
23
|
// flags.code = "hi" and drop the prompt). Boolean flags always resolve to true.
|
|
@@ -2498,463 +100,18 @@ if (argv[0] === "--version" || argv[0] === "-v") {
|
|
|
2498
100
|
process.exit(0);
|
|
2499
101
|
}
|
|
2500
102
|
|
|
103
|
+
// Route a command to its module.
|
|
104
|
+
//
|
|
105
|
+
// This was a 457-line switch with 141 hand-written `sub === "..."` comparisons
|
|
106
|
+
// and 165 eagerly-imported symbols at the top of the file — so `apx status`
|
|
107
|
+
// loaded the Electron desktop wiring, the MCP runner and the session scanner
|
|
108
|
+
// before it could print anything. Each command now owns its routing in
|
|
109
|
+
// routes/<name>.js and is loaded on demand.
|
|
2501
110
|
async function dispatch(cmd, rest) {
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
case "project": {
|
|
2508
|
-
const sub = rest[0];
|
|
2509
|
-
const a = parseArgs(rest.slice(1));
|
|
2510
|
-
const PROJECT_SUBCOMMANDS = new Set([
|
|
2511
|
-
"add", "list", "ls", "remove", "rm", "rebuild", "config",
|
|
2512
|
-
]);
|
|
2513
|
-
if (sub === "add") await cmdProjectAdd(a);
|
|
2514
|
-
else if (sub === "list" || sub === "ls") await cmdProjectList();
|
|
2515
|
-
else if (sub === "remove" || sub === "rm") await cmdProjectRemove(a);
|
|
2516
|
-
else if (sub === "rebuild") await cmdProjectRebuild(a);
|
|
2517
|
-
else if (sub === "config") {
|
|
2518
|
-
// apx project config <show|set|unset|edit> <project> ...
|
|
2519
|
-
const csub = rest[1];
|
|
2520
|
-
const ca = parseArgs(rest.slice(2));
|
|
2521
|
-
if (csub === "show" || csub === "get") await cmdProjectConfigShow(ca);
|
|
2522
|
-
else if (csub === "set") await cmdProjectConfigSet(ca);
|
|
2523
|
-
else if (csub === "unset" || csub === "rm") await cmdProjectConfigUnset(ca);
|
|
2524
|
-
else if (csub === "edit") await cmdProjectConfigEdit(ca);
|
|
2525
|
-
else die(`unknown project config subcommand: ${csub || "(none)"} — try: show, set, unset, edit`);
|
|
2526
|
-
}
|
|
2527
|
-
else if (sub && !PROJECT_SUBCOMMANDS.has(sub)) {
|
|
2528
|
-
// Sugar: `apx project <name|id> <subcommand...>` runs the inner
|
|
2529
|
-
// subcommand with --project=<name|id> appended.
|
|
2530
|
-
// apx project testing mcp list → apx mcp list --project testing
|
|
2531
|
-
// apx project 2 routine list → apx routine list --project 2
|
|
2532
|
-
const innerCmd = rest[1];
|
|
2533
|
-
if (!innerCmd) die(`apx project ${sub}: missing subcommand`);
|
|
2534
|
-
const innerRest = [...rest.slice(2), "--project", sub];
|
|
2535
|
-
await dispatch(innerCmd, innerRest);
|
|
2536
|
-
}
|
|
2537
|
-
else die(`unknown project subcommand: ${sub || "(none)"}`);
|
|
2538
|
-
break;
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
case "agent": {
|
|
2542
|
-
const sub = rest[0];
|
|
2543
|
-
const a = parseArgs(rest.slice(1));
|
|
2544
|
-
if (sub === "add") await cmdAgentAdd(a);
|
|
2545
|
-
else if (sub === "list" || sub === "ls") cmdAgentList();
|
|
2546
|
-
else if (sub === "get" || sub === "show") cmdAgentGet(a);
|
|
2547
|
-
else if (sub === "remove" || sub === "rm" || sub === "delete") await cmdAgentRemove(a);
|
|
2548
|
-
else if (sub === "import") await cmdAgentImport(a);
|
|
2549
|
-
else if (sub === "vault") {
|
|
2550
|
-
const vsub = a._[0];
|
|
2551
|
-
const va = { ...a, _: a._.slice(1) };
|
|
2552
|
-
if (vsub === "list" || vsub === "ls") cmdAgentVaultList(va);
|
|
2553
|
-
else if (vsub === "add") await cmdAgentVaultAdd(va);
|
|
2554
|
-
else if (vsub === "rm" || vsub === "remove") cmdAgentVaultRm(va);
|
|
2555
|
-
else if (vsub === "restore") cmdAgentVaultRestore(va);
|
|
2556
|
-
else die(`unknown vault subcommand: ${vsub || "(none)"} — try: list, add, rm, restore`);
|
|
2557
|
-
}
|
|
2558
|
-
else die(`unknown agent subcommand: ${sub || "(none)"}`);
|
|
2559
|
-
break;
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
case "memory":
|
|
2563
|
-
cmdMemory(parseArgs(rest));
|
|
2564
|
-
break;
|
|
2565
|
-
|
|
2566
|
-
case "session": {
|
|
2567
|
-
const sub = rest[0];
|
|
2568
|
-
const a = parseArgs(rest.slice(1));
|
|
2569
|
-
if (sub === "new") cmdSessionNew(a);
|
|
2570
|
-
else if (sub === "list" || sub === "ls") cmdSessionList(a);
|
|
2571
|
-
else if (sub === "get" || sub === "show") cmdSessionGet(a);
|
|
2572
|
-
else if (sub === "update") cmdSessionUpdate(a);
|
|
2573
|
-
else if (sub === "close") cmdSessionClose(a);
|
|
2574
|
-
else if (sub === "check") cmdSessionCheck();
|
|
2575
|
-
else if (sub === "close-stale") cmdSessionCloseStale();
|
|
2576
|
-
else if (sub === "resume") await cmdSessionResume(a);
|
|
2577
|
-
else if (sub === "compact") await cmdSessionCompact(a);
|
|
2578
|
-
else if (sub === "find" || sub === "search") cmdSessionFind(a);
|
|
2579
|
-
else if (sub === "summary") await cmdSessionSummary(a);
|
|
2580
|
-
else if (sub === "ask") await cmdSessionAsk(a);
|
|
2581
|
-
else die(`unknown session subcommand: ${sub || "(none)"}`);
|
|
2582
|
-
break;
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
|
-
case "sessions": {
|
|
2586
|
-
const sub = rest[0];
|
|
2587
|
-
const isListSub = sub === "list" || sub === "ls";
|
|
2588
|
-
const a = parseArgs(isListSub ? rest.slice(1) : rest);
|
|
2589
|
-
if (!sub || isListSub || sub.startsWith("--")) cmdSessionsList(a);
|
|
2590
|
-
else die(`unknown sessions subcommand: ${sub} — try: list`);
|
|
2591
|
-
break;
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
case "mcp": {
|
|
2595
|
-
const sub = rest[0];
|
|
2596
|
-
const a = parseArgs(rest.slice(1));
|
|
2597
|
-
if (sub === "list" || sub === "ls") await cmdMcpList(a);
|
|
2598
|
-
else if (sub === "add") await cmdMcpAdd(a);
|
|
2599
|
-
else if (sub === "remove" || sub === "rm") await cmdMcpRemove(a);
|
|
2600
|
-
else if (sub === "enable") await cmdMcpEnable(a);
|
|
2601
|
-
else if (sub === "disable") await cmdMcpDisable(a);
|
|
2602
|
-
else if (sub === "run") await cmdMcpRun(a);
|
|
2603
|
-
else if (sub === "tools") await cmdMcpTools(a);
|
|
2604
|
-
else if (sub === "logs") await cmdMcpLogs(a);
|
|
2605
|
-
else if (sub === "check") await cmdMcpCheck(a);
|
|
2606
|
-
else die(`unknown mcp subcommand: ${sub || "(none)"}`);
|
|
2607
|
-
break;
|
|
2608
|
-
}
|
|
2609
|
-
|
|
2610
|
-
case "obsidian": {
|
|
2611
|
-
const sub = rest[0];
|
|
2612
|
-
const a = parseArgs(rest.slice(1));
|
|
2613
|
-
if (!sub || sub === "status" || sub === "show") await cmdObsidianStatus(a);
|
|
2614
|
-
else if (sub === "set" || sub === "connect" || sub === "add") await cmdObsidianSet(a);
|
|
2615
|
-
else if (sub === "sync") await cmdObsidianSync(a);
|
|
2616
|
-
else if (sub === "remove" || sub === "rm" || sub === "disconnect") await cmdObsidianRemove(a);
|
|
2617
|
-
else die(`unknown obsidian subcommand: ${sub}\nUsage: apx obsidian <set|status|sync|remove> [--global|--project <p>]`);
|
|
2618
|
-
break;
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
case "daemon": {
|
|
2622
|
-
const sub = rest[0];
|
|
2623
|
-
const a = parseArgs(rest.slice(1));
|
|
2624
|
-
if (sub === "start") await cmdDaemonStart(a);
|
|
2625
|
-
else if (sub === "stop") await cmdDaemonStop(a);
|
|
2626
|
-
else if (sub === "restart") await cmdDaemonRestart(a);
|
|
2627
|
-
else if (sub === "reload") await cmdDaemonReload(a);
|
|
2628
|
-
else if (sub === "status") await cmdDaemonStatus(a);
|
|
2629
|
-
else if (sub === "logs") cmdDaemonLogs(a);
|
|
2630
|
-
else die(`unknown daemon subcommand: ${sub || "(none)"}`);
|
|
2631
|
-
break;
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
|
-
case "pair": {
|
|
2635
|
-
const sub = rest[0];
|
|
2636
|
-
const a = parseArgs(rest.slice(1));
|
|
2637
|
-
if (!sub || sub === "new" || sub === "device" || sub === "deck") await cmdPair(a);
|
|
2638
|
-
else if (sub === "web") await cmdPairWeb(a);
|
|
2639
|
-
else if (sub === "list" || sub === "ls") await cmdPairList();
|
|
2640
|
-
else if (sub === "revoke" || sub === "rm") await cmdPairRevoke(a);
|
|
2641
|
-
else die(`unknown pair subcommand: ${sub} — try: (no arg)/deck, web, list, revoke <id>`);
|
|
2642
|
-
break;
|
|
2643
|
-
}
|
|
2644
|
-
|
|
2645
|
-
case "telegram": {
|
|
2646
|
-
const sub = rest[0];
|
|
2647
|
-
const a = parseArgs(rest.slice(1));
|
|
2648
|
-
if (sub === "send") await cmdTelegramSend(a);
|
|
2649
|
-
else if (sub === "status") await cmdTelegramStatus();
|
|
2650
|
-
else if (sub === "start") await cmdTelegramStart();
|
|
2651
|
-
else if (sub === "stop") await cmdTelegramStop();
|
|
2652
|
-
else if (sub === "setup") cmdTelegramSetup();
|
|
2653
|
-
else if (sub === "channel" || sub === "channels") {
|
|
2654
|
-
const csub = rest[1];
|
|
2655
|
-
const ca = parseArgs(rest.slice(2));
|
|
2656
|
-
if (csub === "add") await cmdTelegramChannelAdd(ca);
|
|
2657
|
-
else if (csub === "list" || csub === "ls" || !csub) await cmdTelegramChannelList();
|
|
2658
|
-
else if (csub === "show" || csub === "get") await cmdTelegramChannelShow(ca);
|
|
2659
|
-
else if (csub === "set") await cmdTelegramChannelSet(ca);
|
|
2660
|
-
else if (csub === "unset") await cmdTelegramChannelUnset(ca);
|
|
2661
|
-
else if (csub === "remove" || csub === "rm") await cmdTelegramChannelRemove(ca);
|
|
2662
|
-
else die(`unknown telegram channel subcommand: ${csub} — try: add, list, show, set, unset, remove`);
|
|
2663
|
-
}
|
|
2664
|
-
else if (sub === "contacts" || sub === "contact") {
|
|
2665
|
-
const csub = rest[1];
|
|
2666
|
-
const ca = parseArgs(rest.slice(2));
|
|
2667
|
-
if (csub === "rm" || csub === "remove") await cmdTelegramContactRemove(ca);
|
|
2668
|
-
else if (!csub || csub === "list" || csub === "ls") await cmdTelegramContacts();
|
|
2669
|
-
else die(`unknown telegram contacts subcommand: ${csub} — try: list, rm`);
|
|
2670
|
-
}
|
|
2671
|
-
else if (sub === "role") await cmdTelegramRole(parseArgs(rest.slice(1)));
|
|
2672
|
-
else if (sub === "roles") await cmdTelegramRoles(parseArgs(rest.slice(1)));
|
|
2673
|
-
else if (sub === "owner") await cmdTelegramOwner(parseArgs(rest.slice(1)));
|
|
2674
|
-
else die(`unknown telegram subcommand: ${sub || "(none)"}`);
|
|
2675
|
-
break;
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
|
-
case "messages": {
|
|
2679
|
-
const sub = rest[0];
|
|
2680
|
-
const a = parseArgs(rest.slice(1));
|
|
2681
|
-
if (sub === "tail") await cmdMessagesTail(a);
|
|
2682
|
-
else if (sub === "chat") await cmdMessagesChat(a);
|
|
2683
|
-
else if (sub === "search") await cmdMessagesSearch(a);
|
|
2684
|
-
else die(`unknown messages subcommand: ${sub || "(none)"}`);
|
|
2685
|
-
break;
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
case "log":
|
|
2689
|
-
case "logs": {
|
|
2690
|
-
// `apx log` is the unified daemon log (everything: telegram, whisper,
|
|
2691
|
-
// super-agent, tools, desktop). For just the legacy stdout sink,
|
|
2692
|
-
// use `apx daemon logs`. `apx log -f` follows; `--errors` filters.
|
|
2693
|
-
await cmdLog(parseArgs(rest));
|
|
2694
|
-
break;
|
|
2695
|
-
}
|
|
2696
|
-
|
|
2697
|
-
case "exec":
|
|
2698
|
-
await cmdExec(parseArgs(rest));
|
|
2699
|
-
break;
|
|
2700
|
-
|
|
2701
|
-
case "acp":
|
|
2702
|
-
// ACP server owns stdio until the client closes the pipe.
|
|
2703
|
-
await cmdAcp(parseArgs(rest));
|
|
2704
|
-
return;
|
|
2705
|
-
|
|
2706
|
-
case "search":
|
|
2707
|
-
await cmdSearch(parseArgs(rest));
|
|
2708
|
-
break;
|
|
2709
|
-
|
|
2710
|
-
case "chat":
|
|
2711
|
-
await cmdChat(parseArgs(rest));
|
|
2712
|
-
break;
|
|
2713
|
-
|
|
2714
|
-
case "code":
|
|
2715
|
-
await cmdCode(parseArgs(rest));
|
|
2716
|
-
break;
|
|
2717
|
-
|
|
2718
|
-
case "conversations":
|
|
2719
|
-
case "conv": {
|
|
2720
|
-
const sub = rest[0];
|
|
2721
|
-
const a = parseArgs(rest.slice(1));
|
|
2722
|
-
if (sub === "list" || sub === "ls") await cmdConversationsList(a);
|
|
2723
|
-
else if (sub === "get" || sub === "show") await cmdConversationsGet(a);
|
|
2724
|
-
else die(`unknown conversations subcommand: ${sub || "(none)"}`);
|
|
2725
|
-
break;
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
case "run":
|
|
2729
|
-
await cmdRun(parseArgs(rest));
|
|
2730
|
-
break;
|
|
2731
|
-
|
|
2732
|
-
case "env": {
|
|
2733
|
-
const sub = rest[0];
|
|
2734
|
-
if (sub === "detect" || sub === "list") await cmdEnvDetect();
|
|
2735
|
-
else die(`unknown env subcommand: ${sub || "(none)"}`);
|
|
2736
|
-
break;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
case "send":
|
|
2740
|
-
await cmdSend(parseArgs(rest));
|
|
2741
|
-
break;
|
|
2742
|
-
|
|
2743
|
-
case "connections":
|
|
2744
|
-
await cmdConnections(parseArgs(rest));
|
|
2745
|
-
break;
|
|
2746
|
-
|
|
2747
|
-
case "config": {
|
|
2748
|
-
const sub = rest[0];
|
|
2749
|
-
const a = parseArgs(rest.slice(1));
|
|
2750
|
-
if (sub === "show" || sub === "ls" || sub === undefined) await cmdConfigShow(a);
|
|
2751
|
-
else if (sub === "set") await cmdConfigSet(a);
|
|
2752
|
-
else if (sub === "unset" || sub === "rm") await cmdConfigUnset(a);
|
|
2753
|
-
else die(`unknown config subcommand: ${sub}`);
|
|
2754
|
-
break;
|
|
2755
|
-
}
|
|
2756
|
-
|
|
2757
|
-
case "permission": {
|
|
2758
|
-
await cmdPermission(parseArgs(rest));
|
|
2759
|
-
break;
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
case "model": {
|
|
2763
|
-
await cmdModel(parseArgs(rest));
|
|
2764
|
-
break;
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
case "plugins":
|
|
2768
|
-
case "plugin": {
|
|
2769
|
-
const sub = rest[0];
|
|
2770
|
-
const a = parseArgs(rest.slice(1));
|
|
2771
|
-
if (sub === "list" || sub === "ls" || sub === undefined) await cmdPluginsList();
|
|
2772
|
-
else if (sub === "status") await cmdPluginStatus(a);
|
|
2773
|
-
else die(`unknown plugins subcommand: ${sub}`);
|
|
2774
|
-
break;
|
|
2775
|
-
}
|
|
2776
|
-
|
|
2777
|
-
case "routine":
|
|
2778
|
-
case "routines": {
|
|
2779
|
-
const sub = rest[0];
|
|
2780
|
-
const a = parseArgs(rest.slice(1));
|
|
2781
|
-
if (sub === "list" || sub === "ls" || sub === undefined) await cmdRoutineList(a);
|
|
2782
|
-
else if (sub === "get" || sub === "show") await cmdRoutineGet(a);
|
|
2783
|
-
else if (sub === "add" || sub === "new") await cmdRoutineAdd(a);
|
|
2784
|
-
else if (sub === "remove" || sub === "rm") await cmdRoutineRemove(a);
|
|
2785
|
-
else if (sub === "enable") await cmdRoutineEnable(a);
|
|
2786
|
-
else if (sub === "disable") await cmdRoutineDisable(a);
|
|
2787
|
-
else if (sub === "run") await cmdRoutineRun(a);
|
|
2788
|
-
else if (sub === "history" || sub === "hist") await cmdRoutineHistory(a);
|
|
2789
|
-
else if (sub === "memory" || sub === "mem") await cmdRoutineMemory(a);
|
|
2790
|
-
else die(`unknown routine subcommand: ${sub}`);
|
|
2791
|
-
break;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
case "artifact":
|
|
2795
|
-
case "artifacts": {
|
|
2796
|
-
const sub = rest[0];
|
|
2797
|
-
const a = parseArgs(rest.slice(1));
|
|
2798
|
-
if (!sub || sub === "list" || sub === "ls") await cmdArtifactList(a);
|
|
2799
|
-
else if (sub === "create" || sub === "new") await cmdArtifactCreate(a);
|
|
2800
|
-
else if (sub === "show" || sub === "get") await cmdArtifactShow(a);
|
|
2801
|
-
else if (sub === "remove" || sub === "rm") await cmdArtifactRemove(a);
|
|
2802
|
-
else if (sub === "run") await cmdArtifactRun(a);
|
|
2803
|
-
else if (sub === "preview" || sub === "serve") await cmdArtifactPreview(a);
|
|
2804
|
-
else if (sub === "share") await cmdArtifactShare(a);
|
|
2805
|
-
else if (sub === "previews") await cmdArtifactPreviews(a);
|
|
2806
|
-
else if (sub === "stop") await cmdArtifactStop(a);
|
|
2807
|
-
else die(`unknown artifact subcommand: ${sub}`);
|
|
2808
|
-
break;
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
case "task":
|
|
2812
|
-
case "tasks": {
|
|
2813
|
-
const sub = rest[0];
|
|
2814
|
-
const a = parseArgs(rest.slice(1));
|
|
2815
|
-
if (!sub || sub === "list" || sub === "ls") await cmdTaskList(a);
|
|
2816
|
-
else if (sub === "add" || sub === "new" || sub === "create") await cmdTaskAdd(a);
|
|
2817
|
-
else if (sub === "show" || sub === "get") await cmdTaskShow(a);
|
|
2818
|
-
else if (sub === "done" || sub === "complete") await cmdTaskDone(a);
|
|
2819
|
-
else if (sub === "drop" || sub === "archive") await cmdTaskDrop(a);
|
|
2820
|
-
else if (sub === "reopen") await cmdTaskReopen(a);
|
|
2821
|
-
else if (sub === "patch" || sub === "edit") await cmdTaskPatch(a);
|
|
2822
|
-
else die(`unknown task subcommand: ${sub}\nUsage: apx task <list|add|show|done|drop|reopen|patch>`);
|
|
2823
|
-
break;
|
|
2824
|
-
}
|
|
2825
|
-
|
|
2826
|
-
case "panel": {
|
|
2827
|
-
const sub = rest[0];
|
|
2828
|
-
const a = parseArgs(rest.slice(1));
|
|
2829
|
-
if (!sub || sub === "status") await cmdPanelStatus(a);
|
|
2830
|
-
else if (sub === "share") await cmdPanelShare(a);
|
|
2831
|
-
else if (sub === "unshare") await cmdPanelUnshare(a);
|
|
2832
|
-
else die(`unknown panel subcommand: ${sub}\nUsage: apx panel <status|share|unshare>`);
|
|
2833
|
-
break;
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
case "profile":
|
|
2837
|
-
case "profiles": {
|
|
2838
|
-
const sub = rest[0];
|
|
2839
|
-
const a = parseArgs(rest.slice(1));
|
|
2840
|
-
if (!sub || sub === "list" || sub === "ls") await cmdProfileList(a);
|
|
2841
|
-
else if (sub === "show" || sub === "get") await cmdProfileShow(a);
|
|
2842
|
-
else if (sub === "install" || sub === "add") await cmdProfileInstall(a);
|
|
2843
|
-
else if (sub === "use" || sub === "activate") await cmdProfileUse(a);
|
|
2844
|
-
else if (sub === "off" || sub === "deactivate") await cmdProfileOff(a);
|
|
2845
|
-
else if (sub === "config") await cmdProfileConfig(a);
|
|
2846
|
-
else if (sub === "doctor") await cmdProfileDoctor(a);
|
|
2847
|
-
else if (sub === "uninstall" || sub === "remove" || sub === "rm") await cmdProfileUninstall(a);
|
|
2848
|
-
else die(`unknown profile subcommand: ${sub}\nUsage: apx profile <list|show|install|use|off|config|doctor|uninstall>`);
|
|
2849
|
-
break;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
case "command":
|
|
2853
|
-
case "commands": {
|
|
2854
|
-
const sub = rest[0];
|
|
2855
|
-
const a = parseArgs(rest.slice(1));
|
|
2856
|
-
if (!sub || sub === "list" || sub === "ls") await cmdCommandList(a);
|
|
2857
|
-
else if (sub === "show" || sub === "get") await cmdCommandShow(a);
|
|
2858
|
-
else die(`unknown command subcommand: ${sub}`);
|
|
2859
|
-
break;
|
|
2860
|
-
}
|
|
2861
|
-
|
|
2862
|
-
case "org":
|
|
2863
|
-
case "organization": {
|
|
2864
|
-
const sub = rest[0];
|
|
2865
|
-
const a = parseArgs(rest.slice(1));
|
|
2866
|
-
// `apx org area add ...` / `apx org role rm ...` — the resource verb is
|
|
2867
|
-
// the first positional, the action the second.
|
|
2868
|
-
if (!sub || sub === "show" || sub === "list") await cmdOrgShow(a);
|
|
2869
|
-
else if (sub === "area") {
|
|
2870
|
-
const action = rest[1];
|
|
2871
|
-
const aa = parseArgs(rest.slice(1)); // keep `area` as _[0] for name parsing
|
|
2872
|
-
if (action === "add" || action === "new") await cmdOrgAreaAdd(aa);
|
|
2873
|
-
else if (action === "rm" || action === "remove" || action === "delete") await cmdOrgAreaRm(aa);
|
|
2874
|
-
else die("usage: apx org area <add|rm> ...");
|
|
2875
|
-
} else if (sub === "role") {
|
|
2876
|
-
const action = rest[1];
|
|
2877
|
-
const ra = parseArgs(rest.slice(1));
|
|
2878
|
-
if (action === "add" || action === "new") await cmdOrgRoleAdd(ra);
|
|
2879
|
-
else if (action === "rm" || action === "remove" || action === "delete") await cmdOrgRoleRm(ra);
|
|
2880
|
-
else die("usage: apx org role <add|rm> ...");
|
|
2881
|
-
} else die(`unknown org subcommand: ${sub}\nUsage: apx org <show|area|role> ...`);
|
|
2882
|
-
break;
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
case "skills": {
|
|
2886
|
-
const sub = rest[0];
|
|
2887
|
-
const a = parseArgs(rest.slice(1));
|
|
2888
|
-
if (!sub || sub === "add") await cmdSkillsAdd(a);
|
|
2889
|
-
else if (sub === "list" || sub === "ls") await cmdSkillsList(a);
|
|
2890
|
-
else if (sub === "status") await cmdSkillsStatus();
|
|
2891
|
-
else if (sub === "sync" || sub === "refresh") await cmdSkillsSync(a);
|
|
2892
|
-
else if (sub === "index") await cmdSkillsIndex(a);
|
|
2893
|
-
else if (sub === "inspect") await cmdSkillsInspect(a);
|
|
2894
|
-
else if (sub === "inspector") await cmdSkillsInspector(a);
|
|
2895
|
-
else die(`unknown skills subcommand: ${sub}`);
|
|
2896
|
-
break;
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
case "identity":
|
|
2900
|
-
await cmdIdentity(parseArgs(rest));
|
|
2901
|
-
break;
|
|
2902
|
-
|
|
2903
|
-
case "status":
|
|
2904
|
-
await cmdStatus();
|
|
2905
|
-
return; // skip checkForUpdate after status (avoid noise)
|
|
2906
|
-
|
|
2907
|
-
case "setup":
|
|
2908
|
-
case "install":
|
|
2909
|
-
await cmdSetup();
|
|
2910
|
-
return;
|
|
2911
|
-
|
|
2912
|
-
case "update":
|
|
2913
|
-
case "upgrade":
|
|
2914
|
-
await cmdUpdate(parseArgs(rest), VERSION);
|
|
2915
|
-
return; // skip checkForUpdate after an update
|
|
2916
|
-
|
|
2917
|
-
// Refresh everything held in memory after a code change (e.g. a `git
|
|
2918
|
-
// pull` in a dev checkout): restart the daemon, and restart the desktop
|
|
2919
|
-
// too if it was running. The daemon picks up new code/prompts; the
|
|
2920
|
-
// desktop picks up its new renderer/main.js. Token re-sync is automatic
|
|
2921
|
-
// (the desktop WS re-reads daemon.token on reconnect).
|
|
2922
|
-
case "restart": {
|
|
2923
|
-
const a = parseArgs(rest);
|
|
2924
|
-
await cmdDaemonRestart(a);
|
|
2925
|
-
if (desktopRunning()) await cmdDesktopRestart(a);
|
|
2926
|
-
return;
|
|
2927
|
-
}
|
|
2928
|
-
|
|
2929
|
-
case "overlay":
|
|
2930
|
-
console.error(" apx overlay has been renamed to apx desktop — forwarding.");
|
|
2931
|
-
/* falls through */
|
|
2932
|
-
case "desktop": {
|
|
2933
|
-
const [sub, ...oRest] = rest;
|
|
2934
|
-
const oArgs = parseArgs(oRest);
|
|
2935
|
-
if (!sub || sub === "start") { await cmdDesktopStart(oArgs); return; }
|
|
2936
|
-
if (sub === "stop") { await cmdDesktopStop(oArgs); return; }
|
|
2937
|
-
if (sub === "restart") { await cmdDesktopRestart(oArgs); return; }
|
|
2938
|
-
if (sub === "status") { await cmdDesktopStatus(oArgs);return; }
|
|
2939
|
-
if (sub === "install") { await cmdDesktopInstall(oArgs); return; }
|
|
2940
|
-
if (sub === "uninstall") { await cmdDesktopUninstall(oArgs);return; }
|
|
2941
|
-
die(`unknown desktop sub-command: ${sub}\nUsage: apx desktop <start|stop|restart|status|install|uninstall>`);
|
|
2942
|
-
return;
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
case "voice": {
|
|
2946
|
-
const [sub, ...vRest] = rest;
|
|
2947
|
-
const vArgs = parseArgs(vRest);
|
|
2948
|
-
if (sub === "say") { await cmdVoiceSay(vArgs); return; }
|
|
2949
|
-
if (sub === "listen") { await cmdVoiceListen(vArgs); return; }
|
|
2950
|
-
if (sub === "providers" || sub === "list") { await cmdVoiceProviders(); return; }
|
|
2951
|
-
die(`unknown voice sub-command: ${sub || "(missing)"}\nUsage: apx voice <say|listen|providers>`);
|
|
2952
|
-
return;
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
default:
|
|
2956
|
-
die(`unknown command: ${cmd}\nRun \`apx --help\` for usage.`);
|
|
2957
|
-
}
|
|
111
|
+
const load = resolveRoute(cmd);
|
|
112
|
+
if (!load) die(`unknown command: ${cmd}\nRun \`apx --help\` for usage.`);
|
|
113
|
+
const mod = await load();
|
|
114
|
+
await mod.default(rest, { parseArgs, die, dispatch, VERSION });
|
|
2958
115
|
}
|
|
2959
116
|
|
|
2960
117
|
const [topCmd, ...topRest] = argv;
|