A hybrid Computer Algebra System (CAS) for Obsidian.
Instant, zero-latency symbolic algebra locally via Nerdamer, combined with heavy-duty calculus, linear algebra, and SVG plotting via an optional background SymPy daemon.
Named after the astronomer and mathematician Giovanni Domenico Cassini, CASsini brings real symbolic mathematics directly into your personal knowledge base.
-
Zero-Latency Local Math (nerdamer): Evaluate derivatives, simplifications, equations, and substitutions 100% locally inside Obsidian without needing any running background processes or network connectivity.
-
Deep Mathematical Power (sympy): Offload full matrix calculus, complex limits, differential equations, and multi-variable operations to a lightweight local SymPy microservice.
-
Sharp Vector Plots: Generate Matplotlib / SymPy function graphs rendered directly as clean, scalable SVGs in your notes with transparent backgrounds.
-
Persistent Offline Caching: SymPy results and plots are hashed using SHA-256 and persisted in your vault (data.json). Once evaluated, formulas and plots stay rendered offline even when your server is shut down.
-
Non-Destructive & Safe: If the server is offline and no cache is present, your raw markdown code block is kept intact. A discreet ⟳ refresh icon lets you force recalculations anytime.
CASsini registers two markdown code block processors:
- Instant Local CAS (nerdamer): Best for quick algebra, substitutions, derivatives, and limits without any background daemon.
Derivative:
```nerdamer
diff(cos(x^2), x)
```Algebraic Simplification:
```nerdamer
simplify((x^2 - 1)/(x - 1))
```Symbolic Integration:
```nerdamer
integrate(x * exp(x), x)
```Sends instructions to the local SymPy daemon and caches the output locally.
Linear Algebra & Characteristic Polynomials:
```sympy
A = Matrix([[1, 2], [3, 4]])
A.charpoly()
```Exact Rational Arithmetic:
```sympy
S(1)/3 + S(1)/6
```2D Vector Function Plotting (SVG):
```sympy
plot(sin(x) * exp(-x/3), (x, 0, 10))
```- Obsidian (v1.0.0+)
- Node.js & pnpm (for compiling the TypeScript plugin)
- uv (fast Python package manager)
- just (command runner)
- Clone this repository:
git clone https://github.com/your-username/obsidian-cassini.git
cd obsidian-cassini - Build the plugin and install it into your Obsidian vault:
# Default target directory
just installTo specify your own vault location:
just install install_dir="/path/to/your/vault/.obsidian/plugins/cassini"(Alternatively, set the environment variable CASSINI_INSTALL_DIR beforehand).
- Activate the plugin in Obsidian under Settings → Community plugins → Installed plugins → CASsini.
Start the Python backend service:
just servejust serve automatically runs uv sync first to ensure all required Python dependencies (sympy, matplotlib) are installed and up to date, then starts the server on http://127.0.0.1:27182.
- Manual Refresh (
⟳): Hover over any rendered SymPy block in Obsidian. A discreet reload icon appears in the top-right corner. Clicking it bypasses the cache and forces a fresh query to the server. - Wipe Entire Cache: Open the Obsidian Command Palette (
Ctrl/Cmd + P) and execute:
CASsini: Clear SymPy Cache
This empties all saved SVG and TeX representations from .obsidian/plugins/cassini/data.json.
MIT