Skip to main content

portal

A clojure tool to navigate through your data.

cljdoc Clojars Project PyPI VS Code Extension Version Get help on Slack

The portal UI can be used to inspect values of various shapes and sizes. The UX will probably evolve over time and user feedback is welcome!

For an in-depth explanation of the UI, you can jump to the UI docs.

Demo

To get an overview of the Portal UI and workflow, checkout the following recording of a live demo I gave for London Clojurians.

London Clojurians Demo

More video presentations on Portal can be found here.

Usage

To start a repl with portal, run the clojure >= 1.10.0 cli with:

clj -Sdeps '{:deps {djblue/portal {:mvn/version "0.69.2"}}}'

or for a web clojurescript >= 1.10.773 repl, do:

clj -Sdeps '{:deps {djblue/portal {:mvn/version "0.69.2"}
                    org.clojure/clojurescript {:mvn/version "1.10.844"}}}' \
    -m cljs.main

or for a node clojurescript >= 1.10.773 repl, do:

clj -Sdeps '{:deps {djblue/portal {:mvn/version "0.69.2"}
                    org.clojure/clojurescript {:mvn/version "1.10.844"}}}' \
    -m cljs.main -re node

or for a babashka >=0.2.4 repl, do:

bb -Sdeps '{:deps {djblue/portal {:mvn/version "0.69.2"}}}'

or for a lein project.clj, add:

{:profiles {:dev {:dependencies [[djblue/portal "0.69.2"]]}}}

or as a global profile, add to ~/.lein/profiles.clj:

{:portal {:dependencies [[djblue/portal "0.69.2"]]}}

or for Clojure CLR, checkout this example project,

or for examples on how to integrate portal into an existing project, look through the examples directory.

API

Try the portal api with the following commands:

;; for node and jvm
(require '[portal.api :as p])

;; for web
;; NOTE: you might need to enable popups for the portal ui to work in the
;; browser.
(require '[portal.web :as p])


(def p (p/open)) ; Open a new inspector

;; or with an extension installed, do:
(def p (p/open {:launcher :vs-code}))  ; jvm / node only
(def p (p/open {:launcher :intellij})) ; jvm / node only

(add-tap #'p/submit) ; Add portal as a tap> target

(tap> :hello) ; Start tapping out values

(p/clear) ; Clear all values

(tap> :world) ; Tap out more values

(prn @p) ; bring selected value back into repl

(remove-tap #'p/submit) ; Remove portal from tap> targetset

(p/close) ; Close the inspector when done

(p/docs) ; View docs locally via Portal - jvm / node only

Options

Options for portal.api/open:

Option Description Default Spec
:window-title Custom window title for UI "portal" string?
:theme Default theme for UI :portal.colors/nord
:value Root value of UI (atom (list))
:app Launch UI in Chrome app window true boolean?
:launcher Launch UI using this editor #{:vs-code :intellij :emacs}
:editor Enable editor commands, but use separate UI #{:vs-code :intellij :emacs}
:port Http server port for UI 0 int?
:host Http server host for UI "localhost" string?

For more documentation, take a look through the docs.

Metadata

Release files for djblue.portal 0.69.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djblue.portal 0.69.2
File Size Uploaded Provenance Actions
djblue_portal-0.69.2.tar.gz 2.0 MB Without provenance Details for djblue_portal-0.69.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for djblue.portal 0.69.2
File Interpreter ABI Platform Actions
djblue_portal-0.69.2-py3-none-any.whl Python 3 none any Details for djblue_portal-0.69.2-py3-none-any.whl

Total release size: 4.1 MB

Release files / djblue_portal-0.69.2.tar.gz

Download URL djblue_portal-0.69.2.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
1a13fcf9f5550dc2cc6c84b7016ff39d11eb7edb98b3f66188503906a82ee36a
BLAKE2b-256 checksum
How to use checksums
c7987d2f42265c9d9f518f5e6fd140f586cac7b7d6f1223f3d98d14130b9306a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.18 Linux/7.0.0-1019-azure

Release files / djblue_portal-0.69.2-py3-none-any.whl

Download URL djblue_portal-0.69.2-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d794fd04367cae2c0589c4752d68cdf6e298a2dd237d61902ee7f1df72bc13e8
BLAKE2b-256 checksum
How to use checksums
d03acf3cbe12d0c2b658491e9bfa66bce235831ce06071dae838eb463f4f1ae8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.18 Linux/7.0.0-1019-azure

Security for djblue.portal 0.69.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page