Sovereign Sync (svgn)
svgn is a professional developer utility that synchronizes your Linear backlog and Notion documentation with local Markdown files. It enables a "Docs-as-Code" and "Dev-as-Code" workflow, allowing you to manage project execution and technical specifications directly from your code editor.
📂 Project Structure
The codebase is organized into a modular package for scalability and reliability:
src/svgn/
├── api/ # Low-level API wrappers for Linear & Notion
├── engines/ # Sync logic and state management
├── utils/ # Markdown parsing and Notion block conversion
└── main.py # CLI Entry point
🛠 Command Reference
1. Core Lifecycle Commands
svgn init
Run this first.
- Discovers Linear teams and sets your Team ID if not provided.
- Automatically detects Notion credentials if present in
.env. - Creates
linear_tickets/anddocs/directories.
svgn sync
Linear Master Pull.
- Fetches all active tickets from Linear and populates your local folders.
- Updates local "fingerprints" to ensure subsequent updates are efficient.
svgn update
Local ➡ Linear.
- Scans
linear_tickets/for local changes (status moves or text edits). - Pushes changes to Linear. Uses
.svgn_stateto skip unchanged files.
2. Documentation (Notion) Commands
svgn docs sync
Notion ➡ Local.
- Downloads your Notion root page and all sub-pages as Markdown files into the
docs/folder. - Converts Notion blocks (headings, code, lists) into clean local Markdown.
svgn docs update
Local ➡ Notion.
- Detects edits in your
docs/folder. - Clears the corresponding Notion page and re-uploads the fresh Markdown content as blocks.
- Note: Only modifies pages that have changed locally.
3. Utility Commands
svgn inspect
- Prints valid Assignee Emails, Labels, and Projects from Linear. Use this to ensure your Markdown frontmatter is accurate.
svgn logs
- Displays a timestamped history of local-to-remote sync operations.
📋 Full Setup Workflow
- Install: Run
uv pip install -e .(orpip install -e .) from the root directory. - Environment: Ensure your
.envcontains the following :LINEAR_API_KEY=... LINEAR_TEAM_ID=... NOTION_TOKEN=... NOTION_ROOT_PAGE_ID=...
- Notion Permission: Open your Notion page, click
...->Connect to-> and select your Integration.- Each page should be given access explicitly in the integrations.
- Initialize:
svgn init svgn sync # Pull tickets from Linear svgn docs sync # Pull documentation
🧠 Using with AI (Cursor / Copilot)
The generated .cursorrules file instructs AI agents to respect the svgn workflow.
Example Prompts:
Planning with Docs:
"Read @architecture.md from the docs folder and create three implementation tasks in the todo folder. Assign them to me and run svgn update."
Executing a Task:
"Help me implement the logic described in @setup-database-migration.md. Once done, move the file to the done folder and run svgn sync."
📄 Metadata Examples
Linear Ticket (linear_tickets/todo/task.md)
---
linear_id: "uuid"
title: "Fix Auth Bug"
assignee: "dev@company.com"
labels: ["bug", "security"]
priority: "urgent"
---
## Description
...
Notion Document (docs/api-spec.md)
---
notion_id: "uuid"
title: "API Specification v2"
---
# API v2
This document tracks our REST endpoints...
🛠 Troubleshooting
- 400 Bad Request (Notion): Ensure you have duplicated the Notion page to your private workspace and added the "Connection" via the page settings.
- Sync Loops:
svgnuses.svgn_stateand.svgn_docs_stateto store fingerprints. If a file is reverting unexpectedly, runsvgn pullorsvgn docs syncto refresh the local state.
Metadata
Release files for svgn 0.2.0
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 |
|---|---|---|---|---|
| svgn-0.2.0.tar.gz | 16.8 kB | Without provenance | Details for svgn-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| svgn-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for svgn-0.2.0-py3-none-any.whl |
Total release size: 34.0 kB
Release files / svgn-0.2.0.tar.gz
| Download URL | svgn-0.2.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e4968665b6f4af50778fb108abeceb00c9ad39d163ed8e7a55f7d950970b022
|
|
BLAKE2b-256 checksum How to use checksums |
1b53e9b2a8cad748902c80690c55c07d41f4423b89d4111c8f57f5e2ba32249c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Release files / svgn-0.2.0-py3-none-any.whl
| Download URL | svgn-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56f00b22de1f07a27e295b61b9a65139b21aa1c5ab4a953551755dba30ec1717
|
|
BLAKE2b-256 checksum How to use checksums |
2985efa27e90e94e5e23ea50ad0b0539f3f8a1040dcacc8872e8d633aba23954
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.4
|
Security for svgn 0.2.0
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.