agent-data-cli 0.1.0__tar.gz → 0.2.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 (104) hide show
  1. {agent_data_cli-0.1.0/src/agent_data_cli.egg-info → agent_data_cli-0.2.0}/PKG-INFO +15 -1
  2. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/README.md +14 -0
  3. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/pyproject.toml +1 -1
  4. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/PYPI_README.md +14 -0
  5. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/config.py +1 -7
  6. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/init.py +0 -2
  7. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/registry.py +0 -7
  8. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/init_service.py +1 -3
  9. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/main.py +2 -6
  10. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/migration.py +1 -21
  11. agent_data_cli-0.2.0/src/agent_data_cli/runtime_paths.py +46 -0
  12. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0/src/agent_data_cli.egg-info}/PKG-INFO +15 -1
  13. agent_data_cli-0.1.0/src/agent_data_cli/runtime_paths.py +0 -90
  14. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/LICENSE +0 -0
  15. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/MANIFEST.in +0 -0
  16. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/setup.cfg +0 -0
  17. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/__init__.py +0 -0
  18. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/__main__.py +0 -0
  19. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/__init__.py +0 -0
  20. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/__main__.py +0 -0
  21. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/__init__.py +0 -0
  22. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/channel.py +0 -0
  23. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/common.py +0 -0
  24. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/content/__init__.py +0 -0
  25. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/content/common.py +0 -0
  26. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/content/interact.py +0 -0
  27. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/content/query.py +0 -0
  28. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/content/search.py +0 -0
  29. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/content/update.py +0 -0
  30. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/dashboard.py +0 -0
  31. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/group.py +0 -0
  32. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/help.py +0 -0
  33. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/hub.py +0 -0
  34. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/source.py +0 -0
  35. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/specs.py +0 -0
  36. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/commands/sub.py +0 -0
  37. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/formatters.py +0 -0
  38. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/help.py +0 -0
  39. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/cli/main.py +0 -0
  40. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/__init__.py +0 -0
  41. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/base.py +0 -0
  42. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/capabilities.py +0 -0
  43. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/config.py +0 -0
  44. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/discovery.py +0 -0
  45. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/help.py +0 -0
  46. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/manifest.py +0 -0
  47. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/models.py +0 -0
  48. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/protocol.py +0 -0
  49. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/core/source_defaults.py +0 -0
  50. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/__init__.py +0 -0
  51. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/__init__.py +0 -0
  52. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/channel.py +0 -0
  53. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/config.py +0 -0
  54. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/content.py +0 -0
  55. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/group.py +0 -0
  56. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/help.py +0 -0
  57. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/source.py +0 -0
  58. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/adapters/sub.py +0 -0
  59. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/context.py +0 -0
  60. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/index.py +0 -0
  61. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/01_Source.py +0 -0
  62. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/02_Channel.py +0 -0
  63. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/03_Content_Search.py +0 -0
  64. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/04_Content_Query.py +0 -0
  65. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/05_Content_Update.py +0 -0
  66. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/06_Sub.py +0 -0
  67. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/07_Group.py +0 -0
  68. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/08_Config.py +0 -0
  69. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/09_Help.py +0 -0
  70. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/pages/__init__.py +0 -0
  71. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/runtime.py +0 -0
  72. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/state.py +0 -0
  73. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/widgets/__init__.py +0 -0
  74. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/widgets/common.py +0 -0
  75. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/widgets/forms.py +0 -0
  76. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/dashboard/widgets/tables.py +0 -0
  77. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/fetchers/__init__.py +0 -0
  78. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/fetchers/base.py +0 -0
  79. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/fetchers/browser.py +0 -0
  80. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/fetchers/http.py +0 -0
  81. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/fetchers/jina.py +0 -0
  82. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/hub/__init__.py +0 -0
  83. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/hub/models.py +0 -0
  84. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/hub/service.py +0 -0
  85. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/__init__.py +0 -0
  86. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/audit.py +0 -0
  87. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/channels.py +0 -0
  88. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/configs.py +0 -0
  89. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/content.py +0 -0
  90. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/db.py +0 -0
  91. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/groups.py +0 -0
  92. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/health.py +0 -0
  93. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/migrations.py +0 -0
  94. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/repositories.py +0 -0
  95. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/store/subscriptions.py +0 -0
  96. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/utils/__init__.py +0 -0
  97. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/utils/text.py +0 -0
  98. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/utils/time.py +0 -0
  99. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli/utils/urls.py +0 -0
  100. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli.egg-info/SOURCES.txt +0 -0
  101. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli.egg-info/dependency_links.txt +0 -0
  102. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli.egg-info/entry_points.txt +0 -0
  103. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli.egg-info/requires.txt +0 -0
  104. {agent_data_cli-0.1.0 → agent_data_cli-0.2.0}/src/agent_data_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-data-cli
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Unified multi-source content CLI for discovery, sync, local query, and explicit interaction.
5
5
  Author: Severin Zhong
