Fork channel

Create a new channel as a copy of v0.3.0.

Rename channel

Rename v0.3.0 to:

Delete channel

Delete v0.3.0? This cannot be undone.

mode name
drwxr-xr-x .vscode/
drwxr-xr-x build/
drwxr-xr-x media/
drwxr-xr-x scripts/
drwxr-xr-x src/
drwxr-xr-x test/
-rw-r--r-- .ignore
-rw-r--r-- .prettierignore
-rw-r--r-- .prettierrc.js
-rw-r--r-- .vscodeignore
-rw-r--r-- AI_DISCLOSURE.md
-rw-r--r-- AUTHORS.md
-rw-r--r-- CHANGELOG.md
-rw-r--r-- LICENSE
-rw-r--r-- README.md
-rw-r--r-- package.json
-rw-r--r-- tsconfig.json
README

Pijul for VS Code

Community extension — install it from the VS Code Marketplace.

Pijul is a distributed version control system that is easy to learn and use. This extension provides access from VS Code to the essential features of Pijul.

The interactive record session: the draft runs as a webview in VS Code, hunks toggle per card, and Ctrl plus Enter records

Status

The extension and Pijul itself are both young: the extension keeps a 0.x version, and the Pijul CLI is in beta (1.0.0-beta at the time of writing) — a Pijul upgrade can change what the integration has to read, so keep the CLI version the extension is tested with in mind (see Installation).

What is Pijul?

Pijul is a free, open-source distributed version control system based on a mathematically sound theory of patches. Unlike Git, which snapshots files, Pijul models your repository as a graph of lines — which gives it some unique properties:

  • Commutation: independent changes apply in any order with the same result — no rebase ceremony.
  • Correct merges: the order between lines is always preserved; where order is genuinely unknown, Pijul shows a conflict instead of silently guessing.
  • First-class conflicts: conflicts are just changes, resolved once and everywhere — they never come back.
  • Partial clones: clone only the subset of a repo you need (great for monorepos).

Learn more:

Features

  • Initialize a Pijul repository directly from the Source Control view.
  • Add, record, or reset one, some, or all of the files in the repository.
  • Track files and directories, or untrack them again, either right from the Source Control view or from the Explorer’s context menu; directories are tracked recursively, and untracking leaves the files on disk.
  • Remove untracked files (moved to the trash), individually or all at once.
  • Channels: fork, switch, rename, delete, and merge channels.
  • Changelog view listing recorded changes and the files they touch, with their TOML files and copy commands for hash and message.
  • Remotes view listing the configured remotes.
  • 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.
  • Open and edit the repository configuration (.pijul/config) or the global one, which lives outside the workspace in the pijul directory of your platform’s configuration folder (e.g. ~/.config/pijul/config.toml on Linux).

Other operations need to be done using Pijul’s command line interface in a terminal. The extension is in active development.

Workspace trust

The extension executes the Pijul CLI on the contents of the workspace, so it only activates in trusted workspaces. While a workspace is restricted, the pijul.installationPath setting is read from user settings only.

Installation

This extension requires Pijul.

To install Pijul:

  1. Install pijul (tested with 1.0.0-beta.26)
  2. Make sure that pijul is in the PATH: pijul --version
  3. Create an identity: pijul identity new

Supported version: pijul 1.0.0-beta.21 or newer (untested newer betas may break).

To activate Pijul version control in a folder, run pijul init in the folder.

Install Pijul for VS Code from the VS Code Marketplace, or from the command line:

code --install-extension lale.pijul-vscode

Then restart VS Code.

To try the latest changes before they are released, switch to the pre-release channel: in the Extensions view, select Pijul for VS Code and run Switch to Pre-Release Version.

Alternatively, the extension can be built and installed from the source:

pijul clone https://nest.pijul.com/lale/pijul-vscode
cd pijul-vscode
npm install
npx vsce package
code --install-extension pijul-vscode-*.vsix

Feedback

Feedback on this extension is welcome at the Nest.

Contributing

Pijul for VS Code welcomes all contributions.

Known gaps and planned work are discussed on the Nest.

To set up your environment for the development of a VS Code Extension:

  1. Install Node, e.g. using nvm: nvm install node

  2. Clone the repository and install its dependencies:

pijul clone https://nest.pijul.com/lale/pijul-vscode
cd pijul-vscode
npm install
  1. Add the following hook to your Pijul config file for linting:
[hooks]
record = ["npm run lint && npm run format:check"]
  1. Create a channel for your changes (not main): pijul fork <your name>

  2. Test and build the extension (npm test, npx vsce package), as in this example.

Tests

  • Unit tests (npm run test:unit) cover the pure parsing helpers in plain Node.
  • Integration tests (npm run test:integration) run the full extension in a VS Code test instance against a fixture workspace; they require the pijul CLI on the PATH.

Run everything with npm test.

On Linux, the VS Code test instance can be kept off your screen by running the suite on an invisible Xvfb display (apt install xvfb):

xvfb-run -a npm test

Submitting your change

  1. Create an account on The Nest, create an SSH key if you don’t have one yet, and upload your public key (e.g. ~/.ssh/id_rsa.pub) to The Nest

  2. Open a discussion on the repository page describing your change

  3. Push your change to that discussion, where main is the remote channel and the number is the discussion’s:

pijul push <your login>@ssh.pijul.com:lale/pijul-vscode --to-channel main:<discussion number>

If you have write access to the repository, you can also push directly, without a discussion:

pijul push <your login>@ssh.pijul.com:lale/pijul-vscode