# Pijul for VS Code
** Experimental ! **
[Pijul](https://pijul.org/) is a distributed version control system that is easy to learn and use.
This **experimental beta-version** extension provides access from VS Code to the essential features of Pijul:
- Add, Reset, or Record one, some, or all of the files in the Pijul Repository.
- Decorations in the file tree indicating the current state of each file.
- VS Code comparison integration for diffing working files with their last recorded versions.
- Basic views for the change log and the channels.
Other operations need to be done using Pijul's [command line interface](https://pijul.org/manual/reference.html) in a terminal.
## Installation
This extension is available in VS Code marketplace. It requires Pijul.
To install Pijul,:
1. [Install pijul](https://pijul.org/manual/installing.html) (Tested with 1.0.0-beta.9)
2. Make sure that pijul is in the PATH: `pijul --version`
3. Create an identity: `pijul identity new`
To activate Pijul version control in a folder, run `pijul init` in the folder.
Feedback on this extension is welcome [on Zulip](https://nest.pijul.com/pcarbonn/pijul-vscode/discussions).
## Contributing
Pijul for VS Code welcomes all contributions.
Areas of development include:
- make all Pijul commands available from VS Code
- properly handle move and deletion of files
- show diff for past changes
To set-up your environment for [the development of a VS Code Extension](https://code.visualstudio.com/api/get-started/your-first-extension):
1. [Install Node](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs), e.g., using [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script):
```bash
nvm install node
```
2. Install dependencies
```bash
npm install -gD yo generator-code yarn webpack webpack-cli ts-loader
npm install --global @vscode/vsce
yarn
```
3. clone this repository:
```bash
pijul clone https://nest.pijul.com/pcarbonn/pijul-vscode
cd pijul-vscode
```
4. Add the following hook to your [Pijul config file](https://pijul.org/manual/configuration.html) for linting:
```
[hooks]
record = ["yarn run lint"]
```
5. create a channel for your changes (not `main`)
```bash
pijul fork <your name>
```
6. test and build this extension, as in [this example](https://code.visualstudio.com/api/get-started/your-first-extension).
To submit your change:
1. create an account on [The Nest](https://nest.pijul.com/)
2. send me a message to request access to my repository in [this discussion](https://nest.pijul.com/pcarbonn/pijul-vscode/discussions)
3. [create an SSH key](https://www.ssh.com/academy/ssh/keygen) if you don't have one yet, and note where it is stored (e.g. `~/.ssh/id_rsa.pub`)
4. copy your public SSH key to [The Nest](https://nest.pijul.com/pcarbonn?ssh) (possibly use `cat ~/.ssh/id_rsa.pub` to view it)
5. push your change: `pijul push pcarbonn@ssh.pijul.com:pcarbonn/pijul-vscode`
6. alert me of your submission in [this discussion](https://nest.pijul.com/pcarbonn/pijul-vscode/discussions)