janhq / jan

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
https://jan.ai/
GNU Affero General Public License v3.0
23.69k stars 1.38k forks source link

feat: Consider a portable / non install version #2643

Open tomasts248 opened 7 months ago

tomasts248 commented 7 months ago

Problem All the disadvantages of a regular installation and data portability caused by it.

Success Criteria Being able to run Jan from a external drive and just doing a full back by copying the folder where it is extracted, using a portable installation is now a common good practice in software development and as such usually requested.

Van-QA commented 7 months ago

related to https://github.com/janhq/jan/issues/1435

0xSage commented 2 months ago

Not likely to be fully supported

We have some portability, but I'm not sure 100% portability makes sense for us at the moment.

Not sure if you disagree @dan-homebrew @hiento09

e.g.

  1. Executable vs user/app data: already portable. All app data is in ~/.jan
  2. Relative paths: requires rewriting a lot of things as we write to program files right now
  3. Configuration files: already portable.
hiento09 commented 2 months ago

@0xSage, I understand that portable here means the .exe file we ship to the user, and the user just needs to double-click for the Jan app to launch. It's similar to the AppImage format for Linux, where the user only needs to run ./jan.appImage for the Jan app to start without needing to install it on the OS.

hiento09 commented 2 months ago

I agree with you that our data is in ~/jan, and allowing the data folder to be changed, so this portable version doesn't make much sense to me at the moment as well.

tomasts248 commented 2 months ago

Not sure here, but cant the actual program files folder be redirected? and just have a launcher that redirects from program files to maybe another "program files " but rather than in the OS, in the portable app folder.

v1ckxy commented 3 weeks ago

@0xSage, I understand that portable here means the .exe file we ship to the user, and the user just needs to double-click for the Jan app to launch. It's similar to the AppImage format for Linux, where the user only needs to run ./jan.appImage for the Jan app to start without needing to install it on the OS.

Not exactly. Portable means self-contained within the same path; just have a look at any application from portableapps.com: There's a launcher, a data path and a binary path. You don't need an exe containing everything, doesn't make any sense.

The point is not to throw a lot of crap around elsewhere, as typically any app does (starting from LM Studio, using not just one or two different paths, but three+squirrel temp files)

Normally you want to use paths like this way (normally seen in unix) starting from /apppath/ :

Regards.