6
6
  License-Expression: MIT
@@ -44,6 +44,13 @@ Recommended:
44
44
  uv tool install agent-data-cli
45
45
  ```
46
46
 
47
+ If you want to use `agent-data-cli` inside an existing `uv` project:
48
+
49
+ ```bash
50
+ uv add agent-data-cli
51
+ uv run adc help
52
+ ```
53
+
47
54
  PyPA-standard CLI install:
48
55
 
49
56
  ```bash
@@ -56,6 +63,13 @@ If you also want the dashboard:
56
63
  uv tool install "agent-data-cli[dashboard]"
57
64
  ```
58
65
 
66
+ As a project dependency with dashboard support:
67
+
68
+ ```bash
69
+ uv add "agent-data-cli[dashboard]"
70
+ uv run adc dashboard --help
71
+ ```
72
+
59
73
  or:
60
74
 
61
75
  ```bash
@@ -60,6 +60,13 @@ adc init --defaults
60
60
  adc source list
61
61
  ```
62
62
 
63
+ If you want to use `agent-data-cli` as a dependency inside an existing `uv` project:
64
+
65
+ ```bash
66
+ uv add agent-data-cli
67
+ uv run adc help
68
+ ```
69
+
63
70
  If you also want the dashboard:
64
71
 
65
72
  ```bash
@@ -68,6 +75,13 @@ adc init --defaults
68
75
  adc dashboard
69
76
  ```
70
77
 
78
+ For a project dependency with dashboard support:
79
+
80
+ ```bash
81
+ uv add "agent-data-cli[dashboard]"
82
+ uv run adc dashboard --help
83
+ ```
84
+
71
85
  Local runtime data goes to:
72
86
 
73
87
  ```text
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agent-data-cli"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "Unified multi-source content CLI for discovery, sync, local query, and explicit interaction."
9
9
  readme = {file = "src/agent_data_cli/PYPI_README.md", content-type = "text/markdown"}
10
10
  license = "MIT"
@@ -12,6 +12,13 @@ Recommended:
12
12
  uv tool install agent-data-cli
13
13
  ```
14
14
 
15
+ If you want to use `agent-data-cli` inside an existing `uv` project:
16
+
17
+ ```bash
18
+ uv add agent-data-cli
19
+ uv run adc help
20
+ ```
21
+
15
22
  PyPA-standard CLI install:
16
23
 
17
24
  ```bash
@@ -24,6 +31,13 @@ If you also want the dashboard:
24
31
  uv tool install "agent-data-cli[dashboard]"
25
32
  ```
26
33
 
34
+ As a project dependency with dashboard support:
35
+
36
+ ```bash
37
+ uv add "agent-data-cli[dashboard]"
38
+ uv run adc dashboard --help
39
+ ```
40
+
27
41
  or:
28
42
 
29
43
  ```bash
@@ -5,7 +5,7 @@ from agent_data_cli.cli.commands.specs import CommandArgSpec, CommandContext, Co
5
5
  from agent_data_cli.core.config import validate_config_value
6
6
  from agent_data_cli.core.help import HelpSection
7
7
  from agent_data_cli.core.manifest import CORE_ACTION_NAMES, SOURCE_ACTION_NAMES
8
- from agent_data_cli.migration import migrate_home, migrate_source_workspace
8
+ from agent_data_cli.migration import migrate_source_workspace
9
9
  from agent_data_cli.runtime_paths import RuntimePaths, resolve_runtime_paths
10
10
  from agent_data_cli.store.db import Store
11
11
 
@@ -24,10 +24,6 @@ def _run_config_cli_set(args, extras: list[str], ctx: CommandContext) -> int:
24
24
  spec = ctx.registry.get_cli_config_field_spec(args.key)
