aisync
Sync AI coding sessions from 14 tools (Claude Code, Codex, Cursor, Aider, Cline, Gemini CLI, Continue, Copilot, Roo Code, Windsurf, Zed AI, Amp, OpenCode, OpenRouter) to Obsidian vault as markdown notes. Use when user wants to backup, export, or sync their AI chat sessions to Obsidian, set up automatic syncing, check sync status, or troubleshoot sync issues. Handles secret redaction automatically. Cross-platform (macOS, Linux, Windows).
Best use case
aisync is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sync AI coding sessions from 14 tools (Claude Code, Codex, Cursor, Aider, Cline, Gemini CLI, Continue, Copilot, Roo Code, Windsurf, Zed AI, Amp, OpenCode, OpenRouter) to Obsidian vault as markdown notes. Use when user wants to backup, export, or sync their AI chat sessions to Obsidian, set up automatic syncing, check sync status, or troubleshoot sync issues. Handles secret redaction automatically. Cross-platform (macOS, Linux, Windows).
Teams using aisync should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/aisync/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How aisync Compares
| Feature / Agent | aisync | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sync AI coding sessions from 14 tools (Claude Code, Codex, Cursor, Aider, Cline, Gemini CLI, Continue, Copilot, Roo Code, Windsurf, Zed AI, Amp, OpenCode, OpenRouter) to Obsidian vault as markdown notes. Use when user wants to backup, export, or sync their AI chat sessions to Obsidian, set up automatic syncing, check sync status, or troubleshoot sync issues. Handles secret redaction automatically. Cross-platform (macOS, Linux, Windows).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# AI Sessions Sync v2.2.0
Sync AI coding sessions from **14 different tools** to multiple output formats with analytics, search, and automatic secret redaction.
## Supported Providers (14)
| Provider | Location | Output Folder |
|----------|----------|---------------|
| Claude Code | `~/.claude/projects/**/*.jsonl` | `claude-code-sessions/` |
| Codex CLI | `~/.codex/sessions/**/*.jsonl` | `codex-sessions/` |
| Cursor | `~/.cursor/projects/**/agent-transcripts/*.txt` | `cursor-sessions/` |
| Aider | `~/.aider.chat.history.md` | `aider-sessions/` |
| Cline | VS Code globalStorage | `cline-sessions/` |
| Gemini CLI | `~/.gemini/` | `gemini-cli-sessions/` |
| Continue.dev | `~/.continue/sessions/` | `continue-sessions/` |
| GitHub Copilot | VS Code globalStorage | `copilot-chat-sessions/` |
| Roo Code | VS Code globalStorage | `roo-code-sessions/` |
| Windsurf | Codeium/Windsurf app data | `windsurf-sessions/` |
| Zed AI | `~/.config/zed/conversations/` | `zed-ai-sessions/` |
| Amp (Sourcegraph) | VS Code globalStorage | `amp-sessions/` |
| OpenCode | `~/.local/share/opencode/` | `opencode-sessions/` |
| OpenRouter | `~/Downloads/openrouter*.json` (exports) | `openrouter-sessions/` |
## Output Formats (5)
| Format | Description |
|--------|-------------|
| `obsidian` | Markdown with YAML frontmatter for Obsidian |
| `json` | JSON files (single or per-session) |
| `jsonl` | JSON Lines for streaming/processing |
| `html` | Static website with search |
| `sqlite` | SQLite database with full-text search |
## CLI Commands
```
🤖 AI Sessions Sync v2.0.0
COMMANDS:
sync Sync sessions to output format(s)
search Search across all sessions
stats Show usage statistics
report Generate detailed report
status Show detected sessions
providers List supported AI tools
outputs List output formats
config Get/set configuration
QUICK START:
aisync sync # Sync to Obsidian
aisync sync -f json html # Sync to JSON + HTML
aisync search "function" # Search sessions
aisync stats # View statistics
```
### `aisync sync` - Sync Sessions
```bash
aisync sync [options]
OPTIONS:
-o, --output DIR Output directory (default: auto-detect vault)
-f, --format FORMAT Output format(s): obsidian, json, jsonl, html, sqlite
-p, --provider PROV Only sync specific provider(s)
--no-analyze Skip analytics computation
--json Output results as JSON
EXAMPLES:
aisync sync # Sync to Obsidian
aisync sync -o ~/ai-sessions # Custom directory
aisync sync -f obsidian sqlite # Multiple formats
aisync sync -p claude-code cursor # Specific providers
```
### `aisync search` - Search Sessions
```bash
aisync search <query> [options]
OPTIONS:
-p, --provider PROV Filter by provider
-l, --limit N Max results (default: 20)
--regex Use regex pattern
--json Output as JSON
EXAMPLES:
aisync search "async function" # Simple search
aisync search "error" -p cursor # Filter by provider
aisync search "def \w+\(" --regex # Regex search
```
### `aisync stats` - View Statistics
```bash
aisync stats [-f text|json]
OUTPUT INCLUDES:
- Total sessions and messages
- Token usage estimates
- Sessions by provider
- Top programming languages
- Activity patterns
```
### `aisync report` - Generate Report
```bash
aisync report [-o FILE]
REPORT INCLUDES:
- Overview (sessions, messages, tokens)
- Insights (productivity patterns, streaks)
- Breakdown by tool and language
```
### Other Commands
```bash
aisync status # Show vault location and session counts
aisync providers # List all 12 supported tools
aisync outputs # List output formats
aisync config # Get/set configuration
aisync config OBSIDIAN_VAULT "~/vault" # Set vault path
```
## Installation
Run the installer:
```bash
cd ~/.claude/skills/aisync/scripts
./install.sh
```
This will:
1. Install Python library and CLI
2. Set up automatic syncing (platform-specific)
3. Run initial sync
## Cross-Platform Support
| Platform | Scheduler | Auto-Install |
|----------|-----------|--------------|
| macOS | launchd | ✅ Automatic |
| Linux | systemd/cron | ✅ Automatic |
| Windows | Task Scheduler | 📋 Manual (instructions provided) |
## Configuration
```bash
# Option 1: Environment variable
export OBSIDIAN_VAULT="/path/to/your/vault"
# Option 2: Config file
echo 'OBSIDIAN_VAULT="/path/to/your/vault"' > ~/.aisync.conf
# Option 3: CLI
aisync config OBSIDIAN_VAULT "/path/to/vault"
```
## Features
### Analytics
- Token usage estimation
- Language detection in code blocks
- Activity patterns (peak hours, streaks)
- Usage insights
### Search
- Full-text search across all sessions
- Regex support
- Filter by provider, date
- Find similar sessions
### Secret Redaction
Automatically redacts 20+ patterns:
- API keys (OpenAI, Anthropic, Google, AWS)
- GitHub tokens
- Database URLs
- Private keys
- JWT/Bearer tokens
## Troubleshooting
| Issue | Solution |
|-------|----------|
| No sessions found | Check if AI tools are installed and have sessions |
| Sync not running | Run `aisync status` to check |
| Vault not found | Set `OBSIDIAN_VAULT` env var |
| Search not working | Ensure sessions are synced first |
## Library Files
The skill includes a modular Python library in `lib/`:
```
lib/
├── __init__.py # Main API (sync_all, etc.)
├── cli.py # Command-line interface
├── models.py # Data models (Session, Message)
├── redact.py # Secret redaction
├── search.py # Search functionality
├── parsers/ # 12 provider parsers
├── outputs/ # 5 output formats
└── analytics/ # Analytics & insights
```Related Skills
bgo
Automated Blender build-go workflow. Automatically builds, removes old version, installs, enables, and launches Blender with your extension/add-on. Use when you want to quickly test changes, execute complete build-to-launch cycle, or run custom packaging scripts with automatic Blender launch.
github-search
Search GitHub for repos, code, and usage examples using gh CLI. Capabilities: repo discovery, code search, finding library usage patterns, issue/PR search. Actions: search, find, discover repos/code/examples. Keywords: gh, github, search repos, search code, find examples, how to use library, stars, language filter. Use when: finding repositories, searching code patterns, discovering how libraries are used, exploring open source.
github-repo-skill
Guide for creating new GitHub repos and best practice for existing GitHub repos, applicable to both code and non-code projects
github-repo-analysis
Analyze GitHub repositories to extract insights about commit frequency, outstanding contributors, release timeline, and project health metrics. Use when users request repository analysis, commit history investigation, contributor identification, release tracking, or development activity assessment for any GitHub project.
github-pr-review-comments
Comprehensive workflow for managing GitHub PR review comments using gh CLI and GraphQL API. Use when asked to address review comments, find unreplied comments, reply to review threads, or resolve/unresolve review conversations. Supports finding ALL comments across pagination boundaries, replying to threads, and resolving conversations.
github-navigator
GitHub operations via gh CLI. CRITICAL: Always use instead of WebFetch for ANY github.com URL. Use when user provides GitHub URL, says 'facebook/react', 'show README', 'list issues', 'check PR', 'clone repo', 'analyze this repo', 'understand the architecture', 'how is X structured', 'explore the codebase'. For deep analysis of external repos, clones locally.
github-issues
Manage GitHub issues - create, edit, close, comment, assign, and delegate to Copilot. Uses GitHub MCP.
github-issue-triage
Analyze GitHub issues for the Nx repository and provide assignment recommendations based on technology stack, team expertise, and priority classification rules.
github-issue-resolver
Strategically resolves GitHub Actions failures, failed pull requests, and Dependabot issues using the gh CLI with intelligent analysis and automated fixes.
github-issue-creator
Creates well-structured GitHub issues for the MCPSpy project using the gh CLI tool. Use when asked to create issues, report bugs, or document features. Follows conventional naming with feat/chore/fix prefixes and maintains appropriate detail levels.
github-copilot-agent-tips-and-tricks
Tips and Tricks for Working with GitHub Copilot Agent PRs
github-commit
Create a well-formatted git commit following best practices