superset-cli 0.1.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 (230) hide show
  1. superset_cli-0.1.0/.envrc +4 -0
  2. superset_cli-0.1.0/.github/workflows/ci.yml +53 -0
  3. superset_cli-0.1.0/.github/workflows/publish.yml +79 -0
  4. superset_cli-0.1.0/.gitignore +15 -0
  5. superset_cli-0.1.0/AGENTS.md +235 -0
  6. superset_cli-0.1.0/LICENSE +21 -0
  7. superset_cli-0.1.0/PKG-INFO +288 -0
  8. superset_cli-0.1.0/README.md +272 -0
  9. superset_cli-0.1.0/devenv.lock +65 -0
  10. superset_cli-0.1.0/devenv.nix +47 -0
  11. superset_cli-0.1.0/devenv.yaml +18 -0
  12. superset_cli-0.1.0/docs/architecture/README.md +431 -0
  13. superset_cli-0.1.0/docs/decisions/0001-read-only-bootstrap-scope.md +39 -0
  14. superset_cli-0.1.0/docs/decisions/0002-local-config-and-auth-state-storage.md +37 -0
  15. superset_cli-0.1.0/docs/decisions/0003-browser-login-with-playwright-and-saved-storage-state.md +36 -0
  16. superset_cli-0.1.0/docs/decisions/0004-decision-memory-system.md +61 -0
  17. superset_cli-0.1.0/docs/decisions/0005-architecture-reference-document.md +45 -0
  18. superset_cli-0.1.0/docs/decisions/0006-markdown-ticket-system.md +51 -0
  19. superset_cli-0.1.0/docs/decisions/0007-superset-cli-product-and-package-name.md +42 -0
  20. superset_cli-0.1.0/docs/decisions/0008-cookie-extraction-from-installed-browsers.md +63 -0
  21. superset_cli-0.1.0/docs/decisions/0009-write-command-explicit-opt-in.md +54 -0
  22. superset_cli-0.1.0/docs/decisions/0010-write-scope-expansion.md +64 -0
  23. superset_cli-0.1.0/docs/decisions/0011-custom-api-authentication.md +33 -0
  24. superset_cli-0.1.0/docs/decisions/0011-pypi-release-publishing.md +62 -0
  25. superset_cli-0.1.0/docs/decisions/README.md +70 -0
  26. superset_cli-0.1.0/docs/glossary.md +65 -0
  27. superset_cli-0.1.0/docs/index.md +91 -0
  28. superset_cli-0.1.0/docs/plans/2026-06-05-agents-md-design.md +48 -0
  29. superset_cli-0.1.0/docs/plans/2026-06-05-architecture-doc-maintenance-rule.md +23 -0
  30. superset_cli-0.1.0/docs/plans/2026-06-05-architecture-overview-doc.md +24 -0
  31. superset_cli-0.1.0/docs/plans/2026-06-05-architecture-reference-adr.md +23 -0
  32. superset_cli-0.1.0/docs/plans/2026-06-05-decision-citation-in-final-reporting.md +23 -0
  33. superset_cli-0.1.0/docs/plans/2026-06-05-decision-memory-for-agents.md +27 -0
  34. superset_cli-0.1.0/docs/plans/2026-06-05-docs-index-maintenance-rule.md +23 -0
  35. superset_cli-0.1.0/docs/plans/2026-06-05-docs-index.md +24 -0
  36. superset_cli-0.1.0/docs/plans/2026-06-05-document-decision-memory-system.md +23 -0
  37. superset_cli-0.1.0/docs/plans/2026-06-05-plan-decision-follow-up-rule.md +24 -0
  38. superset_cli-0.1.0/docs/plans/2026-06-05-read-only-next-steps.md +235 -0
  39. superset_cli-0.1.0/docs/plans/2026-06-05-repository-glossary.md +24 -0
  40. superset_cli-0.1.0/docs/plans/2026-06-05-reusable-documentation-templates.md +24 -0
  41. superset_cli-0.1.0/docs/plans/2026-06-05-superset-agent-cli-bootstrap.md +115 -0
  42. superset_cli-0.1.0/docs/plans/2026-06-06-additional-missing-feature-tickets.md +24 -0
  43. superset_cli-0.1.0/docs/plans/2026-06-06-api-key-auth-design.md +110 -0
  44. superset_cli-0.1.0/docs/plans/2026-06-06-auth-login-browser-flag.md +57 -0
  45. superset_cli-0.1.0/docs/plans/2026-06-06-auth-relogin-helper.md +32 -0
  46. superset_cli-0.1.0/docs/plans/2026-06-06-auth-roadmap-tickets.md +23 -0
  47. superset_cli-0.1.0/docs/plans/2026-06-06-auth-session-expiry-reporting.md +35 -0
  48. superset_cli-0.1.0/docs/plans/2026-06-06-auth-ticket-corrections.md +23 -0
  49. superset_cli-0.1.0/docs/plans/2026-06-06-chart-data-fetch.md +38 -0
  50. superset_cli-0.1.0/docs/plans/2026-06-06-current-user-and-instance-metadata-reads.md +48 -0
  51. superset_cli-0.1.0/docs/plans/2026-06-06-dashboard-related-resources.md +113 -0
  52. superset_cli-0.1.0/docs/plans/2026-06-06-database-schema-and-table-discovery.md +107 -0
  53. superset_cli-0.1.0/docs/plans/2026-06-06-default-instance-selection.md +71 -0
  54. superset_cli-0.1.0/docs/plans/2026-06-06-direnv-auto-activation.md +68 -0
  55. superset_cli-0.1.0/docs/plans/2026-06-06-evaluate-markdown-docs-verification.md +46 -0
  56. superset_cli-0.1.0/docs/plans/2026-06-06-explore-read-surface-design.md +45 -0
  57. superset_cli-0.1.0/docs/plans/2026-06-06-github-actions-ci.md +87 -0
  58. superset_cli-0.1.0/docs/plans/2026-06-06-guest-token-auth-research.md +52 -0
  59. superset_cli-0.1.0/docs/plans/2026-06-06-jwt-auth-design.md +110 -0
  60. superset_cli-0.1.0/docs/plans/2026-06-06-list-filtering-and-ordering.md +121 -0
  61. superset_cli-0.1.0/docs/plans/2026-06-06-markdown-ticket-system.md +37 -0
  62. superset_cli-0.1.0/docs/plans/2026-06-06-missing-feature-tickets.md +24 -0
  63. superset_cli-0.1.0/docs/plans/2026-06-06-more-superset-api-gap-tickets.md +23 -0
  64. superset_cli-0.1.0/docs/plans/2026-06-06-openapi-spec-fetch.md +108 -0
  65. superset_cli-0.1.0/docs/plans/2026-06-06-phase-1-list-get-resources.md +55 -0
  66. superset_cli-0.1.0/docs/plans/2026-06-06-phase-2-special-reads.md +34 -0
  67. superset_cli-0.1.0/docs/plans/2026-06-06-read-only-export-commands.md +51 -0
  68. superset_cli-0.1.0/docs/plans/2026-06-06-replace-playwright-with-cookie-extraction.md +89 -0
  69. superset_cli-0.1.0/docs/plans/2026-06-06-retrospective-feature-tickets.md +26 -0
  70. superset_cli-0.1.0/docs/plans/2026-06-06-security-read-surface-design.md +65 -0
  71. superset_cli-0.1.0/docs/plans/2026-06-06-superset-cli-rename.md +115 -0
  72. superset_cli-0.1.0/docs/plans/2026-06-06-write-command-rollout.md +56 -0
  73. superset_cli-0.1.0/docs/plans/2026-06-08-dashboard-layout-structure.md +24 -0
  74. superset_cli-0.1.0/docs/plans/2026-08-26-csrf-write-requests.md +26 -0
  75. superset_cli-0.1.0/docs/plans/2026-08-27-auth-login-auto-fallback.md +26 -0
  76. superset_cli-0.1.0/docs/plans/2026-08-27-auth-login-live-validation.md +29 -0
  77. superset_cli-0.1.0/docs/plans/2026-10-02-ansi-help-test.md +42 -0
  78. superset_cli-0.1.0/docs/plans/2026-10-02-api-command.md +26 -0
  79. superset_cli-0.1.0/docs/plans/2026-10-02-artifact-node24.md +40 -0
  80. superset_cli-0.1.0/docs/plans/2026-10-02-pypi-release.md +86 -0
  81. superset_cli-0.1.0/docs/plans/2026-10-05-public-content-rule.md +23 -0
  82. superset_cli-0.1.0/docs/plans/README.md +58 -0
  83. superset_cli-0.1.0/docs/templates/README.md +21 -0
  84. superset_cli-0.1.0/docs/templates/decision-record-template.md +23 -0
  85. superset_cli-0.1.0/docs/templates/final-report-template.md +25 -0
  86. superset_cli-0.1.0/docs/templates/plan-template.md +20 -0
  87. superset_cli-0.1.0/docs/tickets/README.md +78 -0
  88. superset_cli-0.1.0/docs/tickets/done/.gitkeep +0 -0
  89. superset_cli-0.1.0/docs/tickets/done/2026-06-06-annotation-layer-read-commands.md +23 -0
  90. superset_cli-0.1.0/docs/tickets/done/2026-06-06-api-key-auth-design.md +23 -0
  91. superset_cli-0.1.0/docs/tickets/done/2026-06-06-asset-import-write-commands.md +27 -0
  92. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-login-browser-flag.md +23 -0
  93. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-login.md +22 -0
  94. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-logout.md +22 -0
  95. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-path-derivation-helpers.md +22 -0
  96. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-session-expiry-reporting.md +23 -0
  97. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-state-removal-helper.md +22 -0
  98. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-status-inspection-helper.md +22 -0
  99. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-status.md +22 -0
  100. superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-validate.md +22 -0
  101. superset_cli-0.1.0/docs/tickets/done/2026-06-06-base-url-validation-and-normalization.md +22 -0
  102. superset_cli-0.1.0/docs/tickets/done/2026-06-06-browser-login-persistent-context-flow.md +22 -0
  103. superset_cli-0.1.0/docs/tickets/done/2026-06-06-chart-data-fetch.md +23 -0
  104. superset_cli-0.1.0/docs/tickets/done/2026-06-06-chart-write-commands.md +27 -0
  105. superset_cli-0.1.0/docs/tickets/done/2026-06-06-charts-get.md +22 -0
  106. superset_cli-0.1.0/docs/tickets/done/2026-06-06-charts-list.md +22 -0
  107. superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-api-error-mapping.md +22 -0
  108. superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-entrypoint-delegation.md +22 -0
  109. superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-help.md +22 -0
  110. superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-instance-resolution-guard.md +22 -0
  111. superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-storage-state-guard.md +22 -0
  112. superset_cli-0.1.0/docs/tickets/done/2026-06-06-config-instance-lookup.md +22 -0
  113. superset_cli-0.1.0/docs/tickets/done/2026-06-06-config-instance-upsert-and-remove.md +22 -0
  114. superset_cli-0.1.0/docs/tickets/done/2026-06-06-config-load-and-save.md +22 -0
  115. superset_cli-0.1.0/docs/tickets/done/2026-06-06-cookie-header-construction.md +22 -0
  116. superset_cli-0.1.0/docs/tickets/done/2026-06-06-css-template-read-commands.md +23 -0
  117. superset_cli-0.1.0/docs/tickets/done/2026-06-06-current-user-and-instance-metadata-reads.md +23 -0
  118. superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboard-related-resources.md +23 -0
  119. superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboard-write-commands.md +27 -0
  120. superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboards-get.md +22 -0
  121. superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboards-list.md +22 -0
  122. superset_cli-0.1.0/docs/tickets/done/2026-06-06-database-schema-and-table-discovery.md +23 -0
  123. superset_cli-0.1.0/docs/tickets/done/2026-06-06-database-write-commands.md +27 -0
  124. superset_cli-0.1.0/docs/tickets/done/2026-06-06-databases-get.md +22 -0
  125. superset_cli-0.1.0/docs/tickets/done/2026-06-06-databases-list.md +22 -0
  126. superset_cli-0.1.0/docs/tickets/done/2026-06-06-dataset-related-objects.md +23 -0
  127. superset_cli-0.1.0/docs/tickets/done/2026-06-06-dataset-write-commands.md +27 -0
  128. superset_cli-0.1.0/docs/tickets/done/2026-06-06-datasets-get.md +22 -0
  129. superset_cli-0.1.0/docs/tickets/done/2026-06-06-datasets-list.md +22 -0
  130. superset_cli-0.1.0/docs/tickets/done/2026-06-06-datasource-column-value-reads.md +23 -0
  131. superset_cli-0.1.0/docs/tickets/done/2026-06-06-default-instance-selection.md +23 -0
  132. superset_cli-0.1.0/docs/tickets/done/2026-06-06-embedded-dashboard-read-commands.md +23 -0
  133. superset_cli-0.1.0/docs/tickets/done/2026-06-06-evaluate-markdown-docs-verification.md +23 -0
  134. superset_cli-0.1.0/docs/tickets/done/2026-06-06-explore-read-surface-design.md +23 -0
  135. superset_cli-0.1.0/docs/tickets/done/2026-06-06-guest-token-auth-research.md +23 -0
  136. superset_cli-0.1.0/docs/tickets/done/2026-06-06-instances-add.md +22 -0
  137. superset_cli-0.1.0/docs/tickets/done/2026-06-06-instances-list.md +22 -0
  138. superset_cli-0.1.0/docs/tickets/done/2026-06-06-instances-remove.md +22 -0
  139. superset_cli-0.1.0/docs/tickets/done/2026-06-06-jwt-auth-design.md +23 -0
  140. superset_cli-0.1.0/docs/tickets/done/2026-06-06-list-filtering-and-ordering.md +23 -0
  141. superset_cli-0.1.0/docs/tickets/done/2026-06-06-logs-and-recent-activity-reads.md +23 -0
  142. superset_cli-0.1.0/docs/tickets/done/2026-06-06-openapi-spec-fetch.md +23 -0
  143. superset_cli-0.1.0/docs/tickets/done/2026-06-06-permalink-resolution-reads.md +23 -0
  144. superset_cli-0.1.0/docs/tickets/done/2026-06-06-query-history-read-commands.md +23 -0
  145. superset_cli-0.1.0/docs/tickets/done/2026-06-06-read-only-export-commands.md +23 -0
  146. superset_cli-0.1.0/docs/tickets/done/2026-06-06-replace-playwright-with-cookie-extraction.md +33 -0
  147. superset_cli-0.1.0/docs/tickets/done/2026-06-06-report-schedule-read-commands.md +23 -0
  148. superset_cli-0.1.0/docs/tickets/done/2026-06-06-saved-queries-read-commands.md +23 -0
  149. superset_cli-0.1.0/docs/tickets/done/2026-06-06-saved-query-write-commands.md +27 -0
  150. superset_cli-0.1.0/docs/tickets/done/2026-06-06-security-admin-write-commands.md +27 -0
  151. superset_cli-0.1.0/docs/tickets/done/2026-06-06-security-read-surface-design.md +23 -0
  152. superset_cli-0.1.0/docs/tickets/done/2026-06-06-sqllab-write-commands.md +27 -0
  153. superset_cli-0.1.0/docs/tickets/done/2026-06-06-storage-state-loading.md +22 -0
  154. superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-http-error-mapping.md +22 -0
  155. superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-lifecycle.md +22 -0
  156. superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-list-pagination-forwarding.md +22 -0
  157. superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-pagination-param-builder.md +22 -0
  158. superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-param-forwarding.md +22 -0
  159. superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-result-unwrapping.md +22 -0
  160. superset_cli-0.1.0/docs/tickets/done/2026-06-06-tags-and-themes-write-commands.md +27 -0
  161. superset_cli-0.1.0/docs/tickets/done/2026-06-06-tags-read-commands.md +23 -0
  162. superset_cli-0.1.0/docs/tickets/done/2026-06-06-theme-read-commands.md +23 -0
  163. superset_cli-0.1.0/docs/tickets/done/2026-06-06-write-scope-expansion-decision.md +27 -0
  164. superset_cli-0.1.0/docs/tickets/done/2026-08-26-csrf-write-requests.md +23 -0
  165. superset_cli-0.1.0/docs/tickets/done/2026-08-27-auth-login-auto-fallback.md +24 -0
  166. superset_cli-0.1.0/docs/tickets/done/2026-08-27-auth-login-live-validation.md +24 -0
  167. superset_cli-0.1.0/docs/tickets/in-progress/.gitkeep +0 -0
  168. superset_cli-0.1.0/docs/tickets/template.md +27 -0
  169. superset_cli-0.1.0/docs/tickets/todo/.gitkeep +0 -0
  170. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-api-key-auth-support.md +23 -0
  171. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-charts-data-csv-output.md +30 -0
  172. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-charts-data-empty-payload-exit.md +31 -0
  173. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-charts-data-filter-override.md +33 -0
  174. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-default-instance-selection-implementation.md +26 -0
  175. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-docs-relative-link-check.md +22 -0
  176. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-explore-read-commands.md +23 -0
  177. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-jwt-auth-support.md +23 -0
  178. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-read-only-export-commands-implementation.md +30 -0
  179. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-security-rls-read-commands.md +23 -0
  180. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-security-roles-read-commands.md +23 -0
  181. superset_cli-0.1.0/docs/tickets/todo/2026-06-06-security-users-read-commands.md +23 -0
  182. superset_cli-0.1.0/docs/tickets/todo/2026-08-27-session-scoped-cookie-unreadable-from-firefox-zen.md +55 -0
  183. superset_cli-0.1.0/pyproject.toml +34 -0
  184. superset_cli-0.1.0/scripts/dev-superset-import-snowflake.sh +197 -0
  185. superset_cli-0.1.0/scripts/dev-superset.sh +67 -0
  186. superset_cli-0.1.0/src/superset_cli/__init__.py +3 -0
  187. superset_cli-0.1.0/src/superset_cli/auth.py +243 -0
  188. superset_cli-0.1.0/src/superset_cli/cli.py +2282 -0
  189. superset_cli-0.1.0/src/superset_cli/client.py +652 -0
  190. superset_cli-0.1.0/src/superset_cli/config.py +41 -0
  191. superset_cli-0.1.0/src/superset_cli/main.py +9 -0
  192. superset_cli-0.1.0/src/superset_cli/models.py +20 -0
  193. superset_cli-0.1.0/tests/conftest.py +46 -0
  194. superset_cli-0.1.0/tests/fakes.py +302 -0
  195. superset_cli-0.1.0/tests/test_annotation_layers.py +84 -0
  196. superset_cli-0.1.0/tests/test_api.py +155 -0
  197. superset_cli-0.1.0/tests/test_auth.py +512 -0
  198. superset_cli-0.1.0/tests/test_auth_logout.py +114 -0
  199. superset_cli-0.1.0/tests/test_auth_status.py +144 -0
  200. superset_cli-0.1.0/tests/test_auth_validate.py +135 -0
  201. superset_cli-0.1.0/tests/test_chart_data.py +57 -0
  202. superset_cli-0.1.0/tests/test_charts.py +211 -0
  203. superset_cli-0.1.0/tests/test_charts_get.py +128 -0
  204. superset_cli-0.1.0/tests/test_charts_update_clear_qc.py +75 -0
  205. superset_cli-0.1.0/tests/test_cli.py +55 -0
  206. superset_cli-0.1.0/tests/test_client.py +448 -0
  207. superset_cli-0.1.0/tests/test_config.py +31 -0
  208. superset_cli-0.1.0/tests/test_css_templates.py +84 -0
  209. superset_cli-0.1.0/tests/test_dashboards.py +211 -0
  210. superset_cli-0.1.0/tests/test_dashboards_diff.py +72 -0
  211. superset_cli-0.1.0/tests/test_dashboards_get.py +357 -0
  212. superset_cli-0.1.0/tests/test_databases.py +211 -0
  213. superset_cli-0.1.0/tests/test_databases_get.py +504 -0
  214. superset_cli-0.1.0/tests/test_datasets.py +211 -0
  215. superset_cli-0.1.0/tests/test_datasets_get.py +128 -0
  216. superset_cli-0.1.0/tests/test_instances_add.py +54 -0
  217. superset_cli-0.1.0/tests/test_instances_remove.py +79 -0
  218. superset_cli-0.1.0/tests/test_logs.py +114 -0
  219. superset_cli-0.1.0/tests/test_me.py +244 -0
  220. superset_cli-0.1.0/tests/test_openapi.py +144 -0
  221. superset_cli-0.1.0/tests/test_phase2_special_reads.py +163 -0
  222. superset_cli-0.1.0/tests/test_queries.py +84 -0
  223. superset_cli-0.1.0/tests/test_release_workflow.py +83 -0
  224. superset_cli-0.1.0/tests/test_repo_files.py +47 -0
  225. superset_cli-0.1.0/tests/test_reports.py +85 -0
  226. superset_cli-0.1.0/tests/test_saved_queries.py +84 -0
  227. superset_cli-0.1.0/tests/test_tags.py +85 -0
  228. superset_cli-0.1.0/tests/test_themes.py +84 -0
  229. superset_cli-0.1.0/tests/test_writes.py +274 -0
  230. superset_cli-0.1.0/uv.lock +531 -0
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+
3
+ eval "$(devenv direnvrc)"
4
+ use devenv
@@ -0,0 +1,53 @@
1
+ name: CI
2
+
3
+ "on":
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ concurrency:
10
+ group: ci-${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ test:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version:
23
+ - "3.12"
24
+ - "3.13"
25
+
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
37
+ with:
38
+ enable-cache: true
39
+
40
+ - name: Install project dependencies
41
+ run: uv sync --locked --group dev
42
+
43
+ - name: Run test suite
44
+ run: uv run pytest -v
45
+
46
+ - name: Smoke-test CLI help
47
+ run: uv run superset-cli --help
48
+
49
+ - name: Build distributions
50
+ run: uv build
51
+
52
+ - name: Smoke-test built wheel
53
+ run: uv run --isolated --no-project --with dist/*.whl superset-cli --help
@@ -0,0 +1,79 @@
1
+ name: Build and publish
2
+
3
+ "on":
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: publish-${{ github.ref }}
13
+ cancel-in-progress: false
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
21
+ with:
22
+ persist-credentials: false
23
+ - name: Set up Python
24
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
25
+ with:
26
+ python-version: "3.12"
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
29
+ with:
30
+ enable-cache: true
31
+ - name: Check release version
32
+ if: github.event_name == 'release'
33
+ env:
34
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
35
+ run: |
36
+ python - <<'PY'
37
+ import os
38
+ import tomllib
39
+ from pathlib import Path
40
+
41
+ version = tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"]
42
+ tag = os.environ["RELEASE_TAG"]
43
+ if tag != f"v{version}":
44
+ raise SystemExit(f"Release tag {tag!r} does not match package version {version!r}; expected v{version}")
45
+ PY
46
+ - name: Install project dependencies
47
+ run: uv sync --locked --group dev
48
+ - name: Run test suite
49
+ run: uv run pytest -v
50
+ - name: Build distributions
51
+ run: uv build
52
+ - name: Smoke-test built wheel and source distribution
53
+ run: |
54
+ uv run --isolated --no-project --with dist/*.whl superset-cli --help
55
+ uv run --isolated --no-project --with dist/*.tar.gz superset-cli --help
56
+ - name: Store distributions
57
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
58
+ with:
59
+ name: distributions
60
+ path: dist/
61
+ if-no-files-found: error
62
+
63
+ publish:
64
+ if: github.event_name == 'release'
65
+ needs: build
66
+ runs-on: ubuntu-latest
67
+ environment:
68
+ name: pypi
69
+ url: https://pypi.org/p/superset-cli
70
+ permissions:
71
+ id-token: write
72
+ steps:
73
+ - name: Download distributions
74
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
75
+ with:
76
+ name: distributions
77
+ path: dist/
78
+ - name: Publish to PyPI
79
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
@@ -0,0 +1,15 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+
6
+ # Devenv
7
+ .devenv*
8
+ devenv.local.nix
9
+ devenv.local.yaml
10
+
11
+ # direnv
12
+ .direnv
13
+
14
+ # pre-commit
15
+ .pre-commit-config.yaml
@@ -0,0 +1,235 @@
1
+ # AGENTS.md
2
+
3
+ ## Mission
4
+
5
+ This repository builds `superset-cli`, a CLI for self-hosted Apache Superset.
6
+
7
+ Current product scope is **read-only**:
8
+ - local instance config management
9
+ - Playwright-based browser login scaffold
10
+ - saved auth-state inspection and validation
11
+ - read-only Superset REST access for dashboards, charts, datasets, and databases
12
+
13
+ Do not expand the product beyond read-only behavior unless the user explicitly asks for it.
14
+
15
+ ## Instruction priority
16
+
17
+ Follow instructions in this order:
18
+ 1. explicit user request
19
+ 2. this file
20
+ 3. README and nearby docs
21
+ 4. existing code patterns
22
+
23
+ If instructions conflict or the safest path is unclear, stop and ask.
24
+
25
+ ## Project map
26
+
27
+ - `src/superset_cli/` — application code
28
+ - `tests/` — pytest suite; treat tests as executable spec
29
+ - `docs/index.md` — top-level map of repository documentation
30
+ - `docs/glossary.md` — repository-specific terminology used in docs, plans, and architecture notes
31
+ - `docs/templates/` — reusable templates for plans, decision records, and final reports
32
+ - `docs/plans/` — written plans and design notes
33
+ - `docs/tickets/` — lightweight Markdown ticket system for repo work tracking
34
+ - `docs/decisions/` — durable decision log; this is the primary "why" memory for future agents
35
+ - `docs/architecture/` — structural map of the codebase; use this for module responsibilities and command-to-code entry points
36
+ - `README.md` — human-oriented project overview and commands
37
+ - `pyproject.toml` — dependencies, packaging, Python version
38
+ - `devenv.nix` / `devenv.yaml` — local development environment
39
+
40
+ ## Environment and working commands
41
+
42
+ Prefer these commands:
43
+
44
+ ```bash
45
+ devenv shell
46
+ uv sync --group dev
47
+ uv run pytest -v
48
+ uv run pytest tests/test_cli.py -v
49
+ uv run superset-cli --help
50
+ uv build
51
+ ```
52
+
53
+ The CLI reads Superset session cookies directly from an installed browser via `browser-cookie3` — no extra browser install step is required.
54
+
55
+ Use `uv` to run Python commands. Prefer `devenv shell` before development work.
56
+
57
+ ## Golden workflow (mandatory)
58
+
59
+ For any task beyond a tiny docs edit:
60
+
61
+ 1. **Research first.** Check relevant docs, APIs, libraries, and existing repo patterns before changing code.
62
+ 2. **Read first.** Read all relevant files immediately before referencing or editing them. Read nearby tests before implementation. Read relevant files in `docs/decisions/` before planning or changing behavior. Read `docs/index.md` when you need the top-level documentation map. Read `docs/glossary.md` when repository-specific terminology is unclear. Read `docs/templates/README.md` when you need repository-approved doc templates. Read `docs/architecture/README.md` when you need the current structural map of modules, commands, and tests.
63
+ 3. **Plan first.** Write a short plan to `docs/plans/YYYY-MM-DD-<topic>.md` before any non-trivial change. Every plan must end with a `Decision follow-up` section that says either `Decision record update required:` with the target file(s), or `No durable decision change.`
64
+ 4. **TDD always.** Write or update a failing test first.
65
+ 5. **Implement minimally.** Make the smallest change that satisfies the test and the request.
66
+ 6. **Verify incrementally.** Run focused tests first, then broader verification.
67
+ 7. **Capture durable reasoning.** If you made or changed a lasting technical decision, add or update a record in `docs/decisions/` and link it from the plan.
68
+ 8. **Report evidence only.** Never claim success without command output or other concrete evidence.
69
+
70
+ ## TDD rules
71
+
72
+ TDD is required for all code changes.
73
+
74
+ - Start by adding or updating tests in `tests/`.
75
+ - Confirm the new or changed test fails for the expected reason.
76
+ - Implement the minimum code needed to make it pass.
77
+ - Re-run the targeted test, then the broader suite.
78
+ - Never remove, weaken, or bypass a test just to get green results.
79
+
80
+ For CLI changes:
81
+ - test both human-readable output and `--json` output when applicable
82
+ - preserve existing JSON output shape unless the contract is intentionally changed
83
+ - when changing the contract, update tests and docs in the same task
84
+
85
+ ## Decision memory rules
86
+
87
+ - Treat `docs/decisions/` as the canonical long-term memory for why this repository works the way it does.
88
+ - Before planning or implementation, read the most relevant decision record(s) for the area you are changing.
89
+ - Use `docs/plans/` for proposed work and temporary reasoning.
90
+ - Every non-trivial plan must include a final `Decision follow-up` section with one of two outcomes: `Decision record update required:` or `No durable decision change.`
91
+ - Promote any durable outcome from a plan into `docs/decisions/`.
92
+ - Keep one decision per file with stable headings such as `Status`, `Context`, `Decision`, `Consequences`, and `Alternatives considered`.
93
+ - Cross-link decision records to relevant plans, code paths, and tests when possible.
94
+ - Do not bury important rationale only in chat, commit messages, or code comments.
95
+
96
+ ## Markdown ticket system
97
+
98
+ - Use `docs/tickets/` for lightweight repo work tracking.
99
+ - Ticket folders are the primary workflow state:
100
+ - `docs/tickets/todo/`
101
+ - `docs/tickets/in-progress/`
102
+ - `docs/tickets/done/`
103
+ - Every ticket must also include a `Status:` field that matches its folder.
104
+ - Agents may create tickets proactively for code, docs, plans, decisions, cleanup, research, and follow-up work.
105
+ - Before creating a ticket, check `docs/tickets/` for an obvious duplicate.
106
+ - If an existing ticket clearly covers the same work, update that ticket instead of creating a new one.
107
+ - If overlap is uncertain, create a new ticket and cross-link related tickets.
108
+ - Keep tickets small and actionable; split broad work into multiple tickets.
109
+ - Starting work on a ticket should move it to `in-progress/`.
110
+ - Finishing work on a ticket should move it to `done/`.
111
+ - Tickets capture what should be done. They do not replace `docs/plans/` for non-trivial implementation planning or `docs/decisions/` for durable rationale.
112
+
113
+ ## Coding rules
114
+
115
+ - Prefer extending existing patterns in `cli.py`, `client.py`, `config.py`, `auth.py`, and `models.py`.
116
+ - Keep diffs small and focused.
117
+ - Avoid speculative abstractions and broad refactors.
118
+ - Do not mix unrelated fixes in one change.
119
+ - Preserve current read-only posture unless explicitly asked to change it.
120
+ - If command behavior, UX, or examples change, update `README.md`.
121
+ - If a new top-level documentation area is added, or an existing documentation layer changes role, update `docs/index.md` in the same workstream.
122
+ - If repository-specific terminology changes or important new local terms appear, update `docs/glossary.md` in the same workstream.
123
+ - If repository documentation templates change or new canonical templates are added, update `docs/templates/README.md` in the same workstream.
124
+ - If command-to-code mappings, major module responsibilities, or common structural entry points change, update `docs/architecture/README.md` in the same workstream.
125
+
126
+ ## Verification checklist
127
+
128
+ Before declaring a code task complete, run the relevant checks.
129
+
130
+ Minimum expected verification for most code changes:
131
+
132
+ ```bash
133
+ uv run pytest -v
134
+ uv run superset-cli --help
135
+ uv build
136
+ ```
137
+
138
+ Also run the most specific targeted test(s) for the area you changed, for example:
139
+
140
+ ```bash
141
+ uv run pytest tests/test_cli.py -v
142
+ uv run pytest tests/test_auth.py -v
143
+ ```
144
+
145
+ If you changed CLI behavior, include at least one manual command smoke check.
146
+
147
+ ## Live Superset, auth, and browser safety
148
+
149
+ Live verification is allowed, but guarded.
150
+
151
+ - Prefer local tests, mocks, and fixtures first.
152
+ - Use a real Superset instance only when needed for validation.
153
+ - Keep all live-instance actions read-only unless the user explicitly authorizes otherwise.
154
+ - Log the exact commands used for live verification.
155
+ - Announce browser-based login before launching it.
156
+ - Treat browser profiles, cookies, and `storage-state.json` as sensitive.
157
+ - Never commit credentials, auth state, browser profiles, or secrets.
158
+ - Use `/tmp` for temporary files and scratch artifacts.
159
+
160
+ ## Public repository content
161
+
162
+ This repository and its source distribution are public. Everything committed, including docs, plans, tickets, tests, fixtures, commit messages, and PR descriptions, must be free of employer- or customer-specific details.
163
+
164
+ - Use the example company `Example Corp` and reserved example domains (`example.com`, `superset.example.com`, `superset-staging.example.com`) instead of real company names, hostnames, or SSO setups.
165
+ - Do not quote real instance data: dashboard, chart, dataset, or database names, IDs, user names, or emails taken from a live Superset. Replace them with neutral examples before committing.
166
+ - Redact cookie values, tokens, and other credentials in captured command output (for example `session=<redacted>`).
167
+ - When live verification against a real instance informs a doc or ticket, describe the behavior, not the instance.
168
+
169
+ ## Ask-first boundaries
170
+
171
+ Ask before:
172
+ - adding or changing dependencies
173
+ - changing CLI defaults or JSON output contracts
174
+ - changing packaging, build, or `devenv` behavior
175
+ - expanding from read-only into write-capable Superset operations
176
+ - making broad architectural refactors
177
+ - running live verification that goes beyond minimal read-only checks
178
+
179
+ ## Write-command contract
180
+
181
+ Every CLI command that mutates Superset state (create, update, delete via the API) must require an explicit `--allow-write` flag on every invocation. Default off.
182
+
183
+ Rules:
184
+ - `--allow-write` is per-invocation. It is never persisted in the config file, never read from an environment variable, and never defaulted on.
185
+ - Without the flag, the command exits non-zero with a message naming the missing flag and the mutation it would have performed (for example: `"This would delete dashboard 7. Re-run with --allow-write to perform the write."`).
186
+ - The check lives in a shared helper in `src/superset_cli/cli.py` so individual commands cannot forget it.
187
+ - Help text for every write command must state "Required to actually perform the write. Without it the command is a dry-run."
188
+ - The check applies to every write command, including ones that look idempotent (for example setting a tag).
189
+ - `--allow-write` is never granted by a confirmation prompt, a config flag, or a parent command — only by the literal CLI argument on the same invocation.
190
+
191
+ This rule exists so that unintended write calls (typos, copy-paste mistakes, agent overshoot) fail safe, human and agent operators see the same friction, and the read-only product posture remains visible in every write surface that ever gets added.
192
+
193
+ See [`docs/decisions/0009-write-command-explicit-opt-in.md`](docs/decisions/0009-write-command-explicit-opt-in.md) for the full rationale and alternatives considered.
194
+
195
+ ## Never do these things
196
+
197
+ - never fabricate results
198
+ - never claim tests passed without running them
199
+ - never claim a file contains something you did not re-read
200
+ - never remove tests or checks to make the suite pass
201
+ - never commit secrets, auth state, or browser profile data
202
+ - never use `git push`
203
+ - never create a pull request or merge request
204
+ - never perform destructive or write actions against Superset without explicit user instruction
205
+
206
+ ## Definition of done
207
+
208
+ A task is not done until all relevant items below are true:
209
+
210
+ - a written plan exists for any non-trivial change
211
+ - the plan ends with a `Decision follow-up` section
212
+ - failing tests were written first
213
+ - implementation is minimal and scoped
214
+ - targeted tests pass
215
+ - `uv run pytest -v` passes for code changes
216
+ - relevant smoke checks were run
217
+ - docs were updated if behavior or workflow changed
218
+ - `docs/index.md` was updated if top-level documentation areas or doc roles changed
219
+ - `docs/architecture/README.md` was updated if structural mappings or module responsibilities changed
220
+ - decision records were added or updated if durable technical choices changed
221
+ - the final report includes:
222
+ - files changed
223
+ - commands run
224
+ - actual verification results
225
+ - consulted decision records, or an explicit statement that none were relevant
226
+ - any remaining risks or unverified areas
227
+
228
+ ## When stuck
229
+
230
+ If progress stalls:
231
+ - stop and summarize what is known
232
+ - identify the exact uncertainty
233
+ - research or inspect the narrow missing piece
234
+ - prefer a smaller verified change over a larger speculative one
235
+ - ask the user when a decision affects scope, contract, or risk
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Robin Rittsteiger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.