agentworks-cli 0.2.1__tar.gz → 0.3.0__tar.gz

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.
Files changed (90) hide show
  1. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/.gitignore +1 -4
  2. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/CHANGELOG.md +64 -0
  3. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/PKG-INFO +184 -66
  4. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/README.md +183 -65
  5. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/agents/manager.py +82 -32
  6. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/cli.py +470 -117
  7. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/completions/__init__.py +21 -0
  8. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/completions/bash.py +12 -10
  9. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/completions/install.py +9 -0
  10. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/completions/powershell.py +23 -11
  11. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/completions/spec.py +21 -1
  12. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/completions/zsh.py +18 -12
  13. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/config.py +1 -3
  14. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/db.py +353 -33
  15. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/doctor.py +6 -3
  16. agentworks_cli-0.3.0/agentworks/nerf-config.yaml +16 -0
  17. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/output.py +4 -0
  18. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sample-config.toml +0 -1
  19. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sessions/console.py +34 -11
  20. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sessions/manager.py +114 -35
  21. agentworks_cli-0.3.0/agentworks/sessions/multi_console.py +874 -0
  22. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/ssh.py +10 -2
  23. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/backup.py +6 -6
  24. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/manager.py +49 -18
  25. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/workspaces/backends/vm.py +3 -1
  26. agentworks_cli-0.3.0/agentworks/workspaces/manager.py +1010 -0
  27. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/pyproject.toml +2 -1
  28. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_agents.py +5 -5
  29. agentworks_cli-0.3.0/tests/test_completions.py +235 -0
  30. agentworks_cli-0.3.0/tests/test_consoles.py +1260 -0
  31. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_db.py +223 -21
  32. agentworks_cli-0.3.0/tests/test_error_wrapper.py +438 -0
  33. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/uv.lock +1 -1
  34. agentworks_cli-0.2.1/agentworks/nerf-config.yaml +0 -16
  35. agentworks_cli-0.2.1/agentworks/workspaces/backends/local.py +0 -119
  36. agentworks_cli-0.2.1/agentworks/workspaces/manager.py +0 -1080
  37. agentworks_cli-0.2.1/tests/test_completions.py +0 -103
  38. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/.python-version +0 -0
  39. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/__init__.py +0 -0
  40. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/agents/__init__.py +0 -0
  41. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/agents/templates.py +0 -0
  42. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/catalog.py +0 -0
  43. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/catalog.toml +0 -0
  44. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/git_credentials/__init__.py +0 -0
  45. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/git_credentials/azdo.py +0 -0
  46. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/git_credentials/base.py +0 -0
  47. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/git_credentials/github.py +0 -0
  48. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/remote_exec.py +0 -0
  49. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sessions/__init__.py +0 -0
  50. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sessions/templates.py +0 -0
  51. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sessions/tmux.py +0 -0
  52. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/sources.py +0 -0
  53. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/ssh_config.py +0 -0
  54. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vm_hosts/__init__.py +0 -0
  55. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vm_hosts/manager.py +0 -0
  56. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/__init__.py +0 -0
  57. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/base.py +0 -0
  58. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/bootstrap_script.py +0 -0
  59. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/cloud_init.py +0 -0
  60. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/initializer.py +0 -0
  61. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/provisioners/__init__.py +0 -0
  62. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/provisioners/azure.py +0 -0
  63. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/provisioners/lima.py +0 -0
  64. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/provisioners/proxmox.py +0 -0
  65. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/provisioners/proxmox_api.py +0 -0
  66. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/provisioners/wsl2.py +0 -0
  67. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/vms/templates.py +0 -0
  68. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/workspaces/__init__.py +0 -0
  69. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/workspaces/backends/__init__.py +0 -0
  70. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/workspaces/templates.py +0 -0
  71. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/agentworks/workspaces/tmuxinator.py +0 -0
  72. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/pypi-dist/.gitignore +0 -0
  73. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/__init__.py +0 -0
  74. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/conftest.py +0 -0
  75. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_authorized_keys.py +0 -0
  76. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_bootstrap_script.py +0 -0
  77. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_catalog.py +0 -0
  78. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_cloud_init.py +0 -0
  79. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_config.py +0 -0
  80. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_doctor.py +0 -0
  81. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_exec_target.py +0 -0
  82. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_initializer.py +0 -0
  83. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_name_validation.py +0 -0
  84. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_nerf_plugin.py +0 -0
  85. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_proxmox_api.py +0 -0
  86. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_remote_exec.py +0 -0
  87. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_session_liveness.py +0 -0
  88. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_ssh_config.py +0 -0
  89. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_templates.py +0 -0
  90. {agentworks_cli-0.2.1 → agentworks_cli-0.3.0}/tests/test_tmuxinator.py +0 -0
@@ -26,6 +26,7 @@ rulesync.local.jsonc
26
26
  rulesync.lock
27
27
 
28
28
  # Rulesync - generated output (regenerate with: npx rulesync generate)
