Task 0.1.4: CLI Context Management (attach, detach)
Title: Implement dataset context attachment for CLI sessions
Description:
The CLI should maintain a "current context" (attached dataset) that persists across commands within a session. This enables workflows like: attach to orders table → ask questions → see lineage → export results.
Why: Without context, every command requires repeating dataset identifiers. Context management makes the CLI feel like a proper development environment.
Acceptance Criteria:
Key Design Notes:
- Context file is JSON with schema version for forward compatibility
- URN resolution uses
GET /api/v1/asset-instances/search
- SQL attachment creates virtual context with inferred schema
Key APIs:
GET /api/v1/asset-instances/search (exists)
GET /api/v1/datasources/{id}/schema (exists)
Dependencies:
- None (can be built independently)
Risks + Mitigations:
- Risk: Stale context after schema changes → Mitigation: Warn if schema changed since attachment
Effort: S (2-3 days)
Designation: OSS
Task 0.1.4: CLI Context Management (
attach,detach)Title: Implement dataset context attachment for CLI sessions
Description:
The CLI should maintain a "current context" (attached dataset) that persists across commands within a session. This enables workflows like: attach to orders table → ask questions → see lineage → export results.
Why: Without context, every command requires repeating dataset identifiers. Context management makes the CLI feel like a proper development environment.
Acceptance Criteria:
dataing ds attach <dataset_id>sets current contextdataing ds attach <urn>resolves URN to datasetdataing ds attach --sql "SELECT..." --datasource <id>attaches from SQLdataing ds detachclears contextdataing ds currentshows current context with details~/.dataing/context.json--no-contextflag on any command ignores saved contextKey Design Notes:
GET /api/v1/asset-instances/searchKey APIs:
GET /api/v1/asset-instances/search(exists)GET /api/v1/datasources/{id}/schema(exists)Dependencies:
Risks + Mitigations:
Effort: S (2-3 days)
Designation: OSS