25
25
  validate_config_value(spec, args.value, owner="cli")
26
26
  current_paths = _resolve_active_runtime_paths(ctx)
27
- if args.key == "home":
28
- migrated_paths = migrate_home(current_paths, args.value)
29
- _print_cli_config_entries_with_paths(ctx, migrated_paths)
30
- return 0
31
27
  if args.key == "source_workspace":
32
28
  migrated_paths = migrate_source_workspace(current_paths, args.value)
33
29
  _print_cli_config_entries_with_paths(ctx, migrated_paths)
@@ -114,7 +110,6 @@ def _print_cli_config_entries_with_paths(ctx: CommandContext, paths: RuntimePath
114
110
  spec.key: ctx.registry.get_cli_config_default(spec.key)
115
111
  for spec in ctx.registry.get_cli_config_specs()
116
112
  }
117
- defaults_by_key["home"] = str(paths.home)
118
113
  defaults_by_key["source_workspace"] = str(paths.source_workspace)
119
114
  print_cli_config_entries(
120
115
  ctx.registry.get_cli_config_specs(),
@@ -133,7 +128,6 @@ def _resolve_active_runtime_paths(ctx: CommandContext) -> RuntimePaths:
133
128
  db_path=paths.db_path,
134
129
  source_workspace=resolve_runtime_paths(source_workspace_override=source_workspace_entry.value).source_workspace,
135
130
  runtime_dir=paths.runtime_dir,
136
- launcher_path=paths.launcher_path,
137
131
  )
138
132
 
139
133
 
@@ -8,7 +8,6 @@ from agent_data_cli.runtime_paths import resolve_runtime_paths
8
8
  def _run_init(args, extras: list[str], ctx) -> int:
9
9
  _ = extras, ctx
10
10
  paths = resolve_runtime_paths(
11
- home_override=args.home,
12
11
  source_workspace_override=args.source_workspace,
13
12
  )
14
13
  initialize_runtime(paths, force=args.force)
