Documentation
Complete setup guidance for the SNowCoder AI-powered coding assistant
Get SNowCoder up and running in 6 simple steps:
SNowCoder requires Visual Studio Code as your development environment.
💡 Tip: Make sure you're running VS Code version 1.85 or later for optimal compatibility with SNowCoder.
The SNowCoder CLI powers the AI inference and code generation capabilities.
Option 1: Install via npm (Recommended)
npm install -g @snowcoder/cli
Option 2: Download and install manually
snowcoder --version
You should see the version number displayed (e.g., "SNowCoder CLI v1.0.0")
⚠️ Important: The CLI will download AI models on first run (approximately 5-8GB). Ensure you have a stable internet connection.
The VS Code extension provides the user interface and integrates with the CLI for code completions.
Method 1: Install from VS Code Marketplace
Ctrl+Shift+X
/ Cmd+Shift+X
)Method 2: Install from VSIX file
Ctrl+,
or Cmd+,
)Sign up for a SNowCoder account to access cloud-powered AI features and manage your subscription.
💡 Free Tier: Start with 10,000 free tokens per month. No credit card required for the free tier.
SNowCoder needs access to your ServiceNow instance to provide context-aware code completions and extract your codebase.
snc_read_only
or custom role with these permissions:Instance URL: https://your-instance.service-now.com
Username: snowcoder_readonly
Password: [your-password]
Once connected, extract your instance's codebase for enhanced context:
Ctrl+Shift+P
or Cmd+Shift+P
)⚠️ Security Note: Credentials are stored securely in VS Code's encrypted storage. SNowCoder never sends your credentials to external servers. Instance access is only used locally for code extraction and context.
Enable SNowCoder's powerful automation features to generate PRDs with wireframes, technical specs, and comprehensive tests for every project.
Ctrl+,
or Cmd+,
)/docs
, /specs
)SNowCoder generates everything—you just review and approve:
💡 Pro Tip: Start with auto-generation enabled but approval required. Once you trust the quality, enable auto-approval for routine documentation updates to maximize productivity.
Tab
to accept a suggestionEsc
to dismiss suggestionsThe quality of SNowCoder's output depends on the clarity and specificity of your prompts. Well-crafted prompts lead to better code, more accurate documentation, and comprehensive test coverage.
"Create a Business Rule to assign incidents automatically"
"Create a before insert Business Rule on the incident table that automatically assigns incidents to assignment groups based on the following logic:
- If category is 'Hardware' and subcategory is 'Server', assign to 'Server Support' group
- If category is 'Software' and subcategory contains 'SAP', assign to 'SAP Support' group
- If category is 'Network' and priority is 1 or 2, assign to 'Network Escalation' group, otherwise 'Network L1'
- If urgency is 1 and impact is 1 (P1 incident), also set assignment group manager as additional assignee
- Log a warning message if no matching assignment group is found
- Only run for new incidents (insert), not updates
- Add comprehensive error handling with try-catch and log failures to system log"
"Script Include to get user data"
"Create a Script Include named 'UserDataUtil' in global scope with the following methods:
1. getActiveUsersByDepartment(department_sys_id) - Returns array of active user objects with fields: sys_id, name, email, phone, manager
2. getUserWithRoles(user_sys_id) - Returns user object with nested array of all assigned roles (including inherited)
3. bulkDeactivateUsers(user_sys_ids_array) - Deactivates multiple users, sends notification to their managers, creates audit log entry
Requirements:
- Use GlideRecord with proper query optimization (addActiveQuery, setLimit where appropriate)
- Include proper ACL checks before returning sensitive data
- Add input validation for all parameters
- Return null for invalid inputs with gs.error() logging
- Make it callable from server-side scripts only (not client-callable)
- Add JSDoc comments for all methods
- Follow ServiceNow best practices (avoid dot-walking in queries)"
"Client Script for incident form validation"
"Create an onSubmit Client Script on the incident table with the following validation logic:
Prevent form submission if:
- Priority is 1 or 2 AND short_description is less than 20 characters (show error: 'High priority incidents require detailed description')
- Assignment group is empty AND state is not 'New' (show error: 'Assignment group required before changing state')
- Category is 'Hardware' AND configuration item (cmdb_ci) field is empty (show error: 'CI required for hardware incidents')
- Caller is VIP (vip field = true) AND assigned_to is empty when state moves to 'In Progress'
Additional requirements:
- Use g_form.addErrorMessage() to display validation errors
- Return false to prevent submission, true to allow
- Check if form is in insert vs update mode using g_form.isNewRecord()
- Only apply VIP check on state change, not on initial save
- Add console logging for debugging (with proper null checks)"
Even if you're not sure how to structure a perfect prompt, SNowCoder can help! Here's the workflow:
"Please rewrite this prompt to be more specific and optimized for accurate code generation. Ask me clarifying questions until you're 95% clear on the requirements: [paste your prompt here]"
🎯 Result: Better prompts = Better code
This collaborative approach ensures SNowCoder has all the context it needs to generate production-ready ServiceNow code, comprehensive tests, and accurate documentation.
SNowCoder automates the entire documentation lifecycle, from requirements gathering to version control. Here's how it works:
Provide SNowCoder with high-level requirements, and it generates a complete Product Requirements Document including:
Command: SNowCoder: Generate PRD from Requirements
SNowCoder analyzes your ServiceNow instance and generates architecture diagrams automatically:
Diagrams are generated in multiple formats (PNG, SVG, PlantUML) and stored in your Git repository.
Detailed technical specs are auto-generated covering:
SNowCoder breaks down PRDs into actionable user stories with:
All documentation is automatically committed to your repository:
/docs
folderSNowCoder generates comprehensive test suites alongside your code, ensuring quality and confidence in every deployment.
For every Script Include or Business Rule you write, SNowCoder automatically creates:
Coverage Target: Achieve 80%+ code coverage automatically
Integration tests validate end-to-end workflows:
Generate Automated Test Framework (ATF) tests ready to run in your ServiceNow instance:
Auto-Deploy: Tests can be automatically deployed to your ServiceNow instance
Run tests and get instant feedback:
snowcoder status
git init
)Need more help? Contact our support team at [email protected]
Start building amazing ServiceNow applications with AI-powered assistance