{"id":18646775,"url":"https://github.com/metabase/metabook","last_synced_at":"2026-02-07T14:31:10.015Z","repository":{"id":142262765,"uuid":"499621876","full_name":"metabase/metabook","owner":"metabase","description":"Clerk Notebooks + Metabase","archived":false,"fork":false,"pushed_at":"2022-06-03T19:09:17.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-23T00:24:39.366Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metabase.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-03T19:03:31.000Z","updated_at":"2024-06-18T13:57:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"f22962f4-61dc-43bc-bdb9-1404bf5f2679","html_url":"https://github.com/metabase/metabook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metabase/metabook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabase","download_url":"https://codeload.github.com/metabase/metabook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29197022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T12:38:28.597Z","status":"ssl_error","status_checked_at":"2026-02-07T12:38:23.888Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:22:31.755Z","updated_at":"2026-02-07T14:31:09.978Z","avatar_url":"https://github.com/metabase.png","language":"Clojure","funding_links":[],"categories":["Metabase Examples"],"sub_categories":["Official Examples"],"readme":"# metabook\n\nAdam\\'s collection of notes, useful dev namespaces, and important\nlessons while working at and with Metabase 😁\n\nThis project has a lose and evolving structure, but the basics are:\n\n-   this org file contains the deps and clerk server notes and code to\n    get things going.\n-   other helpful functions and namespaces may be defined here as time\n    goes on.\n-   there is a list of notebooks here which link to the `./notebooks`\n    folder. This is where specific project notebooks should go.\n-   all useful sources are tangled into `./src/metabook`, these can then\n    be loaded by other notebooks.\n\nThis might also be useful as a starting point for other Metabase devs to\nset up Clerk for themselves.\n\n# setup\n\n## prereqs\n\nSome basics for your dev setup should be handled outside of this\nproject.\n\n-   have your own gitignore in `~/.config/git/ignore` and include:\n\n    -   .clerk/\n\n-   clone this repository into `metabase/local/src/nocommit/`\n\n-   if you are writing in .org files, consider using an elisp function\n    to auto-generate .md files from .org:\n\n    ``` elisp\n    (defun export-md-on-save-org-mode-file ()\n      (let ((filename\n            (buffer-file-name)))\n        (when (and (string-match-p\n                    (regexp-quote \".org\") (message \"%s\" (current-buffer)))\n                   (not (string-match-p\n                         (regexp-quote \"[\") (message \"%s\" (current-buffer)))))\n          (shell-command\n           (concat \"pandoc -f org -t markdown -o \" filename \".md \" filename)))))\n\n    (add-hook 'after-save-hook 'export-md-on-save-org-mode-file)\n    ```\n\n    -   notice that this uses `pandoc`, so that will need to be\n        installed on your system. This is done because Org\\'s .md\n        exporter doesn\\'t play nicely with Clerk at the moment (code\n        blocks don\\'t end up being recognized as blocks to run/syntax\n        highlight).\n\n-   set up your deps according to the next section.\n\n## deps\n\nI want to use clerk inside the entire working app of Metabase. To have\nthe necessary deps load up with the Metabase source without changing any\nof the Metabase dependencies, I\\'ve got the following aliases in\n\\~\\~./clojure/deps.edn\\~, which gets merged with every Clojure project\n😎.\n\n``` clojure\n{:aliases\n {:cider/nrepl\n  {:extra-deps {nrepl/nrepl       {:mvn/version #_ \"RELEASE\" \"0.9.0\"}\n                cider/cider-nrepl {:mvn/version #_ \"RELEASE\" \"0.27.4\"}}\n   :main-opts  [\"-m\" \"nrepl.cmdline\"\n                \"--port\" \"54321\"\n                \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}\n\n  :reveal-cider\n  {:extra-deps {vlaaad/reveal     {:mvn/version \"RELEASE\"}\n                nrepl/nrepl       {:mvn/version \"RELEASE\"}\n                cider/cider-nrepl {:mvn/version \"RELEASE\"}}\n   :main-opts  [\"-m\" \"nrepl.cmdline\"\n                \"--port\" \"54321\"\n                \"--middleware\" \"[vlaaad.reveal.nrepl/middleware cider.nrepl/cider-middleware]\"]}\n\n  :clerk\n  {:extra-deps {io.github.nextjournal/clerk {:mvn/version \"RELEASE\"}}}}}\n```\n\n## running\n\nBase the run off of the `metabuild` bash function (borrowed from Dan\nSutton). I\\'ve got the source shown below, and have it copied into my\n`~/.zshrc` file.\n\n``` bash\nmetabuild () {\n    cd $MB_DIR\n    source ${MB_SCRATCH_DIR}/set-env.sh\n    print \"DB: $MB_DB_CONNECTION_URI\"\n    print 'clj -M:dev:ee:ee-dev:drivers:drivers-dev:reveal-cider:clerk'\n    print 'Connect to nrepl server at localhost:54321'\n    clj -M:dev:ee:ee-dev:drivers:drivers-dev:reveal-cider:clerk\n}\n```\n\nThen, in a separate terminal, so that if emacs crashes, we don\\'t lose\nour running REPL, you can do:\n\n``` shell\nsource ~/.zshrc\nmetabuild\n\n```\n\n# Usage\n\nTo use Clerk, you first have to start the server, which will then watch\nthe files in `metabase/local/src/nocommit/metabook/notebooks`. To run\nthe Clerk server, load `metabook.server` and run:\n\n``` clojure\n(load-file \"local/src/nocommit/metabook/src/metabook/server.clj\")\n(metabook.server/server-start!)\n```\n\nWhich will start a Clerk Server on Port 7891. You can edit the server\ncode and change it up as you wish, of course.\n\nNow, any time you make a change to a `.md` or `.clj` file in the\nnotebooks folder, Clerk will eval and render that file!\n\n# notebooks\n\nSome of my notebooks.\n\n-   [metabasics](./notebooks/metabasics.org)\n-   [sso](./notebooks/sso.org)\n-   [query-processor](./notebooks/query-processor.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fmetabook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabase%2Fmetabook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fmetabook/lists"}