Jasmine
Jasmine is a compact terminal coding agent with streaming Markdown, command approval, precise patches, live plans, background sessions, and API usage tracking.
Run
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
jasmine .
Offline smoke test:
jasmine --backend mock .
Model-Facing Tools
Jasmine exposes a compact tool surface:
exec_command: inspect code withrg,sed, and Git; run focused checks.write_stdin: interact with a background shell or PTY session.terminal_screen: inspect a model-controlled PTY screen and cursor.terminal_close: close an interactive PTY and its child processes.apply_patch: edit files with simple exact replacements or advanced patches.view_image: inspect local images and attach a thumbnail for vision-capable providers.web_search: search the web for current information or docs.web_extract: extract readable text and structured data from a web page.list_skills: discover reusable workspace and built-in workflows.read_skill: load one relevant workflow without scanning unrelated guidance.ask_user: ask for a missing decision instead of guessing.multi_tool_use_parallel: batch 1-4 independent read-only inspections, including web and image reads.update_plan: keep one short visible implementation plan.
Codebase search uses focused rg commands through exec_command. Jasmine does
not maintain a noisy pseudo-database or expose overlapping search wrappers.
Skills
Jasmine ships with reusable skills under jasmine/skills/. A workspace can add
or override skills with skills/<name>/SKILL.md or
.jasmine/skills/<name>/SKILL.md. The model lists skills only when specialized
work may benefit from one, then reads the matching skill by name.
Context And Tokens
- Tool calls use the provider-native assistant/tool protocol with
tool_call_id. - Repeated read-only shell commands are reused within a turn.
- Identical tool calls are stopped after two attempts.
- Shell output enters model context unchanged. A complete
cat fileremains a complete file read in conversation history. - Conversation history is preserved normally without automatic compaction.
/usageshows API request, prompt, completion, reasoning, and cache-hit token totals.- Large pasted prompts are preserved by default.
--paste-thresholdcan opt in to saving large pastes under.jasmine/pastes/. - Large user messages keep their full model context while the terminal shows a
short
[Pasted Content N chars]preview.
Commands
/menu: show the menu./tools: show the model-facing tools./provider: switch provider from the configured-provider menu./resume [query]: list past conversations, optionally filtered by search term./undo: undo the last file patch applied in this session./restart: clear and rebuild the UI without losing the current conversation./usage: show API token usage./trusted: show remembered shell prefixes./clear: clear chat context./cd <path>: switch workspace./exit: quit.
Runtime Modes
- Default DeepSeek mode: thinking enabled with
xhighreasoning effort. --fast: keep DeepSeek thinking enabled withhighreasoning effort.--quality: enable DeepSeek thinking mode withxhighreasoning effort.--model,--reasoning-effort, and--thinking: explicit overrides.
Providers
OpenAI-compatible providers live in .jasmine/providers/<name>.toml for a
workspace or ~/.jasmine/providers/<name>.toml for all workspaces. A workspace
file takes precedence. Select one with --backend <name> or switch at runtime
with /provider.
base_url = "https://api.deepseek.com"
model = "deepseek-v4-pro"
api_key = "..."
supports_thinking = true
thinking_default = true
reasoning_effort = "max"
input_price_per_million = 0.435
cached_input_price_per_million = 0.003625
output_price_per_million = 0.87
Pricing fields are optional. When present, /usage includes the estimated API
cost.
Workspace config
A workspace can have a .jasmine/workspace.toml for workspace-specific settings:
# Trust specific command prefixes (no approval prompt)
trusted_prefixes = ["git status", "git diff", "rg"]
# Auto-stash uncommitted changes before file patches (git only)
git_safety = true
When git_safety is enabled, Jasmine creates a git stash before modifying
files, so uncommitted work is never lost.
Architecture
jasmine/
├── main.py # CLI entry point, argument parsing, command dispatch
├── agent.py # Model loop: streaming, tool dispatch, nudge logic
├── ai.py # AIBackend protocol + MockBackend + loader
├── openai_backend.py # Generic OpenAI-compatible streaming backend
├── deepseek_backend.py # DeepSeek-specific defaults (extends OpenAIBackend)
├── config.py # ProfileConfig: unified provider + workspace config
├── tools.py # ToolRegistry + built-in tool implementations
├── ui.py # TerminalUI: Rich rendering, prompt_toolkit input
├── terminal.py # PTY management, command capture, keyboard encoding
├── conversation.py # Auto-save/load/resume of agent conversations
├── diff_utils.py # Unified diff application and generation
├── prompts.py # System prompt (Ultra Mode instruction set)
├── _html_extract.py # Structured HTML extraction (web_extract backend)
├── _markdown.py # Compact Markdown renderer (theme + classes)
└── skills/ # Built-in reusable skill workflows
Code Style
- 120-char lines,
from __future__ import annotationsin every file, type hints on public methods.
System prompt
The system prompt lives in jasmine/prompts.py. It is a single continuous
Markdown string sent as the first message of every conversation. Providers that
support prompt caching (DeepSeek, Anthropic) will automatically cache repeated
prefix content — keep structural changes minimal and prefer appending
instructions at the end when possible.
Metadata
Release files for jasmine-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jasmine_cli-0.1.1.tar.gz | 78.7 kB | Without provenance | Details for jasmine_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jasmine_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for jasmine_cli-0.1.1-py3-none-any.whl |
Total release size: 155.3 kB
Release files / jasmine_cli-0.1.1.tar.gz
| Download URL | jasmine_cli-0.1.1.tar.gz |
|---|---|
| Size | 78.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4df0ee4ba114cd9ab9933f284d4ad88895ccc208d6cab0032145ee8a715a8ade
|
|
BLAKE2b-256 checksum How to use checksums |
008a702099d9da77e13e2b7fc41acc25a7aca32111ffcb1950d7ad717d3e9f6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / jasmine_cli-0.1.1-py3-none-any.whl
| Download URL | jasmine_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 76.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acd1bf1f6313ac33d42eeeb4b67e71acc13fc2dfb158943ef3297bd5f86c1229
|
|
BLAKE2b-256 checksum How to use checksums |
b151a83d5b6a2b800bbc651e33b77d7a4c194c5ea87b2592e415ffce888023e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for jasmine-cli 0.1.1
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.