Skip to content

Commit d7a3d05

Browse files
committed
Added documentations for vscode and Jetbrains
1 parent e7dad34 commit d7a3d05

File tree

4 files changed

+1063
-0
lines changed

4 files changed

+1063
-0
lines changed

SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
* [Count Contributing Developers](jfrog-applications/jfrog-cli/cli-for-jfrog-security/how-tos/count-contributing-developers.md)
4242
* [CLI for JFrog Distribution](jfrog-applications/jfrog-cli/cli-for-jfrog-distribution.md)
4343
* [CLI for JFrog Cloud Transfer](jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer.md)
44+
* [CLI for IDE Setup](jfrog-applications/jfrog-cli/cli-for-ide-setup/README.md)
45+
* [VSCode CLI Configuration](jfrog-applications/jfrog-cli/cli-for-ide-setup/vscode-cli.md)
46+
* [JetBrains CLI Configuration](jfrog-applications/jfrog-cli/cli-for-ide-setup/jetbrains-cli.md)
4447
* [CLI Command Summaries](jfrog-applications/jfrog-cli/cli-command-summaries.md)
4548
* [JFrog CLI Plugins](jfrog-applications/jfrog-cli/cli-plugins/README.md)
4649
* [JFrog CLI Plugins Developer Guide](jfrog-applications/jfrog-cli/cli-plugins/developer-guide.md)
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# CLI for IDE Setup
2+
3+
![](../../../.gitbook/assets/cli-ide-header.png)
4+
5+
6+
JFrog CLI provides powerful commands to configure IDEs to use JFrog Artifactory as the repository source for extensions, plugins, and packages, streamlining the setup process for development teams by allowing them to easily configure their IDEs to use private or curated repositories hosted in Artifactory.
7+
8+
## Overview
9+
10+
The CLI IDE setup commands automate the configuration of popular IDEs to point to JFrog Artifactory repositories instead of public repositories, which enables organizations to:
11+
12+
- **Centralize IDE Extensions Management**: Host and manage IDE extensions and plugins in Artifactory
13+
- **Ensure Security and Compliance**: Use curated, scanned, and approved extensions from private repositories
14+
- **Enable Offline Development**: Work with locally cached extensions without internet dependency
15+
- **Standardize Development Environment**: Ensure all team members use the same approved set of extensions
16+
17+
## Supported IDEs
18+
19+
| IDE | Configuration Type | Commands | Platform Support |
20+
|-----|-------------------|----------|------------------|
21+
| **Visual Studio Code** | Extensions Gallery | `jf vscode config`<br/>`jf vscode install` | Windows, macOS, Linux |
22+
| **JetBrains IDEs** | Plugin Repository | `jf jetbrains config` | Windows, macOS, Linux |
23+
24+
### JetBrains IDEs Support
25+
26+
The JetBrains configuration command supports all JetBrains IDEs:
27+
- IntelliJ IDEA
28+
- PyCharm
29+
- WebStorm
30+
- PhpStorm
31+
- RubyMine
32+
- CLion
33+
- DataGrip
34+
- GoLand
35+
- Rider
36+
- Android Studio
37+
- AppCode
38+
- RustRover
39+
- Aqua
40+
41+
## How It Works
42+
43+
### VSCode Configuration
44+
The VSCode commands modify the IDE's configuration to point to JFrog Artifactory for extension downloads:
45+
46+
1. **Configuration**: Updates `product.json` to change the extensions gallery URL
47+
2. **Installation**: Downloads and installs extensions directly from Artifactory repositories
48+
49+
### JetBrains Configuration
50+
The JetBrains command configures all detected JetBrains IDEs:
51+
52+
1. **Auto-Detection**: Scans for installed JetBrains IDEs on the system
53+
2. **Configuration**: Updates `idea.properties` files to use Artifactory plugin repositories
54+
3. **Backup**: Creates automatic backups before making changes
55+
56+
## Prerequisites
57+
58+
### Repository Setup
59+
Before using the CLI commands, ensure you have:
60+
61+
1. **JFrog Artifactory** with appropriate repository types:
62+
- **VSCode**: Virtual or Remote repository of type `Generic` configured for VSCode extensions
63+
- **JetBrains**: Virtual or Remote repository of type `Generic` configured for JetBrains plugins
64+
65+
2. **Repository Configuration** in Artifactory:
66+
- VSCode extensions repository with appropriate layout
67+
- JetBrains plugins repository with JetBrains plugin repository layout
68+
69+
3. **Access Permissions**: Appropriate permissions to read from the configured repositories
70+
71+
### System Requirements
72+
73+
#### Platform-Specific Requirements
74+
75+
**macOS & Linux:**
76+
- `sudo` access may be required for system-installed IDEs
77+
- Commands will prompt for elevated privileges when needed
78+
79+
**Windows:**
80+
- "Run as Administrator" may be required for system-installed IDEs
81+
- PowerShell execution policy must allow script execution
82+
83+
## Quick Start
84+
85+
### VSCode Setup
86+
```bash
87+
# Configure VSCode to use Artifactory extensions repository
88+
jf vscode config --repo=vscode-extensions --artifactory-url=https://mycompany.jfrog.io/
89+
90+
# Install an extension from the configured repository
91+
jf vscode install --publisher=microsoft --extension-name=vscode-python --repo=vscode-extensions
92+
```
93+
94+
### JetBrains Setup
95+
```bash
96+
# Configure all JetBrains IDEs to use Artifactory plugins repository
97+
jf jetbrains config --repo=jetbrains-plugins --artifactory-url=https://mycompany.jfrog.io/
98+
```
99+
100+
## Advanced Configuration
101+
102+
### Using Server Configurations
103+
If you have JFrog CLI server configurations set up, you can omit the `--artifactory-url` parameter:
104+
105+
```bash
106+
# Configure with default server
107+
jf vscode config --repo=vscode-extensions
108+
109+
# Configure with specific server
110+
jf c use my-artifactory-server
111+
jf jetbrains config --repo=jetbrains-plugins
112+
```
113+
114+
### Repository URL Formats
115+
116+
The CLI automatically constructs the appropriate repository URLs:
117+
118+
**VSCode Extensions:**
119+
```
120+
https://[artifactory-url]/artifactory/api/vscodeextensions/[repo-key]/_apis/public/gallery
121+
```
122+
123+
**JetBrains Plugins:**
124+
```
125+
https://[artifactory-url]/artifactory/api/jetbrainsplugins/[repo-key]
126+
```
127+
128+
## Backup and Recovery
129+
130+
### Automatic Backups
131+
Both commands create automatic backups before making changes:
132+
133+
- **VSCode**: Backups stored in `~/.jfrog/backup/ide/vscode/`
134+
- **JetBrains**: Backups stored in `~/.jfrog/backup/ide/jetbrains/`
135+
136+
### Manual Recovery
137+
If you need to restore original settings:
138+
139+
1. Locate the backup files in the backup directories
140+
2. Copy the backup files back to their original locations
141+
3. Restart the affected IDE
142+
143+
## Troubleshooting
144+
145+
### Common Issues
146+
147+
**Permission Denied:**
148+
- Run the command with elevated privileges (`sudo` on macOS/Linux, "Run as Administrator" on Windows)
149+
150+
**IDE Not Detected:**
151+
- Ensure the IDE is installed in standard locations
152+
- Check if the IDE is running and close it before configuration
153+
154+
**Repository Not Accessible:**
155+
- Verify repository exists and is accessible
156+
- Check network connectivity to Artifactory
157+
- Ensure proper authentication is configured
158+
159+
### Manual Configuration
160+
If automatic configuration fails, each command provides manual setup instructions in the error output.
161+
162+
## Security Considerations
163+
164+
### File Modifications
165+
The CLI commands modify system-level IDE configuration files. Always:
166+
- Review backup files before making changes
167+
- Test changes in a development environment first
168+
- Ensure you have proper backups of IDE configurations
169+
170+
### Repository Access
171+
- Use access tokens instead of username/password when possible
172+
- Ensure repository permissions are properly configured
173+
- Consider using repository scanning and policies for enhanced security
174+
175+
## Examples and Use Cases
176+
177+
For detailed examples and specific use cases, see:
178+
- [VSCode CLI Configuration](vscode-cli.md)
179+
- [JetBrains CLI Configuration](jetbrains-cli.md)

0 commit comments

Comments
 (0)