dcdpr / dcdpr/jp

Allow using all of `jp` outside of workspaces

Open
#144 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16
Forks
3
Avg merge
1d 1h
Merged PRs (30d)
121

Description

As I'm using JP more and more, I realize that the forced-workspace workflow is a bad one.

Instead, what I want, is for JP to work anywhere on your machine, and if you are outside of a workspace, then it uses a "global local" workspace, meaning the one stored in your local storage folder.

This makes it possible to e.g. generate commit messages for certain projects where you don't want to initiate a workspace per sé.

Most of the plumbing for this exists already, except for the fact that currently attachments are rooted from the workspace root, which we wouldn't have, so we'd have to either root them from the place where the command line argument is triggered, or we add the option to define a .jp.toml file somewhere, and have that be the marker for the root of a "local workspace", which then also allows you to add configurations for those local workspaces, if needed.

You can then add these to e.g. .git/info/exclude if you want those files to be completely ignored for a given Git project. We could make this less magical by invoking an interactive query if you run jp outside of a workspace.

E.g.

You are running Jean-Pierre outside of a workspace.
You can create either a full workspace using:

jp init

or you can create a local workspace using:

jp init --local

For more details, see: https://...

And then we provide a auto_create_local_workspace local option which you can set for your entire machine, so you aren't bothered with those messages if you know what you are doing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing workspace detection and attachment-rooting paths, then inspect the jp init and configuration handling mentioned in the issue. Define and test the behavior for commands outside a workspace, including global-local storage, jp init --local, and the auto_create_local_workspace option; the issue is done when the intended flow is specified and covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.