29
+ .agents/
29
30
  CLAUDE.md
30
31
  .claude
31
32
  .claudeignore
@@ -33,10 +34,6 @@ CLAUDE.md
33
34
  .cursor/
34
35
  .cursorrules
35
36
  .cursorignore
36
- .github/*
37
- !.github/workflows
38
- !.github/ISSUE_TEMPLATE
39
- !.github/PULL_REQUEST_TEMPLATE.md
40
37
  .copilotignore
41
38
  AGENTS.md
42
39
  GEMINI.md
@@ -1,5 +1,69 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0](https://github.com/WayfarerLabs/agentworks/compare/v0.2.1...v0.3.0) (2026-06-01)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * split completion command into show/install with shell autodetection
9
+ * drop local workspaces; all workspaces are VM-scoped
10
+
11
+ ### Features
12
+
13
+ * **cli:** add 'aw console' command group ([dc833bd](https://github.com/WayfarerLabs/agentworks/commit/dc833bdc55ee02bb8e36c24a5e0b08fb91bdd0e6))
14
+ * **cli:** Ctrl-C triggers per-op rollback; clean SIGINT exit ([0648b16](https://github.com/WayfarerLabs/agentworks/commit/0648b16f9d98c686c63a59eb1b2cac2cad9f8625))
15
+ * **cli:** Ctrl-C triggers per-op rollback; clean SIGINT exit ([03ab4d0](https://github.com/WayfarerLabs/agentworks/commit/03ab4d0cf7ea4a6a7287443e6e79af6b8b97242c))
16
+ * **cli:** ship 'agw' as a short-name alias for the agentworks binary ([c99c044](https://github.com/WayfarerLabs/agentworks/commit/c99c044ed0073308cc427aaa13f3cb31b82567f5))
17
+ * **completions:** wire console commands for zsh/bash/powershell ([6181cb7](https://github.com/WayfarerLabs/agentworks/commit/6181cb751cc633333eac39b7e10d802507ef313c))
18
+ * **consoles:** add --add-admin-shell flag for legacy vm-console behavior ([f337f38](https://github.com/WayfarerLabs/agentworks/commit/f337f38eba60b7dea78c315dcddf4e01f82940a4))
19
+ * **consoles:** add 'Waiting for session to restart...' status line ([8fc20a7](https://github.com/WayfarerLabs/agentworks/commit/8fc20a7bdbac58f1894e301688f7dbd82b7249b4))
20
+ * **consoles:** announce attach/build/rebuild path in console attach ([17d14aa](https://github.com/WayfarerLabs/agentworks/commit/17d14aa26451aa49ec5f7e592a8835c1d0c1c5d4))
21
+ * **consoles:** hold windows open indefinitely; silent poll with banner when session is down ([10c002c](https://github.com/WayfarerLabs/agentworks/commit/10c002c410646ebe97f678f824eec69c64c92339))
22
+ * **consoles:** infer --vm from sessions, add --all-running, fix variadic positional completions ([11c5742](https://github.com/WayfarerLabs/agentworks/commit/11c574210f00aed8e67ddef6ff91063dd46d9d5b))
23
+ * **consoles:** infer --vm from sessions, add --all-running, fix variadic positional completions ([6bf8308](https://github.com/WayfarerLabs/agentworks/commit/6bf8308f467f5359b23a748d0454d9de56287c43))
24
+ * **consoles:** show 'Waiting for session to restart...' after exit; use 'exited' ([780373b](https://github.com/WayfarerLabs/agentworks/commit/780373b6fe2e39a319c24a6f0bf6c61e73d14ca9))
25
+ * **consoles:** tmux orchestration with shell panes and live sync ([1ebc1b1](https://github.com/WayfarerLabs/agentworks/commit/1ebc1b19d27714bdbfc39eec1951ee8d460c7cd8))
26
+ * **db:** add consoles and console_sessions tables ([f255397](https://github.com/WayfarerLabs/agentworks/commit/f255397310f4e92cb96c82383a8c75baa211dfe0))
27
+ * named consoles with curated session lists ([d7a36c2](https://github.com/WayfarerLabs/agentworks/commit/d7a36c2d8d37fef835deb62f791794c690c26035))
28
+ * **sessions:** add multi_console core orchestration ([a0adfc8](https://github.com/WayfarerLabs/agentworks/commit/a0adfc8dbfea7485639b5fcdb34cdd68ddc8ecee))
29
+ * ship 'agw' as a short-name alias for the agentworks CLI ([32be51a](https://github.com/WayfarerLabs/agentworks/commit/32be51a29e9d34551aa45650b83522ef810d0096))
30
+ * support creating a new agent as part of session create ([f50b7a8](https://github.com/WayfarerLabs/agentworks/commit/f50b7a8b572199306532c75ac9a0530dd028c467))
31
+ * support creating a new agent as part of session create ([7502755](https://github.com/WayfarerLabs/agentworks/commit/7502755e72d345a664d7415214166453bd9db52b))
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * _rehome_partial_state_hint mentions partial-copy possibility ([d31e55a](https://github.com/WayfarerLabs/agentworks/commit/d31e55af665e4b7fff44ff4188926e0260887e62))
37
+ * accurate install path and dot-source wording in powershell script header ([cf8fa14](https://github.com/WayfarerLabs/agentworks/commit/cf8fa14b19d95b447b60bdef7a2f1773bda42524))
38
+ * clean up agent grants for local workspaces in migration 26 and drop now-dead defensive code ([78b2254](https://github.com/WayfarerLabs/agentworks/commit/78b225420692174276875c22fbbaf5b57b6264e4))
39
+ * **completions:** symlink bash completion under 'agw' so lazy-loading works ([9b32c82](https://github.com/WayfarerLabs/agentworks/commit/9b32c8293bb3d5284d82dabea1ab2b1ff32b58c9))
40
+ * **consoles:** detect probe failure on --all-running; update help/docstring ([b411955](https://github.com/WayfarerLabs/agentworks/commit/b411955c05425530fe746c925bf384d0ffb6a896))
41
+ * **consoles:** drop auto admin-shell window from named consoles ([44d9f37](https://github.com/WayfarerLabs/agentworks/commit/44d9f373fa130d2be2d74808f25eb7f57bb478c0))
42
+ * **consoles:** make placeholder window name collision-proof; warn on list-windows failure ([6d387e1](https://github.com/WayfarerLabs/agentworks/commit/6d387e1931fbd8bc3a0587caca1c4ff9f90d9f0c))
43
+ * **consoles:** retry attach loop with ~10s grace to survive session restart (closes [#51](https://github.com/WayfarerLabs/agentworks/issues/51)) ([98f4354](https://github.com/WayfarerLabs/agentworks/commit/98f43544b04c361cfbc3f17ac4eea16556f6e431))
44
+ * cspell -- Americanize 'normalises'/'Recognises' and allow 'delenv'/'autodetection' ([3432f7d](https://github.com/WayfarerLabs/agentworks/commit/3432f7db1578424be986076d31b3de66024ef856))
45
+ * point grant-recovery hints at the real CLI command ([a2c8189](https://github.com/WayfarerLabs/agentworks/commit/a2c81890f1fa87e149ba1b0c49f2a088643fd025))
46
+ * revert grant-all DB grant on Ctrl-C during group add ([cb7f15b](https://github.com/WayfarerLabs/agentworks/commit/cb7f15bde65c331a65b44144d85f020743be25c5))
47
+ * revert grant-all DB grant on Ctrl-C during the insert too ([1f52b5b](https://github.com/WayfarerLabs/agentworks/commit/1f52b5b6199009cbc47f436e7e7e6f96054c02fc))
48
+ * route group membership through stored linux_group, add migration 22 test ([d0f8dbb](https://github.com/WayfarerLabs/agentworks/commit/d0f8dbbcb80fd53c2495183a0c1542824ca434e7))
49
+ * **sessions:** stop creating duplicate console windows on restart; deprecate 'aw vm console' ([1874426](https://github.com/WayfarerLabs/agentworks/commit/18744269a34120568bd3d8aa1572db5cbf758f2c))
50
+ * surface --shell hint in doctor and call PowerShell wiring a dot-source line ([e3e1672](https://github.com/WayfarerLabs/agentworks/commit/e3e167270db22f8894cf9e45ff1c231ff4093351))
51
+
52
+
53
+ ### Documentation
54
+
55
+ * **consoles:** clarify --vm selection matches existing CLI conventions ([8940709](https://github.com/WayfarerLabs/agentworks/commit/8940709138ad4f27a9ab2ea0309fd1923541f653))
56
+ * **consoles:** de-emphasize --vm in primary examples (auto-detected) ([d97e99a](https://github.com/WayfarerLabs/agentworks/commit/d97e99ac453512455f5c3e66fde0b8d3af262d43))
57
+ * **consoles:** soften restart comment and surface deprecation in vm --help ([b658c46](https://github.com/WayfarerLabs/agentworks/commit/b658c46b1a3b6c4c678c10061002e51ce96a162f))
58
+ * distinguish domain-error vs unexpected-error paths in --debug section ([065801e](https://github.com/WayfarerLabs/agentworks/commit/065801e33b55420080149a5ea67de03754d3d71f))
59
+ * name-positional examples in Getting Started and VM command table ([27fe300](https://github.com/WayfarerLabs/agentworks/commit/27fe3009cf43b9743f5bc84ba5adebf798e3c294))
60
+
61
+
62
+ ### Code Refactoring
63
+
64
+ * drop local workspaces; all workspaces are VM-scoped ([e6236e6](https://github.com/WayfarerLabs/agentworks/commit/e6236e6c2969cd56efc9bd3cde35bfc37eceb9fc))
65
+ * split completion command into show/install with shell autodetection ([a6d1af4](https://github.com/WayfarerLabs/agentworks/commit/a6d1af4d8bfac4973765f99040f190fcc24dd9fc))
66
+
3
67
  ## [0.2.1](https://github.com/WayfarerLabs/agentworks/compare/v0.2.0...v0.2.1) (2026-05-27)
4
68
 
5
69
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentworks-cli
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: CLI for orchestrating workspace lifecycle across multiple compute targets
5
5
  Project-URL: Homepage, https://github.com/WayfarerLabs/agentworks
6
6
  Project-URL: Repository, https://github.com/WayfarerLabs/agentworks
@@ -134,9 +134,9 @@ settings) can be used to control how tools behave within the context of this wor
134
134
  The Agentworks workspace mechanism fully supports any number of workspaces mapping to the same
135
135
  underlying repository. To simplify administration, each is a full independent clone.
136
136
 
137
- While VM workspaces are the primary supported workspace type, local workspaces can also be created
138
- on the operator's workstation. Local workspaces do not support agents because the isolation model
139
- that underpins agent execution requires Linux user management that is only available on VMs.
137
+ Workspaces always live on a VM. An earlier iteration supported local (on-workstation) workspaces,
138
+ but they did not support agents (which require Linux user management only available on VMs), so they
139
+ were removed to keep the model focused.
140
140
 
141
141
  ### Agents - the Actor
142
142
 
@@ -160,6 +160,10 @@ concurrent workloads running across their VMs, workspaces, and agents. Agentwork
160
160
  operator to attach to and detach from them as needed to monitor progress or interact with the
161
161
  workload, and then to stop, restart, and delete them to manage their lifecycle.
162
162
 
163
+ For day-to-day work across many sessions, see [Named consoles](#named-consoles): curated tmux views
164
+ that group the sessions you're actively focused on, optionally with extra shell panes pre-opened in
165
+ each session's window.
166
+
163
167
  ## Key Principles
164
168
 
165
169
  ### Opinionated Consistency
@@ -236,12 +240,16 @@ Sessions are built on [tmux](https://github.com/tmux/tmux), which provides persi
236
240
  sessions that survive disconnects and support attach/detach. Each session maps 1:1 to a tmux session
237
241
  on the VM.
238
242
 
239
- Agentworks provides two console layers for interacting with sessions:
243
+ Agentworks provides several console layers for interacting with sessions:
240
244
 
241
245
  - **Workspace console** (`workspace console`): a tmuxinator-managed tmux session with one window per
242
- session in the workspace, plus an admin shell. This is the recommended way to interact with
243
- sessions.
244
- - **VM console** (`vm console`): a dynamically-built tmux session spanning all workspaces on the VM.
246
+ session in the workspace, plus an admin shell. Good for staying inside a single workspace.
247
+ - **Named consoles** (`console`): persistent, named tmux sessions that aggregate a curated subset of
248
+ sessions across any workspaces on a VM, with optional extra shell panes per session window.
249
+ Recommended when you juggle sessions across workspaces or want a focused view of the few you're
250
+ actively working on.
251
+ - **VM console** (`vm console`, _deprecated_): a dynamically-built tmux session spanning every
252
+ session on the VM. Replaced by named consoles; will be removed in a future release.
245
253
 
246
254
  Agent-mode sessions run on per-agent tmux sockets for proper process isolation and terminal resize
247
255
  propagation. See the [tmux Architecture](#tmux-architecture) section for details.
@@ -273,8 +281,8 @@ uv run agentworks config init # creates ~/.config/agentworks/config.toml
273
281
  Edit the config file (at minimum, set your SSH key paths), then:
274
282
 
275
283
  ```bash
276
- agentworks vm create # provision + initialize a VM
277
- agentworks workspace create # create a workspace on the VM
284
+ agentworks vm create my-vm # provision + initialize a VM
285
+ agentworks workspace create my-workspace # create a workspace on the VM
278
286
  agentworks workspace shell my-workspace
279
287
  ```
280
288
 
@@ -287,23 +295,38 @@ agentworks workspace shell my-workspace
287
295
 
288
296
  ## Global Options
289
297
 
290
- | Flag | Description |
291
- | ------------------- | ------------------------------- |
292
- | `--non-interactive` | Disable all interactive prompts |
298
+ | Flag | Description |
299
+ | ------------------- | ---------------------------------------------------------------------------- |
300
+ | `--non-interactive` | Disable all interactive prompts |
301
+ | `--debug` | Print the full Python traceback on unhandled errors (also via `AGW_DEBUG=1`) |
293
302
 
294
303
  When `--non-interactive` is set (or stdin is not a TTY), commands that would normally prompt for
295
304
  missing values (VM selection, workspace selection, name generation) will fail with a clear error
296
305
  indicating which flag is required. Auto-selection still works: if there is exactly one VM or
297
306
  workspace, it is used without prompting.
298
307
 
308
+ Domain errors (SSH timeouts, validation failures, missing resources, etc.) surface as a single clean
309
+ line: `Error: <message>`. Truly unexpected failures (internal bugs, OS-level errors, third-party
310
+ library failures) also get a clean single-line message, plus the full traceback appended to
311
+ `~/.config/agentworks/logs/error.log` for debugging. Pass `--debug` (or set `AGW_DEBUG=1`) to print
312
+ the traceback to stderr instead.
313
+
314
+ Pressing Ctrl-C during a long-running operation triggers best-effort cleanup. Where the operation
315
+ can roll back (e.g. `vm create` during the provisioning phase, `workspace create`, `agent create`,
316
+ `session create`) it undoes the partial DB / on-VM state and prints `Cancelling X... rolling back.`.
317
+ Where rollback isn't possible (`vm reinit`, `agent reinit`, the init phase of `vm create`) it prints
318
+ a recovery hint: the next command to run (`vm reinit`, `vm delete --force`, ...). Every cancellation
319
+ exits with the conventional SIGINT exit code (130).
320
+
299
321
  ## Commands
300
322
 
301
323
  ### Top-level
302
324
 
303
- | Command | Description |
304
- | --------------------------- | ---------------------------- |
305
- | `agentworks doctor` | Check environment and config |
306
- | `agentworks completion zsh` | Output zsh completion script |
325
+ | Command | Description |
326
+ | ------------------------------- | -------------------------------------- |
327
+ | `agentworks doctor` | Check environment and config |
328
+ | `agentworks completion show` | Print the completion script to stdout |
329
+ | `agentworks completion install` | Install the completion script in-place |
307
330
 
308
331
  ### VM Hosts
309
332
 
@@ -321,7 +344,7 @@ Manage virtual machines across Lima (local or remote), Azure, and WSL2.
321
344
 
322
345
  | Command | Description |
323
346
  | ------------------------------------------------ | ------------------------------------------ |
324
- | `agentworks vm create` | Create a new VM (provision + initialize) |
347
+ | `agentworks vm create <name>` | Create a new VM (provision + initialize) |
325
348
  | `agentworks vm list` | List VMs with status and resources |
326
349
  | `agentworks vm describe <name>` | Show VM details, workspaces, and event log |
327
350
  | `agentworks vm shell <name>` | SSH into a VM's home directory |
@@ -330,12 +353,13 @@ Manage virtual machines across Lima (local or remote), Azure, and WSL2.
330
353
  | `agentworks vm reinit <name>` | Re-run initialization on a provisioned VM |
331
354
  | `agentworks vm delete <name>` | Delete a VM (with confirmation) |
332
355
  | `agentworks vm logs <name>` | Show SSH logs for a VM |
333
- | `agentworks vm console <name>` | Attach to the VM console |
356
+ | `agentworks vm console <name>` | _Deprecated_: use `agentworks console` |
334
357
  | `agentworks vm add-git-credential <name> <cred>` | Add or update a git credential |
335
358
 
336
- `vm create` accepts `--name`, `--platform`, `--vm-host`, `--admin-username`, `--cpus`, `--memory`,
337
- `--disk`, and `--azure-vm-size`. These are immutable provisioning parameters stored in the database.
338
- All initialization behavior (packages, install commands, etc.) is driven by config.
359
+ `vm create <name>` takes the VM name as a required positional. Optional flags: `--platform`,
360
+ `--vm-host`, `--admin-username`, `--cpus`, `--memory`, `--disk`, and `--azure-vm-size`. These are
361
+ immutable provisioning parameters stored in the database. All initialization behavior (packages,
362
+ install commands, etc.) is driven by config.
339
363
 
340
364
  `vm reinit` re-runs the initialization phase using the current config without reprovisioning the VM.
341
365
  Changes to config (new packages, different install commands, etc.) are picked up automatically.
@@ -345,28 +369,29 @@ message shows what will be deleted. Pass `--yes` to skip the prompt.
345
369
 
346
370
  ### Workspaces
347
371
 
348
- Manage workspaces on VMs or locally.
372
+ Manage workspaces on VMs.
349
373
 
350
- | Command | Description |
351
- | -------------------------------------- | ------------------------------------ |
352
- | `agentworks workspace create` | Create a workspace (VM or `--local`) |
353
- | `agentworks workspace describe <name>` | Show workspace details and sessions |
354
- | `agentworks workspace shell <name>` | Open a plain shell into a workspace |
355
- | `agentworks workspace console <name>` | Open the workspace console (tmux) |
356
- | `agentworks workspace list` | List workspaces |
357
- | `agentworks workspace copy <source>` | Copy a workspace to a new location |
358
- | `agentworks workspace rehome <name>` | Move workspace to a new path |
359
- | `agentworks workspace repair <name>` | Repair workspace infrastructure |
360
- | `agentworks workspace delete <name>` | Delete a workspace |
374
+ | Command | Description |
375
+ | ------------------------------------------- | ----------------------------------- |
376
+ | `agentworks workspace create <name>` | Create a workspace on a VM |
377
+ | `agentworks workspace describe <name>` | Show workspace details and sessions |
378
+ | `agentworks workspace shell <name>` | Open a plain shell into a workspace |
379
+ | `agentworks workspace console <name>` | Open the workspace console (tmux) |
380
+ | `agentworks workspace list` | List workspaces |
381
+ | `agentworks workspace copy <source> <name>` | Copy a workspace to a new VM |
382
+ | `agentworks workspace rehome <name>` | Move workspace to a new path |
383
+ | `agentworks workspace repair <name>` | Repair workspace infrastructure |
384
+ | `agentworks workspace delete <name>` | Delete a workspace |
361
385
 
362
- `workspace create` accepts `--name`, `--vm`, `--local`, `--template`, and `--open-vscode`.
386
+ `workspace create <name>` takes the workspace name as a required positional. Optional flags: `--vm`,
387
+ `--template`, and `--open-vscode`.
363
388
 
364
389
  `workspace console` opens a tmuxinator session (`ws-<name>-console`) with an admin-shell window plus
365
390
  one window per session in the workspace. Pass `--recreate` to kill and rebuild the console. This is
366
391
  the recommended way to interact with sessions from within VS Code or any terminal on the VM.
367
392
 
368
- `workspace copy` copies a workspace to a new location. Accepts `--name`, `--vm`, and `--local` (same
369
- pattern as `workspace create`). Works across VMs, VM to local, and local to VM.
393
+ `workspace copy <source> <name>` copies a workspace to a new VM workspace. Accepts `--vm`. Source
394
+ and destination can be the same VM (a clone) or different VMs.
370
395
 
371
396
  `workspace delete` requires `--force` if the workspace has sessions. Running sessions are killed
372
397
  during deletion. Pass `--yes` to skip the confirmation prompt.
@@ -377,7 +402,7 @@ Manage agents (isolated Linux users) on VMs. Agents are VM-scoped and access wor
377
402
 
378
403
  | Command | Description |
379
404
  | ------------------------------------------------------------ | ------------------------------ |
380
- | `agentworks agent create [--name] [--vm]` | Create an agent on a VM |
405
+ | `agentworks agent create <name> [--vm]` | Create an agent on a VM |
381
406
  | `agentworks agent list [--vm <vm>]` | List agents |
382
407
  | `agentworks agent describe <name>` | Show agent details and grants |
383
408
  | `agentworks agent reinit <name>` | Re-run agent setup |
@@ -389,7 +414,8 @@ Manage agents (isolated Linux users) on VMs. Agents are VM-scoped and access wor
389
414
  | `agentworks agent shell <name> [--workspace <ws>]` | Shell into an agent |
390
415
  | `agentworks agent delete <name>` | Delete an agent |
391
416
 
392
- `agent create` accepts `--name`, `--vm`, `--template`, and `--grant-all-workspaces`.
417
+ `agent create <name>` takes the agent name as a required positional. Optional flags: `--vm`,
418
+ `--template`, and `--grant-all-workspaces`.
393
419
 
394
420
  `agent delete` requires `--force` if the agent has running sessions. Pass `--yes` to skip the
395
421
  confirmation prompt.
@@ -401,7 +427,7 @@ Manage sessions (persistent tmux sessions running in workspaces). Session names
401
427
 
402
428
  | Command | Description |
403
429
  | -------------------------------------------- | ------------------------------ |
404
- | `agentworks session create` | Create and start a session |
430
+ | `agentworks session create <name>` | Create and start a session |
405
431
  | `agentworks session describe <name>` | Show session details |
406
432
  | `agentworks session list [--workspace <ws>]` | List sessions with status |
407
433
  | `agentworks session attach <name>` | Attach to a running session |
@@ -409,25 +435,92 @@ Manage sessions (persistent tmux sessions running in workspaces). Session names
409
435
  | `agentworks session restart <name>` | Restart a session |
410
436
  | `agentworks session delete <name>` | Stop and delete a session |
411
437
  | `agentworks session logs <name>` | Dump session scrollback buffer |
412
- | `agentworks vm console <vm-name>` | Attach to the VM console |
438
+ | `agentworks console attach <name>` | Attach to a named console |
439
+
440
+ `session create <name>` takes the session name as a required positional. Optional flags:
441
+ `--workspace`, `--template`, `--admin`, and `--agent`. Workspace and mode (admin vs agent) are
442
+ prompted interactively if omitted; if agents exist on the VM and neither `--admin` nor `--agent` is
443
+ specified, you are prompted to choose. Pass `--new-workspace` to create a workspace on the fly (with
444
+ optional `--workspace-name`, `--workspace-template`, and `--vm`; `--workspace-name` defaults to the
445
+ session name). Pass `--new-agent` to create a new agent for the session (with optional
446
+ `--agent-name` and `--agent-template`; `--agent-name` defaults to the session name); the new agent
447
+ is provisioned on the workspace's VM. When a session created with `--new-workspace` or `--new-agent`
448
+ is later deleted, you are offered the option to delete the workspace and/or agent as well -- the
449
+ workspace if no other sessions remain on it, the agent if it has no other sessions and no explicit
450
+ grants.
451
+
452
+ ### Named consoles
453
+
454
+ Named consoles are persistent, curated tmux views over sessions on a VM. Each console is its own
455
+ tmux session (`aw-console-<name>`) containing one window per included session, plus any extra shell
456
+ panes you want preloaded into a session's window.
457
+
458
+ | Command | Description |
459
+ | -------------------------------------------------------- | ----------------------------------------------------------------- |
460
+ | `agentworks console create <name> [sessions...]` | Create a console with the given sessions |
461
+ | `agentworks console list` | List consoles |
462
+ | `agentworks console describe <name>` | Show membership and shell layout |
463
+ | `agentworks console attach <name>` | Attach (builds tmux state on first attach) |
464
+ | `agentworks console delete <name>` | Tear down and remove the console |
465
+ | `agentworks console add-session <name> <sessions...>` | Add session windows |
466
+ | `agentworks console remove-session <name> <sessions...>` | Remove session windows |
467
+ | `agentworks console add-shell <name> <session>` | Add a shell pane to a session window (accepts `--cwd`, `--admin`) |
468
+
469
+ `console create` accepts:
470
+
471
+ - `--vm` -- target VM. **Inferred from the listed sessions when omitted**; if the listed sessions
472
+ span more than one VM, `console create` errors and asks you to pick one with `--vm`. When no
473
+ sessions are listed (e.g. with `--all` and no explicit specs), VM selection falls back to the
474
+ standard prompt (auto-picked if you have a single VM, prompted otherwise).
475
+ - `--all` -- include every session on the VM with 0 shells, appended after the explicit specs
476
+ (alphabetical).
477
+ - `--all-running` -- like `--all` but restricted to sessions whose live tmux state on the VM is OK
478
+ (one SSH round-trip; same probe `aw session list` uses). Mutually exclusive with `--all`. Requires
479
+ the VM to be reachable.
480
+ - `--add-admin-shell` -- include a top-level admin-shell window as window 0, matching the legacy
481
+ `vm console` behavior.
482
+
483
+ `console list` accepts `--vm` to filter.
484
+
485
+ Session specs use `name` or `name+N` shorthand, where `N` is the number of default shell panes to
486
+ pre-open in that session's window (running as the session's agent user, cwd = workspace root):
487
+
488
+ ```sh
489
+ # A console with three sessions; the first two get extra shells.
490
+ # VM is inferred from the sessions.
491
+ agentworks console create backend auth-server+2 auth-tests+1 docs
492
+
493
+ # Same, but also include a top-level admin-shell window (window 0).
494
+ agentworks console create backend auth-server+2 auth-tests+1 docs --add-admin-shell
495
+
496
+ # Everything currently running on the VM, after the explicit specs.
497
+ agentworks console create live auth-server+2 --all-running
498
+
499
+ # All sessions on the VM (running or not). Needs --vm since no sessions are
500
+ # named explicitly to infer from.
501
+ agentworks console create everything --vm aw-private --all
502
+
503
+ # Add an admin shell rooted in a sub-path of the workspace.
504
+ agentworks console add-shell backend auth-server --cwd src/api --admin
505
+ ```
413
506
 
414
- `session create` accepts `--name`, `--workspace`, `--template`, `--admin`, and `--agent`. Workspace,
415
- mode (admin vs agent), and name are prompted interactively if omitted. If agents exist on the VM and
416
- neither `--admin` nor `--agent` is specified, you are prompted to choose. Pass `--new-workspace` to
417
- create a workspace on the fly (with optional `--workspace-name`, `--workspace-template`, and
418
- `--vm`). When a session created with `--new-workspace` is later deleted, you are offered the option
419
- to delete the workspace as well (if no other sessions remain).
507
+ Memberships and shell layouts persist in the database. `aw console attach` builds the tmux session
508
+ on first attach (or with `--recreate`); subsequent attaches reuse the running tmux session. Adding
509
+ or removing sessions/shells while a console is attached updates the live tmux state immediately
510
+ (best-effort); when the console isn't running on the VM, only the DB is updated and changes appear
511
+ on next attach.
420
512
 
421
513
  ### tmux Architecture
422
514
 
423
- Each session runs in its own locked-down tmux session on the VM. There are three ways to interact
515
+ Each session runs in its own locked-down tmux session on the VM. There are several ways to interact
424
516
  with sessions, at different scopes:
425
517
 
426
- | Method | Scope | tmux session name | Entry point |
427
- | ------------------- | -------------- | ------------------------ | --------------------------- |
428
- | `session attach` | One session | `<session-name>` | Operator's machine |
429
- | `workspace console` | One workspace | `ws-<workspace>-console` | On-VM or operator's machine |
430
- | `vm console` | All workspaces | `vm-console` | Operator's machine |
518
+ | Method | Scope | tmux session name | Entry point |
519
+ | ------------------------- | -------------------------------- | ------------------------ | --------------------------- |
520
+ | `session attach` | One session | `<session-name>` | Operator's machine |
521
+ | `workspace console` | One workspace | `ws-<workspace>-console` | On-VM or operator's machine |
522
+ | `console` | Curated subset across workspaces | `aw-console-<name>` | Operator's machine |
523
+ | `vm console` (deprecated) | All sessions on the VM | `vm-console` | Operator's machine |
431
524
 
432
525
  #### Session tmux sessions
433
526
 
@@ -443,8 +536,9 @@ tmux pane PTY. The socket path is persisted in the database.
443
536
 
444
537
  `workspace console` uses tmuxinator to create or attach to a `ws-<name>-console` session. The
445
538
  tmuxinator config (`.tmuxinator.yml` in the workspace root) is regenerated whenever sessions change,
446
- so the console always reflects the current set of sessions. This is the recommended way to interact
447
- with sessions from within VS Code or any terminal on the VM.
539
+ so the console always reflects the current set of sessions. Best for in-VM work scoped to a single
540
+ workspace (e.g. inside VS Code's integrated terminal). For curated views that span workspaces, use a
541
+ named console (`console attach <name>`).
448
542
 
449
543
  ```text
450
544
  ws-myproject-console (tmuxinator, full tmux)
@@ -453,10 +547,32 @@ ws-myproject-console (tmuxinator, full tmux)
453
547
  Window 3: myproject-debug attached to session
454
548
  ```
455
549
 
456
- #### VM console
550
+ #### Named console
551
+
552
+ `console attach <name>` creates or attaches to the `aw-console-<name>` tmux session. Membership and
553
+ per-session shell layout are stored in the database. Each member session becomes a window running
554
+ the same wrapper used by the workspace and VM consoles, plus a configurable number of extra shell
555
+ panes (default user = session's agent user, default cwd = workspace root; override per pane with
556
+ `--cwd` / `--admin` on `console add-shell`).
557
+
558
+ ```text
559
+ aw-console-backend
560
+ Window 1: auth-server attached session + 2 agent shells (workspace root)
561
+ Window 2: auth-tests attached session + 1 agent shell
562
+ Window 3: docs attached session only
563
+ ```
564
+
565
+ The tmux session is built lazily on first `attach` (or rebuilt with `--recreate`). Adding or
566
+ removing sessions/shells while the console is attached updates tmux immediately; when offline, only
567
+ the DB is touched and changes appear on next attach. The console does not auto-boot the VM for live
568
+ sync; VM start happens only on explicit `attach`.
457
569
 
458
- `vm console` creates or attaches to the `vm-console` session, which spans all workspaces on the VM.
459
- This is built dynamically (not via tmuxinator) and is managed from the operator's machine.
570
+ #### VM console (deprecated)
571
+
572
+ `vm console` creates or attaches to the `vm-console` session, which spans all sessions on the VM.
573
+ Built dynamically (not via tmuxinator). Superseded by named consoles, which let you curate which
574
+ sessions are in scope at any moment instead of seeing every session on the VM. Will be removed in a
575
+ future release.
460
576
 
461
577
  #### Shells
462
578
 
@@ -525,7 +641,7 @@ full reference.
525
641
  Key sections:
526
642
 
527
643
  - `[operator]` -- SSH keys (required), additional authorized keys, SSH config management
528
- - `[paths]` -- local workspace, VM workspace, and VS Code workspace file directories
644
+ - `[paths]` -- VM workspace and VS Code workspace file directories
529
645
  - `[defaults]` -- default platform, VM host
530
646
  - `[vm_templates.*]` -- VM resources, apt packages, system install commands, mise
531
647
  - `[admin.config]` -- admin user shell, dotfiles, git credentials, user install commands, mise
@@ -609,16 +725,18 @@ log.
609
725
  ## Shell Completion
610
726
 
611
727
  ```bash
612
- mkdir -p ~/.zfunc
613
- agentworks completion zsh > ~/.zfunc/_agentworks
728
+ agentworks completion install
614
729
  ```
615
730
 
616
- Add to `.zshrc`:
731
+ The shell is autodetected from `$SHELL`; pass `--shell {bash|zsh|powershell}` to override (or when
732
+ autodetection isn't unambiguous, e.g. on Windows). `completion install` writes the script to the
733
+ standard location for that shell. For PowerShell it also appends a dot-source line (`. "..."`) to
734
+ `$PROFILE`. For bash and zsh, if your rc file is missing the loader (`bash-completion` for bash,
735
+ `fpath=(~/.zfunc $fpath)` for plain zsh without a plugin manager), the installer prints a one-line
736
+ note telling you what to add.
617
737
 
618
- ```bash
619
- fpath=(~/.zfunc $fpath)
620
- autoload -Uz compinit && compinit
621
- ```
738
+ To print the script without installing, use `agentworks completion show` (handy for piping into your
739
+ own config-management flow).
622
740
 
623
741
  Completions include dynamic VM, workspace, VM host, session, and template name lookups.
624
742