@@ -22,7 +21,6 @@ INIT_COMMAND = CommandNodeSpec(
22
21
  arg_specs=(
23
22
  CommandArgSpec(names=("--defaults",), action="store_true"),
24
23
  CommandArgSpec(names=("--force",), action="store_true"),
25
- CommandArgSpec(names=("--home",), value_name="path"),
26
24
  CommandArgSpec(names=("--source-workspace",), value_name="path", dest="source_workspace"),
27
25
  ),
28
26
  run=_run_init,
@@ -21,13 +21,6 @@ from .base import BaseSource
21
21
 
22
22
 
23
23
  CLI_CONFIG_FIELDS: tuple[ConfigFieldSpec, ...] = (
24
- ConfigFieldSpec(
25
- key="home",
26
- type="path",
27
- secret=False,
28
- description="ADC home directory used for the local database, runtime files, and default workspace",
29
- example="~/.adc",
30
- ),
31
24
  ConfigFieldSpec(
32
25
  key="source_workspace",
33
26
  type="path",
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import shutil
4
4
 
5
- from agent_data_cli.runtime_paths import RuntimePaths, is_initialized, write_launcher_home
5
+ from agent_data_cli.runtime_paths import RuntimePaths, is_initialized
6
6
  from agent_data_cli.store.db import Store
7
7
 
8
8
 
@@ -15,10 +15,8 @@ def initialize_runtime(paths: RuntimePaths, *, force: bool = False) -> None:
15
15
  paths.home.mkdir(parents=True, exist_ok=True)
16
16
  paths.runtime_dir.mkdir(parents=True, exist_ok=True)
17
17
  paths.source_workspace.mkdir(parents=True, exist_ok=True)
18
- write_launcher_home(paths.launcher_path, paths.home)
19
18
  store = Store(str(paths.db_path))
20
19
  store.init_schema()
21
- store.set_cli_config("home", str(paths.home), "path", False)
22
20
  store.set_cli_config("source_workspace", str(paths.source_workspace), "path", False)
23
21
 
24
22
 
@@ -52,20 +52,16 @@ def console_main() -> None:
52
52
 
53
53
 
54
54
  def _resolve_init_paths(args) -> object:
55
- if getattr(args, "defaults", False) or getattr(args, "home", None) or getattr(args, "source_workspace", None):
55
+ if getattr(args, "defaults", False) or getattr(args, "source_workspace", None):
56
56
  return resolve_runtime_paths(
57
- home_override=getattr(args, "home", None),
58
57
  source_workspace_override=getattr(args, "source_workspace", None),
59
58
  )
60
59
 
61
60
  initial = resolve_runtime_paths()
62
- home_input = input(f"ADC home [{initial.home}]: ").strip()
63
- resolved_home = home_input or str(initial.home)
64
- source_default = resolve_runtime_paths(home_override=resolved_home).source_workspace
61
+ source_default = initial.source_workspace
65
62
  source_input = input(f"Source workspace [{source_default}]: ").strip()
66
63
  resolved_source_workspace = source_input or str(source_default)
67
64
  return resolve_runtime_paths(
68
- home_override=resolved_home,
69
65
  source_workspace_override=resolved_source_workspace,
70
66
  )
71
67
 
@@ -3,29 +3,10 @@ from __future__ import annotations
3
3
  import shutil
4
4
  from pathlib import Path
5
5
 
6
- from agent_data_cli.runtime_paths import RuntimePaths, resolve_runtime_paths, write_launcher_home
6
+ from agent_data_cli.runtime_paths import RuntimePaths
7
7
  from agent_data_cli.store.db import Store
8
8
 
9
9
 
10
- def migrate_home(current_paths: RuntimePaths, target_home: str | Path) -> RuntimePaths:
11
- new_home = Path(target_home).expanduser()
12
- if new_home == current_paths.home:
13
- return current_paths
14
- _ensure_target_directory_available(new_home)
15
- new_home.parent.mkdir(parents=True, exist_ok=True)
16
- shutil.move(str(current_paths.home), str(new_home))
17
- new_paths = resolve_runtime_paths(
18
- user_home=current_paths.launcher_path.parent.parent,
19
- home_override=new_home,
20
- )
21
- write_launcher_home(new_paths.launcher_path, new_home)
22
- store = Store(str(new_paths.db_path))
23
- store.set_cli_config("home", str(new_home), "path", False)
24
- if current_paths.source_workspace == current_paths.home / "sources":
25
- store.set_cli_config("source_workspace", str(new_home / "sources"), "path", False)
26
- return new_paths
27
-
28
-
29
10
  def migrate_source_workspace(current_paths: RuntimePaths, target_source_workspace: str | Path) -> RuntimePaths:
30
11
  new_source_workspace = Path(target_source_workspace).expanduser()
31
12
  if new_source_workspace == current_paths.source_workspace:
@@ -40,7 +21,6 @@ def migrate_source_workspace(current_paths: RuntimePaths, target_source_workspac
40
21
  db_path=current_paths.db_path,
41
22
  source_workspace=new_source_workspace,
42
23
  runtime_dir=current_paths.runtime_dir,
43
- launcher_path=current_paths.launcher_path,
44
24
  )
45
25
 
46
26
 
@@ -0,0 +1,46 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass
4
+ import os
5
+ from pathlib import Path
6
+ from typing import Mapping
7
+
8
+
9
+ APP_DIRNAME = ".adc"
10
+ DB_FILE_NAME = "agent-data-cli.db"
11
+
12
+
13
+ @dataclass(frozen=True, slots=True)
14
+ class RuntimePaths:
15
+ home: Path
16
+ db_path: Path
17
+ source_workspace: Path
18
+ runtime_dir: Path
19
+
20
+
21
+ def resolve_runtime_paths(
22
+ *,
23
+ user_home: Path | None = None,
24
+ env: Mapping[str, str] | None = None,
25
+ source_workspace_override: str | Path | None = None,
26
+ ) -> RuntimePaths:
27
+ resolved_env = dict(os.environ if env is None else env)
28
+ resolved_user_home = Path.home() if user_home is None else Path(user_home)
29
+ default_home = resolved_user_home / APP_DIRNAME
30
+ env_home = resolved_env.get("ADC_HOME")
31
+ home = Path(env_home).expanduser() if env_home else default_home
32
+ source_workspace = (
33
+ Path(source_workspace_override).expanduser()
34
+ if source_workspace_override is not None
35
+ else home / "sources"
36
+ )
37
+ return RuntimePaths(
38
+ home=home,
39
+ db_path=home / DB_FILE_NAME,
40
+ source_workspace=source_workspace,
41
+ runtime_dir=home / "runtime",
42
+ )
43
+
44
+
45
+ def is_initialized(paths: RuntimePaths) -> bool:
46
+ return paths.db_path.exists()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-data-cli
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Unified multi-source content CLI for discovery, sync, local query, and explicit interaction.
5
5
  Author: Severin Zhong
6
6
  License-Expression: MIT
@@ -44,6 +44,13 @@ Recommended:
44
44
  uv tool install agent-data-cli
45
45
  ```
46
46
 
47
+ If you want to use `agent-data-cli` inside an existing `uv` project:
48
+
49
+ ```bash
50
+ uv add agent-data-cli
51
+ uv run adc help
52
+ ```
53
+
47
54
  PyPA-standard CLI install:
48
55
 
49
56
  ```bash
@@ -56,6 +63,13 @@ If you also want the dashboard:
56
63
  uv tool install "agent-data-cli[dashboard]"
57
64
  ```
58
65
 
66
+ As a project dependency with dashboard support:
67
+
68
+ ```bash
69
+ uv add "agent-data-cli[dashboard]"
70
+ uv run adc dashboard --help
71
+ ```
72
+
59
73
  or:
60
74
 
61
75
  ```bash
@@ -1,90 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import dataclass
4
- import os
5
- from pathlib import Path
6
- import tomllib
7
- from typing import Mapping
8
-
9
-
10
- APP_DIRNAME = ".adc"
11
- DB_FILE_NAME = "agent-data-cli.db"
12
- LAUNCHER_FILE_NAME = "launcher.toml"
13
-
14
-
15
- @dataclass(frozen=True, slots=True)
16
- class RuntimePaths:
17
- home: Path
18
- db_path: Path
19
- source_workspace: Path
20
- runtime_dir: Path
21
- launcher_path: Path
22
-
23
-
24
- def resolve_runtime_paths(
25
- *,
26
- user_home: Path | None = None,
27
- env: Mapping[str, str] | None = None,
28
- home_override: str | Path | None = None,
29
- source_workspace_override: str | Path | None = None,
30
- ) -> RuntimePaths:
31
- resolved_env = dict(os.environ if env is None else env)
32
- resolved_user_home = Path.home() if user_home is None else Path(user_home)
33
- default_home = resolved_user_home / APP_DIRNAME
34
- launcher_path = default_home / LAUNCHER_FILE_NAME
35
-
36
- home = _resolve_home(
37
- default_home=default_home,
38
- launcher_path=launcher_path,
39
- env=resolved_env,
40
- home_override=home_override,
41
- )
42
- source_workspace = (
43
- Path(source_workspace_override).expanduser()
44
- if source_workspace_override is not None
45
- else home / "sources"
46
- )
47
- return RuntimePaths(
48
- home=home,
49
- db_path=home / DB_FILE_NAME,
50
- source_workspace=source_workspace,
51
- runtime_dir=home / "runtime",
52
- launcher_path=launcher_path,
53
- )
54
-
55
-
56
- def is_initialized(paths: RuntimePaths) -> bool:
57
- return paths.db_path.exists()
58
-
59
-
60
- def write_launcher_home(launcher_path: Path, home: Path) -> None:
61
- launcher_path.parent.mkdir(parents=True, exist_ok=True)
62
- launcher_path.write_text(f'home = "{home}"\n', encoding="utf-8")
63
-
64
-
65
- def _resolve_home(
66
- *,
67
- default_home: Path,
68
- launcher_path: Path,
69
- env: Mapping[str, str],
70
- home_override: str | Path | None,
71
- ) -> Path:
72
- if home_override is not None:
73
- return Path(home_override).expanduser()
74
- env_home = env.get("ADC_HOME")
75
- if env_home:
76
- return Path(env_home).expanduser()
77
- launcher_home = _read_launcher_home(launcher_path)
78
- if launcher_home is not None:
79
- return launcher_home
80
- return default_home
81
-
82
-
83
- def _read_launcher_home(launcher_path: Path) -> Path | None:
84
- if not launcher_path.exists():
85
- return None
86
- data = tomllib.loads(launcher_path.read_text(encoding="utf-8"))
87
- home = data.get("home")
88
- if not isinstance(home, str) or not home.strip():
89
- return None
90
- return Path(home).expanduser()
File without changes
File without changes