What are Environments?
An environment is a set of key-value pairs that can be used across your workspace. Instead of hardcoding values in requests, you reference variables that change based on the active environment. Example:Types of Environments
Global Environment
Variables accessible from any workspace:- Scope: All workspaces
- Use Case: Common values used everywhere
- Examples: Default timeouts, common headers
- Storage: Stored in app settings, not workspace
- Values that never change across projects
- Personal preferences
- System-wide defaults
Workspace Environments
Variables specific to a workspace:- Scope: Current workspace only
- Use Case: Project-specific configurations
- Examples: API URLs, authentication tokens
- Storage: Stored in workspace directory
- Git Sync: Synced to Git repository (except secrets)
- Project-specific values
- Environment-specific configurations
- Team-shared variables
Types of Variables
Regular Variables
Standard variables visible to everyone:- Visibility: Visible in UI
- Git Sync: Synced to repository
- Use Case: Non-sensitive configuration
- Examples: URLs, timeouts, feature flags
Secret Variables
Sensitive variables that are never synced:- Visibility: Masked with asterisks (***)
- Git Sync: Never synced to repository
- Use Case: Sensitive data
- Examples: API keys, passwords, tokens
Variable Values
Each variable can have two types of values:Initial Value
- The default value when environment is created
- Used when environment is first loaded
- Synced to Git (for regular variables)
- Shared with team
Current Value
- The active value during your session
- Can be modified at runtime
- Not synced to Git
- Temporary changes
- Initial:
API_URL = https://api.example.com - Current:
API_URL = http://localhost:3000(for local testing)
Creating Environments
Create New Environment
- Click “Environments” icon in sidebar
- Click “Add new” button
- Enter environment name (e.g., “Development”)
- Optionally add description
- Click “Create”
Add Variables
- Open the environment
- Click “Add variable”
- Enter key and value
- Choose variable type (Regular or Secret)
- Click “Save”
Using Variables
In Requests
Reference variables using double angle brackets: URL:In Scripts
Access variables in pre-request and test scripts: Get Variable:Switching Environments
Active Environment
Only one environment can be active at a time:- Click environment selector in top bar
- Select environment from dropdown
- All requests now use that environment’s variables
Cmd/Ctrl + E- Open environment selector
Quick Switch
Switch between frequently used environments:- Development ↔ Staging ↔ Production
- Use keyboard shortcuts for faster switching
- Environment indicator shows active environment
Managing Environments
Edit Environment
- Right-click on environment
- Select “Edit”
- Update name, description, or variables
- Click “Save”
Duplicate Environment
Create a copy of an environment:- Right-click on environment
- Select “Duplicate”
- A copy is created with ”- Copy” suffix
- Rename and modify as needed
Secret variable values are not copied when duplicating. You must re-enter secret values in the duplicated environment.
Delete Environment
- Right-click on environment
- Select “Delete”
- Confirm deletion
Environment Organization
Common Environments
By Deployment Stage:Naming Conventions
Use clear, descriptive names:Git Sync Integration
What Gets Synced
Synced to Git:- Environment names and descriptions
- Regular variable keys and values
- Initial values
- Environment structure
- Secret variable values
- Current values (temporary changes)
- Active environment selection
Team Collaboration
When working with a team:-
Regular Variables: Shared via Git
- Everyone sees same values
- Changes synced automatically
- Version controlled
-
Secret Variables: Set individually
- Each team member sets their own
- Not shared via Git
- Documented in README
Conflict Resolution
If multiple team members edit the same environment:- Auk detects conflicts during sync
- Shows conflict resolution dialog
- Choose resolution strategy
- Merge changes
Advanced Features
Dynamic Variables
Set variables dynamically in scripts: Generate Timestamp:Variable Precedence
When multiple variables have the same name:- Current Value (highest priority)
- Initial Value
- Collection Variable
- Global Variable (lowest priority)
Conditional Variables
Use different values based on conditions:Variable Templates
Create template environments:- Create “Template” environment
- Add all required variables with placeholder values
- Duplicate for new environments
- Fill in actual values
Import and Export
Export Environment
- Right-click on environment
- Select “Export”
- Choose format (JSON)
- Save file
- Backup
- Share with team (without Git)
- Migrate to another workspace
Import Environment
- Click “Import” in environments section
- Select environment file
- Choose import options:
- Replace existing
- Merge with existing
- Create new
- Click “Import”
Best Practices
Security
Protect Secrets:- Always use secret variables for sensitive data
- Never commit secrets to Git
- Document required secrets in README
- Use password managers for team secrets
Organization
Consistent Structure:- Use same variable names across environments
- Document variable purposes
- Keep environments up to date
- Remove unused variables
Documentation
Document your environments:Testing
Test with different environments:- Create test environment
- Use test data
- Verify requests work
- Switch to production when ready
Troubleshooting
Variable Not Resolving
Problem:<<VARIABLE>> appears in request instead of value
Solutions:
- Check variable name spelling
- Verify environment is active
- Check variable exists in active environment
- Ensure no typos in angle brackets
Secret Variable Empty
Problem: Secret variable has no value Solutions:- Secret values are not synced - set manually
- Check if you’re in correct environment
- Re-enter secret value
- Verify variable type is “Secret”
Environment Not Syncing
Problem: Environment changes not appearing for team Solutions:- Check Git sync is enabled
- Verify changes are committed
- Push changes to remote
- Team members need to pull changes
- Remember: secrets don’t sync
Conflicts After Sync
Problem: Environment conflicts after Git sync Solutions:- Review conflict resolution dialog
- Choose appropriate resolution strategy
- Manually merge if needed
- Test after resolution
Next Steps
Variables
Learn more about variables
Scripts
Use variables in scripts
Collections
Organize requests in collections
Git Sync
Sync environments with Git