obsidian-cli

โดย kepano

โต้ตอบกับคลัง Obsidian โดยใช้ Obsidian CLI เพื่ออ่าน สร้าง ค้นหา และจัดการโน้ต งาน คุณสมบัติ และอื่นๆ รองรับการพัฒนา plugin และ theme ด้วยคำสั่งโหลด plugin ใหม่ รัน JavaScript จับข้อผิดพลาด ถ่ายภาพหน้าจอ และตรวจสอบ DOM ใช้เมื่อผู้ใช้ขอให้โต้ตอบกับคลัง Obsidian จัดการโน้ต ค้นหาเนื้อหาในคลัง ดำเนินการคลังจากบรรทัดคำสั่ง หรือพัฒนาและดีบัก plugin และ theme ของ Obsidian

npx skills add https://github.com/kepano/obsidian-skills --skill obsidian-cli

Obsidian CLI

Use the obsidian CLI to interact with a running Obsidian instance. Requires Obsidian to be open.

Command reference

Run obsidian help to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli

Syntax

Parameters take a value with =. Quote values with spaces:

obsidian create name="My Note" content="Hello world"

Flags are boolean switches with no value:

obsidian create name="My Note" silent overwrite

For multiline content use \n for newline and \t for tab.

File targeting

Many commands accept file or path to target a file. Without either, the active file is used.

  • file=<name> — resolves like a wikilink (name only, no path or extension needed)
  • path=<path> — exact path from vault root, e.g. folder/note.md

Vault targeting

Commands target the most recently focused vault by default. Use vault=<name> as the first parameter to target a specific vault:

obsidian vault="My Vault" search query="test"

Common patterns

obsidian read file="My Note"
obsidian create name="New Note" content="# Hello" template="Template" silent
obsidian append file="My Note" content="New line"
obsidian search query="search term" limit=10
obsidian daily:read
obsidian daily:append content="- [ ] New task"
obsidian property:set name="status" value="done" file="My Note"
obsidian tasks daily todo
obsidian tags sort=count counts
obsidian backlinks file="My Note"

Use --copy on any command to copy output to clipboard. Use silent to prevent files from opening. Use total on list commands to get a count.

Plugin development

Develop/test cycle

After making code changes to a plugin or theme, follow this workflow:

  1. Reload the plugin to pick up changes:
    obsidian plugin:reload id=my-plugin
    
  2. Check for errors — if errors appear, fix and repeat from step 1:
    obsidian dev:errors
    
  3. Verify visually with a screenshot or DOM inspection:
    obsidian dev:screenshot path=screenshot.png
    obsidian dev:dom selector=".workspace-leaf" text
    
  4. Check console output for warnings or unexpected logs:
    obsidian dev:console level=error
    

Additional developer commands

Run JavaScript in the app context:

obsidian eval code="app.vault.getFiles().length"

Inspect CSS values:

obsidian dev:css selector=".workspace-leaf" prop=background-color

Toggle mobile emulation:

obsidian dev:mobile on

Run obsidian help to see additional developer commands including CDP and debugger controls.

Skills เพิ่มเติมจาก kepano

obsidian-markdown
kepano
สร้างและแก้ไข Obsidian Flavored Markdown ด้วย wikilinks, embeds, callouts, properties และไวยากรณ์เฉพาะของ Obsidian อื่นๆ ใช้เมื่อทำงานกับไฟล์ .md ใน Obsidian หรือเมื่อผู้ใช้กล่าวถึง wikilinks, callouts, frontmatter, tags, embeds หรือบันทึกย่อของ Obsidian
documentproductivitycreative
defuddle
kepano
ดึงเนื้อหา markdown ที่สะอาดจากหน้าเว็บโดยใช้ Defuddle CLI ลบสิ่งรบกวนและเมนูนำทางเพื่อประหยัดโทเค็น ใช้แทน WebFetch เมื่อผู้ใช้ระบุ URL เพื่ออ่านหรือวิเคราะห์ สำหรับเอกสารออนไลน์ บทความ โพสต์บล็อก หรือหน้าเว็บมาตรฐานใดๆ ห้ามใช้กับ URL ที่ลงท้ายด้วย .md — เนื่องจากเป็น markdown อยู่แล้ว ให้ใช้ WebFetch โดยตรง
web-scrapingresearchdocument
json-canvas
kepano
สร้างและแก้ไขไฟล์ JSON Canvas (.canvas) ที่มีโหนด, ขอบ, กลุ่ม และการเชื่อมต่อ ใช้เมื่อทำงานกับไฟล์ .canvas, สร้างผืนผ้าใบที่มองเห็น, แผนที่ความคิด, ผังงาน หรือเมื่อผู้ใช้กล่าวถึงไฟล์ Canvas ใน Obsidian
developmentdesigndocument
obsidian-bases
kepano
สร้างและแก้ไข Obsidian Bases (ไฟล์ .base) ด้วยมุมมอง ตัวกรอง สูตร และสรุปผล ใช้เมื่อทำงานกับไฟล์ .base การสร้างมุมมองคล้ายฐานข้อมูลของโน้ต หรือเมื่อผู้ใช้พูดถึง Bases มุมมองตาราง มุมมองการ์ด ตัวกรอง หรือสูตรใน Obsidian
databaseproductivitydata-analysis