Usage Guide
Detailed usage examples and workflows for SK
Usage Guide
This guide walks you through common workflows and advanced usage patterns for SK.
Basic Workflows
Starting a Development Session
Goal: Start working on the Tauri app
- Open terminal in project root
- Run
bun run cli - Select "Run Tauri App (port 42069)"
- Wait for "Running" status
- App is now accessible at
http://localhost:42069
The terminal remains interactive while the app runs in the background.
Running Multiple Apps
Goal: Work on both the main app and docs simultaneously
- Run
bun run cli - Select "Run All Apps"
- Both apps start automatically
- Return to menu to manage them
Or start them individually:
- Select "Run Tauri App"
- Return to menu (apps keep running)
- Select "Run Docs App"
- Both are now running
Making Quick Changes
Goal: Open an app in your editor, make changes, see live reload
- With app running, select "Manage Running Apps"
- Choose the app (e.g., Tauri App)
- Press
Cto open in Cursor - Make your changes
- Save - app auto-reloads (Next.js hot reload)
Installing Dependencies
Goal: Add a new package without stopping the dev server
- Select "Manage Running Apps"
- Choose your app
- Press
Ifor Install - Enter package name (e.g., "lodash")
- Press Enter
- Package installs while app keeps running
Testing in Browser
Goal: Quickly open the running app in your browser
- Select "Manage Running Apps"
- Choose the app
- Press
Ofor Open - Browser opens to
http://localhost:[port]
Restarting After Issues
Goal: App behaving strangely, need fresh start
- Select "Manage Running Apps"
- Choose the problematic app
- Press
Rfor Restart - App stops, then starts fresh
- Check status box for "Running"
Build Workflows
Building a Single App
Goal: Create production build of docs app
- Run
bun run cli - Select "Build Docs App"
- Watch build progress (terminal shows output)
- Review build summary
- Press Enter to return to menu
Building Everything
Goal: Prepare all apps for deployment
- Run
bun run cli - Select "Build All Apps"
- CLI builds each app sequentially
- Review comprehensive summary:
- Total apps
- Successful builds
- Failed builds (if any)
- Total duration
Incremental Builds
Goal: Build only what changed
Since the CLI runs standard build commands, incremental builds work automatically (if your build tool supports them).
For Next.js:
- Subsequent builds are faster
- Only changed pages rebuild
- Cache is preserved
Deployment Workflows
Deploying to Staging
Goal: Create a preview deployment for testing
- Ensure Vercel CLI is installed:
npm i -g vercel - Run
bun run cli - Select "Deploy to Staging"
- CLI runs
vercel deploy - Preview URL is generated
- Test the preview
Deploying to Production
Goal: Push to production after testing
- Test thoroughly on staging first
- Run
bun run cli - Select "Deploy to Production"
- CLI runs
vercel deploy --prod - Confirm deployment (Vercel prompts)
- Production URL updated
Complete Release Workflow
Goal: Full release cycle from code to production
- Develop: Run apps locally, make changes
- Test: Use running apps to verify features
- Build: "Build All Apps" to ensure no errors
- Stage: "Deploy to Staging" for QA
- Verify: Test staging deployment
- Release: "Deploy to Production"
- Confirm: Check production URL
Version Management
Updating Version from CLI
Goal: Update package version before release
- Run
bun run cli - Navigate to "Advanced Options"
- Select "Update Version"
- Choose version increment type:
- Patch:
1.0.0→1.0.1(bug fixes) - Minor:
1.0.0→1.1.0(new features) - Major:
1.0.0→2.0.0(breaking changes) - Custom: Set any version manually
- Patch:
- Version is updated in
package.json
Releasing to npm
Goal: Publish new version to npm registry
Option 1: Using CLI
- Navigate to "Advanced Options" → "Update Version"
- Select "Release & Publish to npm"
- Script automatically:
- Increments patch version
- Builds the package
- Publishes to npm
- Creates git tag
- Optionally push with
npm run release:push
Option 2: Using Release Script
cd tools/sk
npm run release # Release without pushing git
npm run release:push # Release and push to gitThe release script:
- Increments version (0.0.0 → 1.0.0, then 1.0.1, 1.0.2, etc.)
- Builds TypeScript
- Publishes to npm (public access)
- Creates git tag (
v1.0.1) - Optionally pushes changes and tags
Advanced Usage
Working on Specific Apps
Goal: Only work on docs, not the main app
- Run
bun run cli - Select "Run Docs App" only
- Work on documentation
- When done, select "Manage Running Apps"
- Press
Sto stop
Parallel Development
Goal: Two features in different apps
- Run "Run All Apps"
- Open Tauri app with
Chotkey - Work on feature A
- Open Docs app with
Chotkey - Work on feature B
- Both apps live-reload independently
Debugging Build Issues
Goal: Figure out why build fails
- Select "Build [App Name]"
- Watch full build output (not filtered)
- Note the error messages
- Fix issues in code
- Run build again to verify
Tip: Build output shows more detail than dev server output.
Package Management During Development
Goal: Try a new library without interrupting work
- App is running, you're testing features
- Need a new package (e.g., date-fns)
- Press
Iin manage menu - Enter "date-fns"
- Package installs in background
- Import and use immediately (with hot reload)
Switching Between Apps
Goal: Work across multiple apps efficiently
- Start all apps
- Use "Manage Running Apps" as your hub
- Select app → Press
Cto edit - Select app → Press
Oto view - Navigate between apps quickly
Repository Management
Goal: Quickly view GitHub issues or PRs
- Run
bun run cli - Select "Open Repository"
- GitHub opens in browser
- Navigate to Issues or PRs tab
Troubleshooting Workflows
Port Already in Use
Symptom: App fails to start, port conflict
Solution:
- Find what's using the port:
lsof -i :42069 - Kill the process or change port in config
- Restart the app
App Won't Start
Symptom: Spinner runs forever, no "Running" status
Solution:
- Stop the app (
Skey) - Navigate to app directory manually:
cd apps/instantdb bun run dev - Check error messages
- Fix dependencies or configuration
- Try again in CLI
Build Fails
Symptom: Build shows errors
Solution:
- Read error messages carefully
- Common issues:
- Missing dependencies:
bun install - TypeScript errors: Fix in code
- Environment variables: Add to
.env
- Missing dependencies:
- Fix issues
- Run build again
Hotkeys Not Working
Symptom: Pressing O, C, etc. does nothing
Solution:
- Ensure you're in "Manage Running Apps" menu
- Select an app first
- Then use hotkeys
- If still not working, check terminal compatibility
CLI Hangs
Symptom: CLI becomes unresponsive
Solution:
- Press Ctrl+C to force exit
- Check if any processes are still running:
ps aux | grep node - Kill zombie processes if needed
- Restart CLI
Tips & Tricks
Quick Launch Alias
Add to your shell config (~/.bashrc, ~/.zshrc):
alias sk='cd /path/to/skriuw && bun run sk'Now sk from anywhere launches the CLI!
Development Routine
Establish a daily workflow:
# Morning:
bun run cli
→ Run All Apps
→ Press O to check each app
→ Press C to start coding
# Throughout day:
→ Use I to add packages
→ Use R to restart when needed
# End of day:
→ Ctrl+C to stop allFast App Switching
Use number keys + Enter in some terminals:
? Select an app:
1. Tauri App
2. Docs AppType 1 and Enter to select quickly.
Monitoring Logs
For detailed logs, run apps manually:
cd apps/instantdb
bun run devCLI filters logs for cleanliness; manual run shows everything.
Pre-flight Checklist
Before deploying:
- All tests passing
- Build succeeds locally
- Staging deployment works
- No console errors in browser
- Environment variables set
Keyboard Shortcuts
Memorize hotkeys for efficiency:
O- Open (think "Open browser")C- Code (think "Code editor")R- Restart (think "Reload")S- Stop (think "Stop")I- Install (think "Install package")
Example Sessions
Session 1: Bug Fix
$ bun run cli
# Start the affected app
→ Run Tauri App
✓ Running on port 42069
# Open in editor
→ Manage Running Apps → Tauri App
→ Press C
# [Make changes in editor]
# [Save, app hot-reloads]
# View in browser
→ Press O
# [Test the fix]
# Done!
→ Press S to stop
→ ExitSession 2: New Feature
$ bun run cli
# Start both apps (feature spans both)
→ Run All Apps
✓ Tauri App running on 42069
✓ Docs App running on 3000
# Need new package
→ Manage Running Apps → Tauri App
→ Press I → "react-query" → Enter
✓ Installed
# Code the feature
→ Press C
# [Implement feature]
# Update docs
→ Manage Running Apps → Docs App
→ Press C
# [Document feature]
# Build everything
→ Build All Apps
✓ All builds successful
# Deploy to staging
→ Deploy to Staging
✓ Deployed to preview URL
# Test, then deploy to prod
→ Deploy to Production
✓ Live!Session 3: Team Onboarding
# New team member:
$ git clone [repo]
$ bun install
$ bun run cli
# They see beautiful menu
→ Run All Apps
# Everything just works
✓ Tauri App running
✓ Docs App running
# They're productive immediately!
→ Press O to explore
→ Press C to start codingNext Steps
Questions?
- Check Configuration for setup issues
- Review Features for capabilities
- See Getting Started for basics