This guide explains how to build and deploy the Linian plugin to your Obsidian vault for testing and development.
# Install dependencies
npm install# Build and deploy to Obsidian
./deploy.sh
# OR use npm script
npm run deploy# Build in watch mode and auto-deploy changes
./dev-deploy.sh
# OR use npm script
npm run dev-deploy| Script | Command | Description |
|---|---|---|
| Install | npm install |
Install all dependencies |
| Build | npm run build |
Build plugin for production |
| Dev Build | npm run dev |
Build plugin in watch mode |
| Deploy | ./deploy.sh or npm run deploy |
Build and deploy to Obsidian |
| Dev Deploy | ./dev-deploy.sh or npm run dev-deploy |
Watch mode with auto-deploy |
| Full Install | npm run install-obsidian |
Build + Deploy in one command |
The deployment script copies these files to $OBSIDIAN_PLUGINS_DIR/linian/ (default: $HOME/.obsidian/plugins/linian/):
manifest.json- Plugin metadata and configurationmain.js- Compiled plugin code (generated from TypeScript)styles.css- Plugin stylingversions.json- Version compatibility information
$OBSIDIAN_PLUGINS_DIR/linian/
├── manifest.json
├── main.js
├── styles.css
└── versions.json
- Make your changes to the source code
- Run
./deploy.shto build and deploy - In Obsidian, disable and re-enable the plugin to reload
- Test your changes
- Run
./dev-deploy.shto start watch mode - Make changes to your source code
- Files are automatically rebuilt and deployed
- In Obsidian, disable and re-enable the plugin to see changes
- Press Ctrl+C to stop watch mode
- Open Obsidian
- Go to Settings → Community Plugins
- Make sure Safe mode is turned OFF
- Find "Linian" in the installed plugins list
- Toggle it ON
- Go to Settings → Linian
- Enter your Linear API key
- Test the connection
- Customize display options as needed
After deploying new changes:
- Go to Settings → Community Plugins
- Toggle Linian OFF, then ON again
- Or restart Obsidian completely
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install
# Check TypeScript errors
npm run build# Check if target directory exists
ls -la $OBSIDIAN_PLUGINS_DIR/
# Check file permissions
ls -la $OBSIDIAN_PLUGINS_DIR/linian/
# Manual deployment
mkdir -p $OBSIDIAN_PLUGINS_DIR/linian/
cp manifest.json main.js styles.css versions.json $OBSIDIAN_PLUGINS_DIR/linian/- Check Obsidian's Developer Console (Ctrl+Shift+I)
- Look for error messages in the Console tab
- Verify all required files are present
- Check that Safe mode is disabled
- Verify your Linear API key is correct
- Test API connection in plugin settings
- Check network connectivity
- Clear plugin cache if needed
Linian/
├── src/ # Source code
│ ├── api.ts # Linear API service
│ ├── constants.ts # Configuration constants
│ ├── renderer.ts # DOM rendering logic
│ ├── settings.ts # Settings UI
│ └── types.ts # TypeScript interfaces
├── main.ts # Plugin entry point
├── manifest.json # Plugin metadata
├── styles.css # Plugin styles
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript configuration
├── esbuild.config.mjs # Build configuration
├── deploy.sh # Deployment script
├── dev-deploy.sh # Development deployment script
└── README.md # Documentation
The dev-deploy.sh script provides near-instant deployment of changes. However, Obsidian still requires manual plugin reload.
- Use
console.log()statements in your code - Check Obsidian's Developer Console for errors
- Use browser debugging tools with Obsidian
- Test with different Linear issue formats
- Test with various issue states and priorities
- Test error conditions (invalid API key, network issues)
- Test performance with many issues in a document
When ready to publish:
- Update version in
manifest.json - Run
npm run buildfor production build - Test thoroughly in your local Obsidian
- Package files for distribution
- Submit to Obsidian Community Plugins (if desired)
- Pushing a version bump to the
mainbranch automatically runs the Build & Release Obsidian Plugin workflow. - The workflow:
- Builds the plugin from source
- Packages a BRAT-compliant zip (
linian-{version}.zip) containing alinian/folder with all runtime files - Updates the
releasebranch with the fresh runtime files - Creates a GitHub Release tagged with the version from
manifest.json - Attaches both the zip archive and the individual files to the release
- To trigger a new release, bump the version in
manifest.json(andversions.jsonwhen needed) and push tomain; the workflow skips automatically if a release tag already exists for that version.
If you encounter issues:
- Check this deployment guide
- Review error messages in console
- Verify file permissions and paths
- Test with minimal configuration
Happy developing! 🚀