CLI tool for Fast Note Sync (Obsidian)
Project description
Languages: ๐บ๐ธ English | ๐จ๐ณ ไธญๆ
FNS CLI (Fast Note Sync CLI)
From Local to Cloud: Transform Obsidian notes from locally-managed files into cloud-managed, AI-accessible knowledge. Edit once, sync everywhere.
FNS CLI is a powerful command-line tool for interacting with the Fast Note Sync (FNS) service. Manage, read, write, and sync your Obsidian notes directly from the terminal โ optimized for both human workflows and AI Agent integration.
๐ฏ Design Philosophy
This tool bridges the gap between local Obsidian editing and cloud-based AI knowledge management:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Obsidian App โโโโโโถโ FNS Service โโโโโโโ FNS CLI (this) โ
โ (Desktop/Mobileโ โ (Cloud Server) โ โ (Terminal/AI) โ
โ Editor) โโโโโโโ โโโโโโถโ (read/write) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ AI Agents โ
โ Claude Code, โ
โ OpenCode, Cursor... โ
โโโโโโโโโโโโโโโโโโโโโโโ
One edit/update โ all devices synced. Whether you write in Obsidian on your desktop or manage notes via CLI/AI on a server, everything stays in sync through the FNS cloud service.
โจ Features
Core
- Full Note CRUD โ Create, read, update, append, prepend, move, delete
- Smart Append โ Automatically handles newlines to prevent content merging
- Local File Upload โ Use
@file.txtprefix to upload any local file - Note History โ View and restore previous versions
- Recycle Bin โ Recover deleted notes
- Find & Replace โ Search and replace content (supports regex)
- Cross-Platform โ macOS / Linux / Windows (Python 3.6+)
Knowledge Graph
- Backlinks โ See which notes link to the current note
- Outlinks โ See which notes the current note links to
- Folder Tree โ Browse your vault's directory structure
Sharing & Metadata
- Share Links โ Create shareable URLs with optional password and expiry
- Frontmatter Editing โ View and modify note metadata (tags, title, etc.)
AI Agent Friendly
--jsonMode โ Machine-readable output for AI parsing--quietMode โ Silent operation for scripting- Zero interactive prompts when arguments are provided
Administration
- Vault Management โ List, view details, create, delete vaults
- Server Status โ Check version and health
- Auto-Setup โ Interactive guide on first login (URL โ credentials โ vault selection)
๐ฆ Installation
From PyPI (Recommended)
pip install fns-cli
This installs the fns command globally on your system.
From Source
git clone https://github.com/crazykuma/fns-cli.git
cd fns-cli
pip install -e .
Dependencies: click>=8.1 (installed automatically) + curl (pre-installed on most systems)
โ๏ธ Quick Setup
First-Time (Interactive Guide)
fns login
# Enter FNS server URL: https://your-server
# Username or email: you@example.com
# Password: **** (hidden)
# ๐ฆ Available vaults:
# 1. defaultVault
# Select vault [1]: 1
# ๐ Ready! Try: fns list
Script-Friendly (Non-Interactive)
fns login -u https://your-server username password
Manual Configuration
fns config url "https://your-server/api"
๐ Command Reference
Authentication & Setup
fns login [user] [pass] [-u URL] # Login (interactive if args omitted)
fns config show # Show current configuration
fns config url <value> # Set API URL
fns config vault <value> # Set vault name
Note CRUD
fns read <path> # Read a note
fns write <path> <text|@file> # Create/overwrite (use @ to upload local file)
fns append <path> <text|@file> # Append content (smart newline handling)
fns prepend <path> <text|@file> # Prepend content (after frontmatter)
fns delete <path> # Delete note (moves to recycle bin)
fns move <old> <new> # Move/rename a note
fns replace <path> <find> <replace> # Find and replace (supports regex)
fns history <path> # View revision history
fns restore <path> # Restore note from recycle bin
Knowledge & Links
fns list [keyword] # List/search notes
fns tree [path] # View folder tree structure
fns backlinks <path> # Notes linking to this one
fns outlinks <path> # Notes this one links to
Folder Management
- Create & Delete โ
mkdir,folder-delete - Browse โ
folder-list,folder-tree - List Content โ
folder-files,folder-notes - Metadata โ
folder
File/Attachment Management
- View & Download โ
file-info,file-download [-o output] - List โ
file-list [keyword] - Delete & Restore โ
file-delete,file-restore - Rename โ
file-rename <old> <new> - Recycle โ
file-recycle-clear [paths]
User Settings & Backup
- Settings โ
setting-list,setting-get,setting-create,setting-delete,setting-rename - Backup โ
backup-list,backup-create,backup-delete,backup-run,backup-history - Short Links โ
share-link <path> - Password โ
change-password <old> <new>
Sharing & Metadata
fns share <path> [--expire 24h] [--password secret] # Create share link
fns unshare <path> # Remove sharing
fns frontmatter <path> # View frontmatter
fns frontmatter <path> --set key=value --remove key # Edit frontmatter
Folder Management
fns mkdir <path> # Create a new folder
fns folder <path> # Get folder metadata
fns folder-list [path] # List sub-folders (root if empty)
fns folder-files <path> # List files in a folder
fns folder-notes <path> # List notes in a folder
fns folder-tree [--depth N] # View folder tree
fns folder-delete <path> # Delete folder (soft delete)
File/Attachment Management
fns file-info <path> # View file metadata
fns file-download <path> [-o file] # Download file to local
fns file-list [keyword] # List files with pagination
fns file-delete <path> # Delete file (to recycle bin)
fns file-rename <old> <new> # Rename file
fns file-restore <path> # Restore file from recycle bin
fns file-recycle-clear [paths] # Clear file recycle bin
User Settings & Backup
fns setting-list [keyword] # List settings with pagination
fns setting-get <path> # Get setting content
fns setting-create <path> <content> # Create/update setting
fns setting-delete <path> # Soft delete setting
fns setting-rename <old> <new> # Rename setting
fns backup-list # List backup configurations
fns backup-create <vault> --storage-ids N --cron daily # Create backup config
fns backup-delete <config_id> # Delete backup config by ID
fns backup-run <config_id> # Trigger backup
fns backup-history <config_id> # View backup history
fns share-link <path> # Generate short share URL
fns change-password <old> <new> # Change account password
Vault & Server
fns vaults # List available vaults
fns vault-info [id] # Show vault details
fns vault-create <name> # Create vault (with confirmation)
fns vault-delete <id> # Delete vault (double confirmation)
fns recycle-bin [keyword] # View recycle bin
fns version # Show server version
fns health # Check server health
fns info # Show current user info
Global Flags
fns --json <command> # Output as JSON (for AI/script parsing)
fns --quiet <command> # Suppress non-essential output
fns --version / -v # Show version
fns --help # Show help
๐ค AI Agent Integration
This tool is designed to give AI agents long-term memory and knowledge access:
- Read Context:
fns readspecific notes before coding tasks - Auto-Documentation:
fns appendchangelogs to daily notes - Knowledge Retrieval:
fns list/fns treeto discover relevant files - Knowledge Graph:
fns backlinks/fns outlinksto find related notes
Example with AI Agent:
# Ask AI to read context, work, then document
fns read "projects/architecture.md" --json
# ... AI works ...
fns append "daily/2024-05-20.md" "- Completed architecture review"
๐ File Structure
fns-cli/
โโโ fns.py # Main CLI logic
โโโ setup.py # Installation script
โโโ requirements.txt # Dependencies
โโโ tests/
โ โโโ test_fns.py # Unit tests
โโโ README.md # This file
โโโ README.zh.md # Chinese version
โโโ skill.md # Usage examples
โโโ CHANGELOG.md # Version history
โโโ LICENSE # MIT License
๐ Usage Examples
For detailed examples, see the portable Skill at fns-skill/SKILL.md. You can copy the entire fns-skill/ directory into your own AI agent's Skills folder (Qwen Code, Claude Code, etc.).
๐งช Running Tests
python -m unittest discover -s tests -v
๐ Related Projects
- fast-note-sync-service โ The FNS backend server
- obsidian-fast-note-sync โ Obsidian plugin
๐ License
MIT License โ see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fns_cli-0.8.0.tar.gz.
File metadata
- Download URL: fns_cli-0.8.0.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
679b77a835f80aad471a28befa126d988a2adbcbe0357aa30d666b70bbd7c185
|
|
| MD5 |
9418ac62d2c8fdf7eed2df6c72df9dc9
|
|
| BLAKE2b-256 |
cd8f01507fa132d7e6118b0a6b5c3dab39685fac6cff1ae65b5898df5a12be6e
|
Provenance
The following attestation bundles were made for fns_cli-0.8.0.tar.gz:
Publisher:
ci.yml on crazykuma/fns-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fns_cli-0.8.0.tar.gz -
Subject digest:
679b77a835f80aad471a28befa126d988a2adbcbe0357aa30d666b70bbd7c185 - Sigstore transparency entry: 1317497739
- Sigstore integration time:
-
Permalink:
crazykuma/fns-cli@d4eae0e2b47461a51a2419589edcd76e90ed7ad3 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/crazykuma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d4eae0e2b47461a51a2419589edcd76e90ed7ad3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fns_cli-0.8.0-py3-none-any.whl.
File metadata
- Download URL: fns_cli-0.8.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f52480cb184f3f4d9a855d1fc24bbefbbc05c7dec45497c80202759c5c5618c9
|
|
| MD5 |
9a01f38a78e3591a6e4711fa3ed9127b
|
|
| BLAKE2b-256 |
e4a152e5fdae53e849b62ad79fc328194446e1d9be5c2c2c3dd5344a75f5f2e6
|
Provenance
The following attestation bundles were made for fns_cli-0.8.0-py3-none-any.whl:
Publisher:
ci.yml on crazykuma/fns-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fns_cli-0.8.0-py3-none-any.whl -
Subject digest:
f52480cb184f3f4d9a855d1fc24bbefbbc05c7dec45497c80202759c5c5618c9 - Sigstore transparency entry: 1317497743
- Sigstore integration time:
-
Permalink:
crazykuma/fns-cli@d4eae0e2b47461a51a2419589edcd76e90ed7ad3 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/crazykuma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d4eae0e2b47461a51a2419589edcd76e90ed7ad3 -
Trigger Event:
push
-
Statement type: